lightning-flow-scanner-copado

Scans for unsafe contexts, hardcoded IDs, and other issues to optimize your Flows.

FlowScan example

Watch the full Flow Scanner Demo

Usage

Copado Flow Scanner is a plugin to boost your Salesforce deployments by integrating Lightning Flow Scanner as a Quality Gate within Copado, to analyze updated Flows in your User Story, ensuring top-notch quality before every deployment. View comprehensive results directly within Copado for streamlined, confident releases. For more information on the default rules and configurations available, please review the flow scanner documentation.

Pre-Requisites

Installation

Picklist Values

Create the Following Picklist values

Create The Functions and Job Templates

Navigate to the “Copado Extensions” tab, select “CopadoFlowScanner” and press the button “Generate Extension Records”.

Generate Extension Records

Configure Acceptance Criteria via a Function Parameter

Function Parameter

fail_on - This parameter can take one of three rule severity values - error, note or warning. The default value of it is error. This parameter decides when should the Quality Gate fail.

By default, all rules have a severity of error. To customize behaviour, check the core documentation on how to create a .flow-scanner.json configuration file.

Configure the Quality Gate

Create the Quality Gate Rule

Navigate to the Quality Gate Rules tab and create a new record as follows. Note that the Type field will be populated automatically upon save. The global value set Test Tool should have a value for Flow Scanner as part of this package. It can be created manually if necessary.

Configure Quality Gate

Create the Quality Gate Rule Condition

Set the conditions so that it only applies to Pipelines/Stages/Environments with Platform = SFDX. This picklist value can be added manually if necessary. Once saved, press the “Activate” button on the Quality Gate Rule record. To run Flow Scanner only when Flows are committed, add Filter Logic as demonstrated below: Quality Gate Rule Condition

You are all set. To test the configuration, just perform a commit, and the Commit Action will call Flow Scanner after every commit.

If you’d like to help us enhance Flow Scanner, please consider having a look at the Contributing Guidelines.