@ping-identity/dvlint-base-rule-pack
Version:
Collection of base rules used to lint DaVinci flows.
294 lines (293 loc) • 13.7 kB
JSON
[
{
"name": "@ping-identity/dvlint-base-rule-pack",
"description": "Collection of base rules used to lint DaVinci flows.",
"version": "1.1.4",
"rules": [
{
"id": "dv-rule-annotations-001",
"description": "Verify several best practices for annotations nodes include checks on color, font and positions on the canvas",
"codes": {
"dv-bp-annotation-001": {
"description": "Found color not included in best practices list for annotation node",
"message": "Annotation color is not in palette [%] (%)",
"type": "best-practice",
"recommendation": "The annotation color is not part of the recommended palette. To ensure optimal results, use the suggested colors.",
"code": "dv-bp-annotation-001"
},
"dv-bp-annotation-002": {
"description": "Found non-standard fontFamily used for Annotation",
"message": "Annotation font is not in sans-serif [%] (%)",
"type": "best-practice",
"recommendation": "The current annotation font is not Sans-Serif. For best clarity and consistency, it is recommended to use a Sans-Serif font",
"code": "dv-bp-annotation-002"
},
"dv-bp-missing-title-annotation-001": {
"description": "Title annotation node not found",
"message": "Each flow should contain a title annotation node with a background color of #4462ed",
"type": "best-practice",
"recommendation": "This flow is missing a title annotation node with a proper description. To improve flow organization, add a title annotation node and set the background color to #4462ed.",
"code": "dv-bp-missing-title-annotation-001"
},
"dv-bp-title-not-on-top-001": {
"description": "Title annotation not on top of flow",
"message": "The topmost node in your flow should be a title annotation (%)",
"type": "best-practice",
"recommendation": "The title annotation node is not positioned at the top of the flow. For better readability, move the title annotation node to the top.",
"code": "dv-bp-title-not-on-top-001"
},
"dv-bp-annotation-003": {
"description": "It is a best practice to include annotations to document your flow",
"message": "Flow contains no annotations",
"type": "best-practice",
"recommendation": "This flow lacks annotations. For improved clarity and structure, add annotations to the flow.",
"code": "dv-bp-annotation-003"
}
},
"reference": "https://library.pingidentity.com/page/davinci-color-palette",
"cleans": false
},
{
"id": "dv-rule-debug-off-001",
"description": "Ensure the flow has debug mode turned off",
"codes": {
"dv-bp-debug-off-001": {
"description": "In flow settings, log level is currently set to Debug",
"message": "Log level set to Debug",
"type": "best-practice",
"recommendation": "The flow log level is set to Debug. For standard operation, it's recommended to set the log level to Info or None unless active troubleshooting is needed.",
"code": "dv-bp-debug-off-001"
}
},
"reference": "",
"cleans": false
},
{
"id": "dv-rule-empty-flow-001",
"description": "Ensure the flow is not empty",
"codes": {
"dv-er-empty-flow-001": {
"description": "The flow has no nodes, it is empty",
"message": "Flow is empty",
"type": "error",
"recommendation": "An empty flow has been found. If it's not being used, remove it.",
"code": "dv-er-empty-flow-001"
}
},
"reference": "",
"cleans": false
},
{
"id": "dv-rule-general-001",
"description": "Perform a bunch of general checks that cleaning ability",
"codes": {},
"reference": "",
"cleans": true
},
{
"id": "dv-rule-logo-001",
"description": "Ensure logos are not hard coded and useCSS is used with a css logo tag. Does not apply to subflows",
"codes": {
"dv-bp-logo-001": {
"description": "In flow settings, useCustomCSS not set to true",
"message": "useCustomCSS not set to true",
"type": "best-practice",
"recommendation": "Use the recommended CSS settings for flows developed by Ping to ensure consistency.",
"code": "dv-bp-logo-001"
},
"dv-bp-logo-002": {
"description": "In flow settings, companyLogo class not included in custom CSS",
"message": "companyLogo class not included in custom CSS",
"type": "best-practice",
"recommendation": "Use the recommended CSS settings for flows developed by Ping to ensure consistency.",
"code": "dv-bp-logo-002"
},
"dv-bp-logo-003": {
"description": "Didn't find companyLogo environment variable in variables connector, this variable should be present in the flow.",
"message": "companyLogo environment variable not found. (% - %)",
"type": "best-practice",
"recommendation": "Use the companyLogo environment variable for Ping-developed flows to ensure the correct branding.",
"code": "dv-bp-logo-003"
},
"dv-bp-logo-004": {
"description": "Didn't find companyName environment variable in variables connector, this variable should be present in the flow.",
"message": "companyName environment variable not found. (% - %)",
"type": "best-practice",
"recommendation": "Use the companyName environment variable for Ping-developed flows to display the appropriate company name.",
"code": "dv-bp-logo-004"
}
},
"reference": "https://library.pingidentity.com/page/ping-ux-css",
"cleans": false
},
{
"id": "dv-rule-multi-start-001",
"description": "Multiple potential start nodes, or disconnected nodes found",
"codes": {
"dv-er-multi-start-001": {
"description": "Multiple start points or floating node(s) found",
"message": "Flow has multiple start points or a floating node",
"type": "error",
"recommendation": "The '%' node is either disconnected or the flow has multiple starting points. Ensure that the node is correctly connected and the flow has only one starting point.",
"code": "dv-er-multi-start-001"
}
},
"reference": "",
"cleans": false
},
{
"id": "dv-rule-node-001",
"description": "Ensure nodes have names/titles",
"codes": {
"dv-bp-node-001": {
"description": "All nodes should have a title",
"message": "Missing node title",
"type": "best-practice",
"recommendation": "The (% %) node is missing a title. For optimal clarity, add a descriptive title.",
"code": "dv-bp-node-001"
},
"dv-bp-node-002": {
"description": "All success/error JSON nodes should proper colors",
"message": "Incorrect node color",
"type": "best-practice",
"recommendation": "The (% %) is not using the correct color. To ensure consistency, use the recommended color: [%].",
"code": "dv-bp-node-002"
},
"dv-bp-node-003": {
"description": "All nodes should have a description",
"message": "Missing node description",
"type": "best-practice",
"recommendation": "The (% %) node is missing a description. For optimal clarity, add a meaningful description.",
"code": "dv-bp-node-003"
},
"dv-er-node-004": {
"description": "Form not selected",
"message": "Form not selected",
"type": "error",
"recommendation": "A form is not selected in the <%> connector. Select a form to complete the configuration.",
"code": "dv-er-node-004"
}
},
"reference": "",
"cleans": false
},
{
"id": "dv-rule-node-002",
"description": "Disabled node found",
"codes": {
"dv-er-node-001": {
"description": "Disabled Node Found",
"message": "Disabled node found",
"type": "error",
"recommendation": "A disabled (% %) node has been found. Consider removing it from the flow.",
"code": "dv-er-node-001"
},
"dv-er-node-002": {
"description": "Connector Capability not configured",
"message": "Connector Capability not configured",
"type": "error",
"recommendation": "Configure a capability in '%' to ensure proper operation.",
"code": "dv-er-node-002"
}
},
"reference": "",
"cleans": false
},
{
"id": "dv-rule-pingOneFlow-001",
"description": "Checks for PingOne Flow configurations",
"codes": {
"dv-er-pingOneFlow-001": {
"description": "Incorrect ending nodes for PingOne flow.",
"message": "Incorrect ending nodes for PingOne flow.",
"type": "error",
"recommendation": "This PingOne-enabled flow is missing appropriate ending nodes. These flows should conclude with either a 'Return Success Response (Redirect Flows)' node or a 'Return Error Response (Redirect Flows)' node of the PingOne Authentication connector.",
"code": "dv-er-pingOneFlow-001"
}
},
"reference": "",
"cleans": false
},
{
"id": "dv-rule-subflow-001",
"description": "Checks for subflow name mismatches",
"codes": {
"dv-er-subflow-001": {
"description": "Subflow names mismatched",
"message": "Incorrect or missing subflow",
"type": "error",
"recommendation": "There is an incorrect or missing subflow in the (%) flow. Ensure that the appropriate subflow is selected and that the names match within the configuration.",
"code": "dv-er-subflow-001"
},
"dv-er-subflow-002": {
"description": "Circular SubFlow Found",
"message": "Circular subflow dependency found",
"type": "error",
"recommendation": "The main flow and subflow reference each other, creating a circular dependency loop. Modify the flow structure to ensure subflows do not point back to parent flows, preventing execution deadlocks.",
"code": "dv-er-subflow-002"
},
"dv-er-subflow-003": {
"description": "Missing Input schema values",
"message": "Subflow input schema missing",
"type": "error",
"recommendation": "The input schema values for the '%' subflow are not currently configured. Configure the schema in the subflow.",
"code": "dv-er-subflow-003"
}
},
"reference": "",
"cleans": false
},
{
"id": "dv-rule-teleport-001",
"description": "Check for unused teleport nodes",
"codes": {
"dv-er-teleport-001": {
"description": "Unused Teleport Found",
"message": "Unused teleport node found",
"type": "error",
"recommendation": "<%> is not being used. Consider removing it from the flow.",
"code": "dv-er-teleport-001"
},
"dv-er-teleport-002": {
"description": "Teleport schema mismatch",
"message": "Teleport schema mismatch",
"type": "error",
"recommendation": "Update the JSON to align with the Teleport node schema, ensuring that the '%' attribute is properly defined.",
"code": "dv-er-teleport-002"
}
},
"reference": "",
"cleans": true
},
{
"id": "dv-rule-variables-001",
"description": "Ensure that flow variables are used in flow. And check for flow variables referenced in nodes but not defined",
"codes": {
"dv-er-variable-001": {
"description": "Unused Variable Found",
"message": "Unused Variable Found",
"type": "best-practice",
"recommendation": "The '%' variable has been found but is not utilized in the flow. Consider removing the unused variable.",
"code": "dv-er-variable-001"
},
"dv-er-variable-002": {
"description": "Undefined variable found",
"message": "Undefined variable found",
"type": "error",
"recommendation": "The '%' variable is not defined within a variable connector, which may lead to unexpected behavior. Define the variable appropriately.",
"code": "dv-er-variable-002"
},
"dv-er-variable-003": {
"description": "Referenced node in variable doesn't exist",
"message": "Referenced node in local variable doesn't exist",
"type": "error",
"recommendation": "The local variable(s) - '%' contains a node id which doesn't exist within the flow.",
"code": "dv-er-variable-003"
}
},
"reference": "",
"cleans": false
}
]
}
]