Skip to content
FendixDocumentationDocs

.fendix.yaml · SEC-001 · SARIF

Current release v3.7.0
ReferenceStablev3.7.0

scan

Exact targets, authentication, analyzers, policy, coverage, and output options for fendix scan.

On this page

Scan an authorized URL, API specification, source tree, or supported combination and produce a policy-aware security report.

Stable in v3.7.0

Syntax

terminal
fendix scan [flags]

Arguments and required inputs

At least one of --url, --spec, or --code is required. --import augments a scan and does not satisfy the target requirement.

Examples

Basic API scan

terminal
fendix scan --url https://staging.example.com

Source scan

terminal
fendix scan --code . --format json --output results.json

Coverage gate

terminal
fendix scan --code . --require-analyzers pip,npm,govulncheck --fail-on-coverage-gap

SARIF output

terminal
fendix scan --code . --format sarif --output results.sarif

Targets and scope

Scroll the table horizontally to inspect every column.

OptionTypeDefaultRequirementConfigurationEnvironmentDescription
--urlstring—Optional——Target API base URL (black-box scanning)
--specstring—Optional——Path or HTTP(S) URL to an OpenAPI/Swagger YAML or JSON spec
--codestring—Optional——Path to source code directory (white-box scanning)

Authentication

Scroll the table horizontally to inspect every column.

OptionTypeDefaultRequirementConfigurationEnvironmentDescription
--authstring—Optional—FENDIX_AUTHAuth header value, e.g. "Bearer token123"
--auth-typestring—Optional—FENDIX_AUTH_TYPEAuth type: bearer, apikey, apikey-query, basic, cookie (default: auto-detect)bearer · apikey · apikey-query · basic · cookie
--auth-headerstringAuthorizationOptional—FENDIX_AUTH_HEADERCustom auth header name; with apikey-query this names the query parameter (pass api_key for the conventional name)
--auth-user2string—Optional——Second user auth for IDOR checks, e.g. "Bearer token-user2"
--profilestring—Optionalauth.profile—Auth profile name from ~/.fendix/profiles/<name>.yaml

Crawl and safety

Scroll the table horizontally to inspect every column.

OptionTypeDefaultRequirementConfigurationEnvironmentDescription
--enable-activeboolfalseOptionalscan.enable_active—Enable active injection probes (default: false)
--max-probes-per-endpointint20Optional——Max active probes per endpoint (only effective with --enable-active)
-w, --workersint10Optionalscan.workers—Concurrent HTTP workers
--timeoutint10Optionalscan.timeout—HTTP timeout in seconds
--delayint100Optionalscan.delay_ms—Milliseconds between HTTP requests
--wordliststring—Optionalcrawler.wordlist_path—Path to brute-force wordlist (one path per line); overrides built-in CommonPaths
--crawl-depthint1Optionalcrawler.crawl_depth—Recursive HTML link crawl depth (0 disables; 1 = home-page links only)
--max-endpointsint500Optionalcrawler.max_endpoints—Cap total discovered endpoints (0 = no cap)
--max-requestsint640Optionalbudgets.max_requests—Soft-cap on total HTTP requests across all checks (0 = no cap)
--max-durationduration0sOptionalbudgets.max_duration—Soft-cap on total scan wall-clock time, e.g. 5m (0 = no cap)
--respect-robotsboolfalseOptionalcrawler.respect_robots—Treat robots.txt Disallow as a hard restriction (default: queue as discovery hints)
--allow-private-targetsboolfalseOptional——Allow the scanner to connect to private/loopback/link-local addresses and the cloud metadata IP (disables the SSRF egress guard). Auto-enabled when --url already resolves to a private/loopback host.

Analyzers and imports

Scroll the table horizontally to inspect every column.

OptionTypeDefaultRequirementConfigurationEnvironmentDescription
--checksstringSliceauth,injection,deps (runtime)Optional · Repeatable——Override checks when the Python whitebox engine runs (default: auth,injection,deps). --code auto-enables that phase unless --python-engine=false is explicit; the native Go scanners run independently.auth · injection · deps
--python-engineboolauto-enabled by --code unless explicitly falseOptional——Spawn the Python whitebox engine for auth/injection/deps checks (TASK-118). --code enables it automatically unless --python-engine=false is explicit. Standalone binaries do not bundle the engine; provide a local python/ tree or FENDIX_ENGINE (the official container supplies one).
--fastboolfalseOptional——Skip semgrep and the native dependency scanners. Known limitation: --fast does not disable the Python engine auto-enabled by --code; add --python-engine=false when a native-only pre-commit scan is required.
--no-native-depsboolfalseOptional——Disable the in-process Go dep-CVE scanner (TASK-119). Defer to the Python deps.py path instead.
--use-pip-auditboolfalseOptional——Shell out to the pip-audit binary for Python dep-CVE scanning instead of the native OSV.dev client. Falls back to OSV.dev with a warning if pip-audit is not on PATH.
--offlineboolfalseOptional——Use the local offline-db snapshot for native pip/npm CVEs and skip native govulncheck (create the snapshot with 'fendix db update'). Known limitation: the Python deps check auto-enabled by --code does not receive this flag and may run networked tools; for a hermetic scan add --checks auth,injection or --python-engine=false.
--offline-dbstring~/.fendix/offline-db.json (runtime)Optional——Path to the offline-db snapshot (default: ~/.fendix/offline-db.json). Only effective with --offline.
--no-pluginsboolfalseOptional——Disable out-of-tree plugin discovery in .fendix/plugins/ + ~/.fendix/plugins/
--allow-repo-local-pluginsboolfalseOptional——Opt in to running repo-local plugins under <scan-dir>/.fendix/plugins/ (UNSAFE on untrusted PRs; ~/.fendix/plugins/ is always trusted)
--importstringSlice—Optional · Repeatable——Merge findings from another scanner's SARIF 2.1.0 file into this scan (repeatable). Imported findings go through the standard pipeline; a native fendix finding at the same weakness+location becomes strong cross-tool corroboration. See also the standalone 'fendix import' command.

