[
  {
    "name": "@ping-identity/dvlint-base-rule-pack",
    "description": "Collection of base rules used to lint DaVinci flows.",
    "version": "1.2.4",
    "rules": [
      {
        "id": "dv-rule-AEqualsBMultipleCondition-001",
        "description": "Invalid configurations for 'A == B (Multiple Conditions)' capability",
        "codes": {
          "dv-er-AEqualsBMultipleCondition-001": {
            "description": "Invalid configurations for 'A == B (Multiple Conditions)' capability",
            "message": "Invalid configurations for 'A == B (Multiple Conditions)' capability",
            "type": "error",
            "recommendation": "Define at least one expected outcome values for the 'A == B (Multiple Conditions)' capability to ensure correct flow branching.",
            "code": "dv-er-AEqualsBMultipleCondition-001"
          },
          "dv-bp-AEqualsBMultipleCondition-002": {
            "description": "Invalid output mapping for 'A == B (Multiple Conditions)' capability",
            "message": "Invalid output mapping for 'A == B (Multiple Conditions)' capability",
            "type": "best-practice",
            "recommendation": "Map each specific outcome value from 'A == B (Multiple Conditions)' to the next node. Do not use generic node-level output.",
            "code": "dv-bp-AEqualsBMultipleCondition-002"
          },
          "dv-er-AEqualsBMultipleCondition-003": {
            "description": "Unmapped outcome(s) in 'A == B (Multiple Conditions)' capability",
            "message": "Unmapped outcome(s) in 'A == B (Multiple Conditions)' capability",
            "type": "error",
            "recommendation": "Map the outcome ‘%’ to an appropriate next node in the ‘A == B (Multiple Conditions)’ capability.",
            "code": "dv-er-AEqualsBMultipleCondition-003"
          }
        },
        "reference": "",
        "cleans": false
      },
      {
        "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-globalVariable-001",
        "description": "Global variable usage in script",
        "codes": {
          "dv-bp-globalVariable-001": {
            "description": "Global variable usage in Custom HTML Template script",
            "message": "Global variable usage in Custom HTML Template script",
            "type": "best-practice",
            "recommendation": "Use global variables cautiously in custom code. Avoid storing or processing sensitive information within them.",
            "code": "dv-bp-globalVariable-001"
          },
          "dv-bp-globalVariable-002": {
            "description": "Global variable usage in Custom Function code",
            "message": "Global variable usage in Custom Function code",
            "type": "best-practice",
            "recommendation": "Use global variables cautiously in custom code. Avoid storing or processing sensitive information within them.",
            "code": "dv-bp-globalVariable-002"
          },
          "dv-bp-globalVariable-003": {
            "description": "Custom JavaScript usage in flow",
            "message": "Custom JavaScript usage in flow",
            "type": "best-practice",
            "recommendation": "Review the script in the % to ensure it does not introduce security vulnerabilities.%",
            "code": "dv-bp-globalVariable-003"
          }
        },
        "reference": "",
        "cleans": false
      },
      {
        "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"
          },
          "dv-er-node-005": {
            "description": "'Expire Flow Instance Cache' enabled in an intermediate node",
            "message": "'Expire Flow Instance Cache' enabled in an intermediate node",
            "type": "error",
            "recommendation": "This setting should only be used on flow-ending nodes. Disable it on intermediate node '%' to prevent execution issues.",
            "code": "dv-er-node-005"
          }
        },
        "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"
          },
          "dv-er-pingOneFlow-002": {
            "description": "Missing false path in capability of PingOne connector.",
            "message": "Missing false path in '%' capability of PingOne connector.",
            "type": "error",
            "recommendation": "Define both true and false paths in '%' capability to handle all outcomes.",
            "code": "dv-er-pingOneFlow-002"
          }
        },
        "reference": "",
        "cleans": false
      },
      {
        "id": "dv-rule-scheduleFlow-001",
        "description": "Schedule flow rules",
        "codes": {
          "dv-er-scheduleFlow-001": {
            "description": "Invalid start node configuration in scheduled flow",
            "message": "Invalid start node configuration in scheduled flow",
            "type": "error",
            "recommendation": "Ensure the flow begins with Start Node and has exactly one outgoing edge.",
            "code": "dv-er-scheduleFlow-001"
          },
          "dv-er-scheduleFlow-002": {
            "description": "All leaf nodes must be end nodes",
            "message": "Invalid flow termination configuration in scheduled flow",
            "type": "error",
            "recommendation": "Ensure every path in the scheduled flow ends with an appropriate end capability: 'End Flow Success', 'End Flow Failure', or both.",
            "code": "dv-er-scheduleFlow-002"
          },
          "dv-er-scheduleFlow-003": {
            "description": "Flow connectors are not supported in scheduled flow",
            "message": "Flow connectors are not supported in scheduled flow",
            "type": "error",
            "recommendation": "Remove all flow connector nodes from this scheduled flow to ensure proper execution.",
            "code": "dv-er-scheduleFlow-003"
          },
          "dv-er-scheduleFlow-004": {
            "description": "Unsupported node configuration in flow",
            "message": "Unsupported node configuration in flow",
            "type": "error",
            "recommendation": "Remove 'End Flow Success' and 'End Flow Failure' capability nodes from this non-scheduled flow. These are specific to scheduled flow behavior and should not be used otherwise.",
            "code": "dv-er-scheduleFlow-004"
          },
          "dv-er-scheduleFlow-005": {
            "description": "UI capabilities are not allowed in scheduled flow",
            "message": "UI capabilities are not allowed in scheduled flow",
            "type": "error",
            "recommendation": "Remove all UI capabilities from the flow. The only UI capabilities allowed are: 'End Flow Success' and 'End Flow Failure', and they must appear only as end nodes.",
            "code": "dv-er-scheduleFlow-005"
          }
        },
        "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"
          },
          "dv-er-subflow-004": {
            "description": "Invalid subflow configuration: PingOne flow selected as subflow",
            "message": "Invalid subflow configuration: PingOne flow selected as subflow",
            "type": "error",
            "recommendation": "PingOne flows cannot be referenced as a subflow. Select a standard DaVinci flow as the subflow instead.",
            "code": "dv-er-subflow-004"
          },
          "dv-er-subflow-005": {
            "description": "'Invoke UI Subflow' capability used, but target subflow has no UI nodes.",
            "message": "'Invoke UI Subflow' capability used, but target subflow has no UI nodes.",
            "type": "error",
            "recommendation": "The 'Invoke UI Subflow' capability requires the subflow to contain UI screen nodes. Since the referenced subflow has none, replace this with 'Invoke Subflow' capability instead.",
            "code": "dv-er-subflow-005"
          }
        },
        "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": "Input schema missing for teleport node",
            "message": "Input schema missing for teleport node",
            "type": "error",
            "recommendation": "Configure required input schema values in the 'Go to Node' capability to pass data into teleport start node '%'.",
            "code": "dv-er-teleport-002"
          },
          "dv-er-teleport-003": {
            "description": "Unsupported false branch after teleport node",
            "message": "Unsupported false branch after teleport node",
            "type": "error",
            "recommendation": "Teleport nodes should only be followed by a true path. Remove or reconfigure the false branch in node '%'.",
            "code": "dv-er-teleport-003"
          },
          "dv-er-teleport-004": {
            "description": "Missing target node in 'Go to Node' capability",
            "message": "Missing target node in 'Go to Node' capability",
            "type": "error",
            "recommendation": "Configure the 'Node to teleport to' in the 'Go to Node' capability in the Teleport node '%' to ensure the flow transitions correctly to the next step.",
            "code": "dv-er-teleport-004"
          }
        },
        "reference": "",
        "cleans": true
      },
      {
        "id": "dv-rule-validFields-001",
        "description": "Missing or Incorrect fields in nodes",
        "codes": {
          "dv-er-validFields-001": {
            "description": "Missing site key configuration for reCAPTCHA",
            "message": "Missing site key configuration for reCAPTCHA",
            "type": "error",
            "recommendation": "Configure the required site key value to enable proper reCAPTCHA functionality.",
            "code": "dv-er-validFields-001"
          },
          "dv-er-validFields-002": {
            "description": "Incorrect 'Additional Fields in the Response' in Send Success JSON Response capability",
            "message": "Incorrect 'Additional Fields in the Response' in Send Success JSON Response capability",
            "type": "error",
            "recommendation": "Ensure valid key/value pairs are configured under 'Additional Fields in the Response'.",
            "code": "dv-er-validFields-002"
          },
          "dv-er-validFields-003": {
            "description": "Incorrect 'Additional Fields in the Response' in Send Error JSON Response capability",
            "message": "Incorrect 'Additional Fields in the Response' in Send Error JSON Response capability",
            "type": "error",
            "recommendation": "Ensure valid key/value pairs are configured under 'Additional Fields in the Response'.",
            "code": "dv-er-validFields-003"
          },
          "dv-er-validFields-004": {
            "description": "Missing 'Property Name' for Output Fields in Custom HTML Template capability",
            "message": "Missing 'Property Name' for Output Fields in Custom HTML Template capability",
            "type": "error",
            "recommendation": "Add a 'Property Name' to define the purpose of the output field. This property can then be referenced by successive nodes in the flow.",
            "code": "dv-er-validFields-004"
          }
        },
        "reference": "",
        "cleans": false
      },
      {
        "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-bp-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-bp-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
      }
    ]
  }
]
