CLI reference

Updated on 2026-11-25

Install, commands, exit codes.

Package: @securaro/cli (packages/cli, binary securaro).

Install

MethodCommand / image
npmnpm install -g @securaro/[email protected]
Dockerghcr.io/muralipdl527/securaro-cli:1.0.0 (also securaro/cli:1.0.0)
BinaryRelease assets in public/tools/manifest.json (e.g. securaro-linux-x64)

No config file — use flags and environment variables only.

Authenticate (hosted scans)

export SECURARO_API_URL="https://your-tenant.example"
export SECURARO_API_KEY="sec_…"
export SECURARO_APP="storefront"
export SECURARO_VERSION="main"

Commands

CommandPurpose
securaro scanHosted scan + gate + optional local reports
securaro fix -f <findingId>AI fix draft / narrative via API
securaro relay exportExport tracker config
securaro codrael scan -p <path>Local Codrael only (no portal)

securaro scan flags

Sourced from packages/cli/src/scan-options.ts (parity-tested in CI):

FlagEnv fallbackDescription
--type, -t—sast, sca, dast, ai, logic-audit, mobile, all
--depth, -d—quick or deep
--app, -a / --project, -pSECURARO_APP, SECURARO_PROJECTApp slug
--version, -vSECURARO_VERSIONVersion slug
--apiSECURARO_API_URLPortal base URL
--tokenSECURARO_API_KEYAPI bearer token
--fail-on—Gate severity: critical…info (default high)
--new-only—Gate on new vs baseline
--baseline-ref, --diff-baseSECURARO_BASELINE_REF, SECURARO_DIFF_BASEPulse differential
--incremental, --differential—Pulse modes
--force-full-pulse—Ignore baseline once
--fix-check, --verifies-scan, --finding-id—Fix verification scan
--branch-key—Version branch key
--ci-system, --ci-branch, --ci-commit, --ci-pipeline-urlSECURARO_CI_SYSTEMProvenance
--commit, --branch, --pipeline-url—Provenance aliases
--create-version, --version-fromSECURARO_CREATE_VERSIONAuto version
--profile, --time-budgetSECURARO_SCAN_PROFILE, SECURARO_PIPELINE_TIME_BUDGET_SECPipeline profile
--gate-onlySECURARO_GATE_ONLY=trueEvaluate gate only
--format, --out-dir—json, sarif, junit, html, all
--local, --pathSECURARO_LOCAL_SCANSelf-hosted worker path
--dast-url, --dast-auth-file—Local DAST
--no-wait—Async: return scan id immediately

securaro codrael scan

FlagDescription
-p, --pathRepository directory
--baseline-fileSuppressions JSON
--formatjson or sarif
--outOutput file

Env: SECURARO_CODRAEL_ENGINE=native for worker native path.

securaro fix

-f / --finding, --action (fix_draft | signal_check | narrative), --out, --rescan-app.

securaro relay export

--format json|csv, --out.

Examples

Local folder scan (worker CLI on machine):

securaro scan --local --path ./my-repo -t sast --depth quick

CI gate with SARIF:

securaro scan -a my-app --profile pipeline --time-budget 300 \
  --format sarif --out-dir "$RUNNER_TEMP/securaro-out"

Offline Codrael (no portal):

securaro codrael scan -p ./repo --format sarif --out findings.sarif

Exit codes

From packages/cli/src/exit-codes.ts:

CodeMeaning
0Success / gate passed
1Runtime error
2Usage error
42Gate failed (EXIT_GATE_FAILED)

Offline / on-prem

Air-gapped scans use worker CLI + POST /api/v1/scans/import. See On-prem & offline.

Documentation | Securaro