This document contains the help content for the sanctifier command-line program.
Command Overview:
sanctifier↴sanctifier analyze↴sanctifier baseline↴sanctifier attest↴sanctifier audit↴sanctifier badge↴sanctifier diff↴sanctifier ci↴sanctifier fix↴sanctifier redact↴sanctifier report↴sanctifier init↴sanctifier license↴sanctifier callgraph↴sanctifier lsp↴sanctifier update↴sanctifier watch↴sanctifier verify↴sanctifier check-public-inputs↴sanctifier prove↴sanctifier sdk-check↴sanctifier cve↴sanctifier cve search↴sanctifier cve list↴sanctifier cve show↴sanctifier cve export↴sanctifier cve serve↴sanctifier sbom↴sanctifier wasm↴sanctifier toolchain↴sanctifier scaffold-rule↴
Stellar Soroban Security & Formal Verification Suite
Usage: sanctifier <COMMAND>
analyze— Analyze a Soroban contract for vulnerabilitiesbaseline— Snapshot current findings into .sanctify-baseline.json (use --update to refresh)attest— Generate (or verify) a zero-knowledge attestation that a scan passed a score thresholdaudit— Runcargo auditagainst the RUSTSEC advisory database for known-vulnerable dependenciesbadge— Generate a dynamic Sanctifier status badgediff— Compare findings between working tree and a git referenceci— Run CI gating and compliance checksfix— Generate suggested fix diffs for findings and apply them only after explicit confirmation (offline; deterministic local suggestions)redact— Scrub Stellar keys/addresses and home-directory paths from a saved report before sharing itreport— Generate a security reportinit— Initialize Sanctifier in a new projectlicense— Check dependency licenses (fromcargo metadata) against an allow/deny listcallgraph— Generate a Graphviz DOT call graph of cross-contract calls (env.invoke_contract)lsp— Run the Language Server Protocol server for real-time editor diagnosticsupdate— Check for and download the latest Sanctifier binarywatch— Watch source files and re-run analysis automatically on change (debounced)verify— Verify #[sanctify::invariant] declarations across a contract or workspacecheck-public-inputs— Cross-check a ZK circuit's declared public inputs against a verifier contract's assumed encodingprove— Run SMT-based formal verification on Soroban token contract invariantssdk-check— Check the resolved soroban-sdk version(s) in Cargo.lock against known-vulnerable version rangescve— Search, list, show, and export the public Soroban/Stellar CVE databasesbom— Generate a CycloneDX-format Software Bill of Materials (SBOM) from Cargo.lockwasm— Analyze a compiled .wasm module directly when source is unavailable (source-optional mode)toolchain— Audit toolchain and soroban-sdk version pinning for reproducible buildsscaffold-rule— Generate a rule-module scaffold from a short spec (offline, no LLM)
Analyze a Soroban contract for vulnerabilities
Usage: sanctifier analyze [OPTIONS] [PATH]
-
<PATH>— Path to the contract directory or Cargo.tomlDefault value:
.
-
-f,--format <FORMAT>— Output format (text, json)Default value:
text -
-l,--limit <LIMIT>— Limit for ledger entry size in bytesDefault value:
64000 -
--vuln-db <VULN_DB>— Path to a custom vulnerability database JSON file -
--webhook-url <WEBHOOK_URLS>— Webhook endpoint(s) to notify when scan completes (Discord/Slack/Teams/custom) -
--no-baseline— Ignore .sanctify-baseline.json and report all findings -
--profile— Profile peak memory usage and report it at the end of the scan -
--max-memory <MAX_MEMORY>— Abort the scan if peak RSS exceeds this limit (in MB)
Snapshot current findings into .sanctify-baseline.json (use --update to refresh)
Usage: sanctifier baseline [OPTIONS] [PATH]
-
<PATH>— Path to the contract directory, workspace, or a single.rsfileDefault value:
.
--update— Overwrite an existing.sanctify-baseline.json(refresh after intentional changes)-q,--quiet— Quiet — only print the path of the written file (useful in CI)
Generate (or verify) a zero-knowledge attestation that a scan passed a score threshold
Usage: sanctifier attest [OPTIONS] [PATH]
-
<PATH>— Path to the contract directory or a single .rs fileDefault value:
.
-
-t,--threshold <THRESHOLD>— Minimum security score (0-100) the scan must reach to attestDefault value:
90 -
-o,--out <OUT>— Write the attestation artifact here (defaults to stdout) -
--verify <FILE>— Verify an existing attestation artifact instead of generating one
Run cargo audit against the RUSTSEC advisory database for known-vulnerable dependencies
Usage: sanctifier audit [OPTIONS] [PATH]
-
<PATH>— Path to the crate or workspace to audit (must contain Cargo.lock)Default value:
.
-
-f,--format <FORMAT>— Output format (text, json)Default value:
text -
--no-fail— Do not fail (non-zero exit) even if vulnerable advisories are found -
--min-severity <MIN_SEVERITY>— Only fail on advisories at or above this severity (low, medium, high, critical)Default value:
low
Generate a dynamic Sanctifier status badge
Usage: sanctifier badge [OPTIONS]
-
-r,--report <REPORT>— Path to Sanctifier JSON report (fromsanctifier analyze --format json)Default value:
sanctifier-report.json -
--svg-output <SVG_OUTPUT>— Where to write generated badge SVGDefault value:
sanctifier-security.svg -
--markdown-output <MARKDOWN_OUTPUT>— Where to write generated markdown snippet -
--badge-url <BADGE_URL>— Public URL for the SVG (used by markdown output). Falls back to local SVG path
Compare findings between working tree and a git reference
Usage: sanctifier diff [OPTIONS] <GIT_REF>
<GIT_REF>— Git reference to compare against (e.g., origin/main, HEAD~1, commit-sha)
-
-p,--path <PATH>— Path to the contract directory or Cargo.tomlDefault value:
. -
--fail-on-new— Exit with non-zero code if new findings are detected -
-f,--format <FORMAT>— Output format (text, json)Default value:
text -
--vuln-db <VULN_DB>— Path to a custom vulnerability database JSON file
Run CI gating and compliance checks
Usage: sanctifier ci [OPTIONS] [PATH]
-
<PATH>— Path to the contract directory or Cargo.tomlDefault value:
.
-
-f,--format <FORMAT>— Output format (e.g. text, json, sarif)Default value:
text
Generate suggested fix diffs for findings and apply them only after explicit confirmation (offline; deterministic local suggestions)
Usage: sanctifier fix [OPTIONS] [PATH]
-
<PATH>— Path to a contract directory, workspace directory, or a single .rs fileDefault value:
.
-
--apply— Apply the suggested fixes. Without this flag the command is a dry run that only prints the diffs and never touches any file -
--yes— Skip the interactive confirmation prompt when applying. Has no effect unless--applyis also set. Intended for non-interactive automation -
-f,--format <FORMAT>— Output format (text, json)Default value:
text
Scrub Stellar keys/addresses and home-directory paths from a saved report before sharing it
Usage: sanctifier redact [OPTIONS] <INPUT>
<INPUT>— Path to a report/finding file to redact (e.g.sanctifier analyze --format jsonoutput, or a.sanctify-baseline.json)
-o,--output <OUTPUT>— Output file path (defaults to stdout)
Generate a security report
Usage: sanctifier report [OPTIONS]
-o,--output <OUTPUT>— Output file path
Initialize Sanctifier in a new project
Usage: sanctifier init [OPTIONS]
-f,--force— Force overwrite existing configuration file
Check dependency licenses (from cargo metadata) against an allow/deny list
Usage: sanctifier license [OPTIONS] [PATH]
-
<PATH>— Path to the crate or workspace to checkDefault value:
.
-
-f,--format <FORMAT>— Output format (text, json)Default value:
text -
--allow <ALLOW>— Comma-separated list of additional SPDX license identifiers to allow -
--deny <DENY>— Comma-separated list of SPDX license identifiers to explicitly deny, even if they'd otherwise be allowed
Generate a Graphviz DOT call graph of cross-contract calls (env.invoke_contract)
Usage: sanctifier callgraph [OPTIONS] [PATH]
-
<PATH>— Path to a contract directory, workspace directory, or a single .rs fileDefault value:
.
-
-o,--output <OUTPUT>— Output DOT file pathDefault value:
callgraph.dot
Run the Language Server Protocol server for real-time editor diagnostics
Usage: sanctifier lsp [OPTIONS]
--stdio— Communicate over stdin/stdout. Required, and currently the only transport — editors always pass it, and without it a bare invocation would sit silently waiting on stdin
Check for and download the latest Sanctifier binary
Usage: sanctifier update
Watch source files and re-run analysis automatically on change (debounced)
Usage: sanctifier watch [OPTIONS]
-
-p,--path <PATH>— Path to a contract directory, workspace, or single.rsfile to watchDefault value:
. -
-d,--debounce <DEBOUNCE>— Debounce window in milliseconds before re-running after a changeDefault value:
300 -
-f,--format <FORMAT>— Output format passed through toanalyze(text | json)Default value:
text
Verify #[sanctify::invariant] declarations across a contract or workspace
Usage: sanctifier verify [OPTIONS] [PATH]
-
<PATH>— Path to a contract directory, workspace directory, or a single .rs fileDefault value:
.
-
--strict— Exit with a non-zero status code if any invariant cannot be proven (Refuted or Unknown). Useful in CIDefault value:
false -
--json— Emit results as JSON instead of human-readable textDefault value:
false -
--quiet— Suppress the summary line at the end of human-readable outputDefault value:
false
Cross-check a ZK circuit's declared public inputs against a verifier contract's assumed encoding
Usage: sanctifier check-public-inputs [OPTIONS] --circuit <CIRCUIT> --contract <CONTRACT>
--circuit <CIRCUIT>— Path to the circuit source file (e.g. tooling/zk/src/circuit.rs)--contract <CONTRACT>— Path to the verifier contract source file (e.g. contracts/zk-verifier/src/lib.rs)--json— Emit the result as JSON
Run SMT-based formal verification on Soroban token contract invariants
Usage: sanctifier prove [OPTIONS] --invariant <INVARIANT>
-
-p,--path <PATH>— Path to the contract directory or file to verifyDefault value:
. -
--invariant <INVARIANT>— Invariant to prove: balance_non_negative | supply_conserved | no_unauthorized_mint | all -
--output-dir <OUTPUT_DIR>— Directory to write proof certificates (default: /.sanctifier/proofs) -
--no-save— Skip saving proof certificates to disk (useful for CI smoke checks) -
--json— Emit results as JSON
Check the resolved soroban-sdk version(s) in Cargo.lock against known-vulnerable version ranges
Usage: sanctifier sdk-check [OPTIONS] [PATH]
-
<PATH>— Path to the crate or workspace to check (must contain Cargo.lock)Default value:
.
-
-f,--format <FORMAT>— Output format (text, json)Default value:
text -
--vuln-db <VULN_DB>— Path to a custom vulnerability database JSON file
Search, list, show, and export the public Soroban/Stellar CVE database
Usage: sanctifier cve <COMMAND>
search— Search the vulnerability database by keywordlist— List all vulnerabilities with optional filtersshow— Show full details for a specific vulnerability by IDexport— Export the database as JSON or RSSserve— Start a local HTTP server exposing GET /api/vulndb
Search the vulnerability database by keyword
Usage: sanctifier cve search [OPTIONS] --keyword <KEYWORD>
-
-k,--keyword <KEYWORD>— Keyword to search (matches id, name, description, tags, category) -
--format <FORMAT>— Output format: text (default) or jsonDefault value:
text
List all vulnerabilities with optional filters
Usage: sanctifier cve list [OPTIONS]
-
-c,--category <CATEGORY>— Filter by category (e.g. access-control, arithmetic, storage) -
-s,--severity <SEVERITY>— Filter by severity (critical, high, medium, low) -
--format <FORMAT>— Output format: text (default) or jsonDefault value:
text
Show full details for a specific vulnerability by ID
Usage: sanctifier cve show [OPTIONS] <ID>
<ID>— Vulnerability ID (e.g. SOL-2024-001 or SOB-2024-015)
-
--format <FORMAT>— Output format: text (default) or jsonDefault value:
text
Export the database as JSON or RSS
Usage: sanctifier cve export [OPTIONS]
-
--format <FORMAT>— Output format: json or rssDefault value:
json -
-o,--output <OUTPUT>— Write output to this file instead of stdout -
--base-url <BASE_URL>— Base URL used in RSS links (default: https://sanctifier.dev)Default value:
https://sanctifier.dev
Start a local HTTP server exposing GET /api/vulndb
Usage: sanctifier cve serve [OPTIONS]
-
-p,--port <PORT>— Port to listen onDefault value:
7654
Generate a CycloneDX-format Software Bill of Materials (SBOM) from Cargo.lock
Usage: sanctifier sbom [OPTIONS] [PATH]
-
<PATH>— Path to the crate or workspace to generate an SBOM for (must contain Cargo.lock)Default value:
.
-o,--output <OUTPUT>— Output file path (defaults to stdout)
Analyze a compiled .wasm module directly when source is unavailable (source-optional mode)
Usage: sanctifier wasm [OPTIONS] <PATH>
<PATH>— Path to a compiled.wasmmodule
-
-f,--format <FORMAT>— Output format (text, json)Default value:
text -
--show-limitations— Print the source-vs-WASM limitations note (also shown at the end of text output)
Audit toolchain and soroban-sdk version pinning for reproducible builds
Usage: sanctifier toolchain [OPTIONS]
-
-p,--path <PATH>— Path to the workspace/project root to auditDefault value:
. -
--json— Emit results as JSON
Generate a rule-module scaffold from a short spec (offline, no LLM)
Usage: sanctifier scaffold-rule [OPTIONS] <SPEC> <NAME>
<SPEC>— Short plain-English description of the bug pattern to detect (e.g. "flags unwrap() calls on storage reads that can panic")<NAME>— Rule name (accepts snake_case, kebab-case, or PascalCase; used to derive the generated struct name, theRule::name()string, and the default output file name)
--output <OUTPUT>— Write the generated module to this path instead of the defaulttooling/sanctifier-core/src/rules/<name>.rs
This document was generated automatically by
clap-markdown.