Back to directory
Flow-Scanner avatar
Flow-Scanner / lightning-flow-scanner-app

lightning-flow-scanner-app

A Salesforce App for analysis of Salesforce Flow. Scans metadata for 20+ issues such as hardcoded IDs, unsafe contexts, inefficient SOQL/DML operations, recursion risks, and missing fault handling.

8

Stars

2

Forks

0

Watchers

AGPL-3.0

License

banner

Detect unsafe contexts, queries in loops, hardcoded IDs, and more to optimize Salesforce Flows.

Lightning Flow Scanner Demo


Table of contents


Features

Flow Overview

Flow Overview

Violation Details

All Results View

Rule Configuration:

Rule Configuration

Usage

Lightning Flow Scanner App integrates the Lightning Flow Scanner as a UMD module within Salesforce, enabling scanning of flow metadata for 20+ issues such as hardcoded IDs, unsafe contexts, inefficient SOQL/DML operations, recursion risks, and missing fault handling.

  • Click on the App Launcher icon in the top-left corner of your Salesforce interface.
  • Search for "Flow Scanner" in the App Launcher.
  • Click on the "Flow Scanner" app to open the Scan Flows Overview.
  • (Optional) Configure rules in the Configuration tab.
  • View results of a Flow by clicking "details".

For details about all available rules, their default severities, and configuration options, visit the Flow Scanner Documentation.

Privacy: Zero user data collected. All processing is client-side. → See Data Handling in our Security Policy.


Configuration

While no configuration is required, you can configure rules in several ways: inline in the Configuration tab, through the guided Configure Rules wizard, by importing a config file, or via Custom Metadata org defaults. Use Save to Org to persist the current configuration org-wide (admins only) — it loads automatically for everyone who opens the app; unsaved changes apply to the current browser session only. For full config reference, see the documentation.

Org defaults (Custom Metadata)

Admins can define default severities, expressions, or disabled states for scan rules using the ScanRuleConfiguration__mdt custom metadata type. These overrides apply globally for all users in the org; individual users can still adjust severities or disable rules locally in the browser.

  1. Go to Setup → Custom Metadata Types → ScanRuleConfiguration → Manage Records
  2. Click New and set the following fields:
  • Rule Name — legacy name (e.g. FlowName) or canonical rule id (e.g. invalid-naming-convention)
  • SeverityError, Warning, or Note (other values are ignored)
  • Expression (optional) — e.g., [A-Za-z]+_[0-9]+
  • Disabled — check to turn off the rule globally
  1. Once saved, the Flow Scanner App automatically applies these overrides at load time.

Rule Override

Import a config file (same format as CLI / VS Code)

On the Configuration tab, use Load config to import a .flow-scanner.json or .flow-scanner.yml file — the same files the CLI reads and the VS Code extension writes. Supported:

  • Per-rule severity (error / warning / note; anything else is ignored), enabled / disabled, expression, threshold, message, messageUrl
  • Rule keys as rule ids (excessive-cyclomatic-complexity) or legacy names (CyclomaticComplexity)
  • Top-level threshold, categories, exceptions, ignoreFlows, and related scan options
  • ruleMode: "isolated" — only the rules named in the config run; all others are deactivated

Example:

{
  "rules": {
    "excessive-cyclomatic-complexity": { "threshold": 30, "severity": "warning" },
    "cognitive-complexity": { "threshold": 15 },
    "invalid-api-version": { "expression": ">=58" },
    "invalid-naming-convention": { "expression": "[A-Za-z0-9_]+" },
    "hardcoded-id": { "enabled": false }
  },
  "threshold": "warning",
  "categories": ["problem", "suggestion"]
}

Imported values feed the in-browser scan immediately (and re-scan if results are already open).

Configure Rules wizard, export, and org-wide saving

The Configuration tab toolbar also offers:

  • Configure Rules — a guided wizard (like the VS Code extension's Configure Scanner): choose merged or isolated rule mode, opt into beta rules, select rules, and set thresholds/expressions with validation, then review and apply.
  • Save to Org — stores the current configuration in the Flow_Scanner_Saved_Config__mdt custom metadata type (deployed via the Metadata API, takes 10–30 seconds; requires Customize Application). Saved configuration loads automatically for everyone who opens Flow Scanner, layered on top of ScanRuleConfiguration__mdt defaults.
  • Export — downloads the current configuration as .flow-scanner.json, directly usable by the CLI and the VS Code extension.
  • Reset — discards session changes and returns to core defaults plus Custom Metadata overrides.

Edit rule options in the app

Rules with configurable options (e.g. the naming expression or complexity threshold) show an inline editor in the Options column of the Configuration tab. An empty field uses the core default (shown as placeholder); press Enter or click away to apply a value and re-scan. Editors are generated from the scanner core's rule metadata, so newly added configurable rules appear automatically.


Installation

Deployment Type Installation
AppExchange(managed) Install Managed Package
Unmanaged Install Unmanaged Package
Or via CLI sf package install --package 04tgK000000GVmDQAW --wait 10

After installation, complete the Post-Installation Setup to configure the External Client App and assign permissions.


Development

  1. Clone this repository:
git clone https://github.com/Flow-Scanner/lightning-flow-scanner-app.git
  1. Create a Scratch Org
sf org:create:scratch --definition-file config/project-scratch-def.json --alias FlowScanner --duration-days 7 --set-default --json
  1. Push Source to Your Org:
sf project:deploy:start
  1. Assign Permission Set
sf org assign permset --name Flow_Scanner

Want to help improve Lightning Flow Scanner? See our Contributing Guidelines

Releases

Aug 8, 2026

v3.4: Rule Configuration Wizard

Download .zip

Lightning Flow Scanner App — Configure rules the way that suits you — the new wizard, a config file, or inline edits — then save it to the org so everyone gets it. The Setup tab now verifies itself....

Jul 5, 2026

v3.3 — External Client App Support & In-App Setup

Download .zip

External Client App support (new default setup) Salesforce is phasing out the creation of new Connected Apps in favor of External Client Apps. Starting with v3.3, the post-installation setup uses an E...

Dec 18, 2025

Protected Custom Metadata for Consumer Ke

Download .zip

Protected Custom Metadata for Consumer Key The Consumer Key can now stored in a protected custom metadata type (Flow_Scanner_OAuth_Config_Protected__mdt) instead of the previous normal one. We now als...

Nov 19, 2025

OAuth Authentication

Download .zip

v3.0.0 Authentication Upgrade To upgrade to Flow Scanner v3.0.0, you must follow the new post-installation instructions provided below after uninstalling any previous versions. This release introduces...

Oct 20, 2025

UI Makeover

Download .zip

Adds all results by navigation Adds overall styling improvements Adds sorting capabitlities to tables