How It Works
Before you review changes, FTL computes a diff of all modified files and scans added lines for:- Hardcoded shadow credentials — the
ftl_shadow_*values injected into the sandbox - Known credential patterns — API keys, access tokens, and other secrets
- Dangerous SQL operations — destructive database commands
- Dangerous shell commands — destructive filesystem operations
+ in the diff) and skips non-code files like .lock, .json, .yaml, .yml, .toml, .cfg, and .ini.
Detected Patterns
Shadow Credentials
FTL generates shadow credential values using the patternftl_shadow_<name>_<hex>. The linter flags any code that hardcodes these values:
Known Credential Patterns
The linter detects common API key and token formats:
All patterns require the value to be quoted (single or double quotes) to reduce false positives.
Dangerous SQL Operations
The linter flags destructive SQL commands:DROP TABLEDROP DATABASEDROP SCHEMATRUNCATE TABLETRUNCATE(without TABLE)DELETE FROMwithoutWHEREclause
Dangerous Shell Commands
The linter flags destructive shell operations:
Like SQL warnings, these are advisory — the linter displays them separately from credential violations.
Lint Output
When violations are detected, FTL displays them before the diff review:- Credentials are loaded from environment variables, not hardcoded
- Destructive operations are intentional and safe
Bedrock Guardrails Alternative
For hard-blocking enforcement instead of advisory warnings, configure Bedrock Guardrails. When a guardrail is active, it replaces the local linter and blocks merge if credentials or PII are detected.Implementation Details
The linter is implemented inftl/lint.py using regex patterns. It scans the unified diff format output from the container’s internal diff computation.
Key functions:
lint_diffs(diffs, shadow_env)— scans added lines and returns violationsdisplay_violations(violations)— pretty-prints violations to the terminal
ftl code and before the interactive merge command in the FTL shell. You cannot disable it — it’s a core safety layer.