Decisions and coverage

Scroll the table horizontally to inspect every column.

OptionTypeDefaultRequirementConfigurationEnvironmentDescription
--fail-onstring—Optionalfail_on—Exit 1 if a finding at this severity reaches BLOCK: CRITICAL, HIGH, MEDIUM, LOW (confidence gating applies — see --enforce-confidence)CRITICAL · HIGH · MEDIUM · LOW
--enforce-confidencebooltrueOptionalscan.enforce_confidence—Only BLOCK a finding at or above --fail-on when the confidence band supports it AND something corroborates the claim: LOW band warns; a finding with no corroborating signal at all warns; MEDIUM band blocks only with an INDEPENDENT signal (cross-engine agreement, confirmed route, reachable taint path, proven path, payload-validated probe, cross-tool corroboration, contradicted authentication requirement); self-evident signals (direct response read, deterministic detection in production source, imported high-precision rule) gate at HIGH. Evidence is never suppressed. Pass --enforce-confidence=false to restore the legacy severity-only gate — findings that block only because of that relaxation are marked policy_override in the report.
--deescalate-testsbooltrueOptionalscan.deescalate_tests—Report findings in test/fixture code as INFO instead of WARN (evidence is preserved, never suppressed). A finding at or above --fail-on can still block when independent corroboration supports it; an unsupported test-code match is held at WARN. Pass --deescalate-tests=false to treat test-code findings like production ones.
--block-on-inapplicableboolfalseOptional——Gate the build on a vulnerable dependency even when Fendix found no import of the advisory's affected component. Default false: such a finding is reported in full and held at WARN, because the vulnerable code path is not applicable to this project on the available evidence. Set this when policy is "no vulnerable version ships, applicable or not" — e.g. where the SBOM is what gets audited rather than the call graph.
--fail-on-scanner-errorboolfalseOptional——Exit non-zero (2) if any recorded analyzer — any entry in metadata.scanner_status, which is the full registry (dast, spec, active-probes, secrets, textscan, semgrep, govulncheck, pip, npm, plugins, the python-engine and its checks) — ran and errored. CI-friendly: turns a silent coverage gap into a build failure. Skipped entries never count.
--fail-on-coverage-gapboolfalseOptional——Exit 2 when an analyzer this run was configured to execute was unavailable or failed (metadata.coverage.configured_complete=false). Disabled, not-applicable and unsupported analyzers never trip it.
--require-analyzersstringSlice—Optional · Repeatable——Comma-separated analyzer names that must be delivered (recorded ok or not_applicable) for exit 0; anything else exits 2. Stricter than --fail-on-coverage-gap: a required analyzer disabled by another flag is a contradiction and exits 2. Names: dast, spec, active-probes, secrets, textscan, semgrep, govulncheck, pip, npm, python-engine, python-engine/auth, python-engine/injection, python-engine/deps, pluginsdast · spec · active-probes · secrets · textscan · semgrep · govulncheck · pip · npm · python-engine · python-engine/auth · python-engine/injection · python-engine/deps · plugins

Policy and history

Scroll the table horizontally to inspect every column.

OptionTypeDefaultRequirementConfigurationEnvironmentDescription
--configstring.fendix.yaml in cwd (auto-detect)Optional——Path to .fendix.yaml policy file (default: auto-detect .fendix.yaml in cwd)
--baselinestring—Optional——Path to a baseline (from --save-baseline) or JSON report; only occurrences not proven present in it are reported
--save-baselinestring—Optional——Save current findings, with every occurrence identity, to this path (baseline format v2)
--ignorestring—Optionalignore_path—Path to .fendix-ignore file
--diffstring—Optional——Diff-aware scan against a git ref (bare --diff = vs HEAD, --diff=origin/main = vs that ref). The native secrets, text and Semgrep scanners read only the changed files, whole files, so existing issues in them are reported; dependency-CVE scanners run only when a manifest changed and then report its full set; the Python engine, DAST and plugins always scan the full target. If git diff fails, or a changed file cannot be placed under --code (as when --code is a subdirectory of the repository), the scan falls back to a full scan.
--stagedboolfalseOptional——Diff-aware scan over staged changes only (git diff --cached). Implies --diff. This is what the pre-commit hook runs.

Output and diagnostics

Scroll the table horizontally to inspect every column.

OptionTypeDefaultRequirementConfigurationEnvironmentDescription
-o, --outputstring—Optional——Output file path (default: stdout)
-f, --formatstringjsonOptionalscan.format—Output format: json, html, sarif, pdfjson · html · sarif · pdf
--langstringenOptional——HTML report language: en (default), ar (Arabic, RTL). Other formats stay English.en · ar
--debug-bundlestring—Optional——Write a redacted diagnostic tarball to this path at scan end (intended for bug reports)
-v, --verboseboolfalseOptional——Print all requests and raw findings