Skip to main content

CLI Reference

Every flag, grouped by purpose.

Synopsis

scan4secrets [INPUT] [SCOPE] [DAST] [AUTH] [OUTPUT] [GATE]

Input targets

FlagDefaultDescription
--path PATH ....One or more local directories or files for SAST. Repeatable.
--url URL ....One or more URLs for DAST. Repeatable.
--stdinoffRead text from stdin and scan as a single buffer.
--rules FILEbundledOverride the bundled rules.yaml with a custom YAML file.
--rule-id ID ...allRestrict to specific rule IDs. Repeatable.
--severity LEVELinfoMinimum severity to include (info / low / medium / high / critical).

SAST scope control

FlagDefaultDescription
--exclude GLOB ....Skip files matching glob. Repeatable.
--exclude-dir DIR ...sensible defaultsSkip directory by name. Repeatable.
--max-size MB10Skip files larger than this.
--no-binary-skipoffDisable NUL-byte binary skip heuristic.

DAST tuning

FlagDefaultDescription
--threads N16Concurrent crawler workers.
--max-urls N2000Cap total URLs visited per --url target.
--max-depth N3Cap crawl depth from each seed.
--timeout SEC15Per-request timeout.
--strict-hostoffRestrict scope to exact hostname (default = eTLD+1).
--user-agent UAscan4secrets/2 (+github.com/m14r41/scan4secrets)Override outbound UA.
--wordlist FILE ...bundledReplace bundled wordlists with custom file(s).
--wordlist-only NAME ...allRestrict to specific bundled stems.
--no-wordlistoffDisable wordlist seeding entirely.

Authentication / proxy

FlagDefaultDescription
--cookie COOKIE.Send cookie header on every DAST request.
--header K:V.Add request header. Repeatable.
--proxy URL.Route DAST through proxy (Burp / ZAP compatible).
--insecureoffDisable TLS certificate verification.

Verification

FlagDefaultDescription
--verifyoffRun live vendor probes on findings whose rule has a verify: block.
--verify-timeout SEC5Per-probe timeout.
--verify-workers N8Concurrent verifier workers.

Output

FlagDefaultDescription
--output PREFIXscanOutput path prefix (no extension).
--report FMT ...jsonOne or more of: sarif json jsonl csv html excel pdf.
--unsafe-showoffInclude raw secret values in reports (otherwise redacted).
--keep-genericoffKeep generic catch-all findings even when a vendor-specific rule matched.
--quietoffSuppress per-finding console output.
--verboseoffVerbose progress logging.

Exit-code gate

FlagDefaultDescription
--fail-on LEVELnoneExit 1 if any finding meets or exceeds this severity (info / low / medium / high / critical).

Examples

SAST a monorepo, fail CI on anything high or above

scan4secrets --path . --report sarif --fail-on high --output reports/scan

Authenticated DAST through Burp, verify live tokens, full report

scan4secrets --url https://app.example.com \
--cookie "session=$SESSION" --header "X-Tenant: acme" \
--proxy http://127.0.0.1:8080 \
--verify --report html sarif jsonl --output reports/audit

Mixed SAST + DAST, restrict to specific rule IDs

scan4secrets --path ./src --url https://staging.example.com \
--rule-id aws-access-key-id stripe-secret-live github-pat-classic \
--report json --output reports/targeted

Help

scan4secrets --help