verity
├── scan static audit of MCP/LLM configs and source trees
├── test isolated payload tests for CWE-89/639/943/94
└── serve expose the scanner over a transport
One or more MCP/LLM config JSON/JSONC/YAML files. When omitted alongside --path/--schema-file, workstation configs are auto-discovered
--schema-file
path
—
JSON Schema for declared tool arguments. Enables static checks such as VERITY-STATIC-TOOL-POISONING on tool schemas
--path
path...
—
One or more Python files, directories, or config files (.json/.yaml/.yml). Directories scan AST sources and discover nested monorepo configs (**/.cursor/mcp.json, **/.vscode/mcp.json, **/.mcp.json, **/mcp.json) filtered by .verityignore
Path to a verity.toml policy config ([scan], [[ignore]], [[allowlists]])
--ignore-file
path
<root>/.verityignore
Path to a .verityignore file
--client
name...
all 17 clients
Restrict workstation discovery to specific clients (claude_desktop, claude_code, cursor, windsurf, zed, vscode_cline, vscode_roo, goose, continue, junie, vscode, antigravity, openhands, trae, lmstudio, librechat, workspace; aliases like claude-code, cline, roo-code accepted)
--scan-global
flag
off
Also scan globally installed npm / ~/.npm/_npx MCP packages (opt-in)
--scanners
list
offline defaults
Comma-separated scanners (all, config, vuln, secret, ast, taint, typosquat, conflict). Defaults to config,vuln,secret,ast,typosquat,conflict (+ taint when --path is set), or inventory-only when --format cyclonedx\|spdx is used without --scanners
--typosquat-threshold
int
2
Maximum Damerau-Levenshtein distance (1–3) for offline BK-Tree typosquatting detection
--call-analysis / --no-call-analysis
flag
on
Enable or disable AST call-graph reachability analysis for transitive dependency CVEs
--reachable-only
flag
off
Filter transitive vulnerability findings to only those REACHABLE from exposed MCP tools
--manifest
path
—
Path to a dependency manifest (package.json, requirements.txt, uv.lock, poetry.lock, pyproject.toml) for transitive reachability
--compliance
string
—
Evaluate OWASP compliance (owasp-mcp-top-10 or owasp-llm-2025), attach additive owasp_mcp_id / owasp_llm_id / owasp_category fields, and emit a scorecard
--fail-on-non-compliant
flag
off
Exit 1 when the --compliance tier is not COMPLIANT
--save-inventory-baseline
path
—
Persist a deterministic server inventory snapshot JSON to this path
--compare-inventory-baseline
path
—
Diff current discovered server inventory against a saved inventory baseline
--fail-on-drift
flag
off
Exit 2 when --compare-inventory-baseline detects added, removed, or modified servers
# Default posture scan of the current directoryverityscan
# Multi-file mixed-type scan (ideal for pre-commit)verityscan--pathserver.pytools.py.mcp.json--fail-on-severityHIGH
# Explicit config and source rootverityscan--config-file.mcp.json--pathserver
# Machine-readable report to a fileverityscan--path.--formatjson--outputfindings.json
# Brownfield baseline capture and CI regression gateverityscan--path.--offline--save-baseline.verity-baseline.json
verityscan--path.--offline--baseline.verity-baseline.json--fail-on-new--fail-on-severityHIGH
# CI gate (greenfield)verityscan--path.--offline--fail-on-findings
# Code-scanning upload [Pro]verityscan--path.--formatsarif--outputverity.sarif
# Live probing of referenced endpointsverityscan--path.--config-file.mcp.json--live-probe
# Filter clients and include global npm packagesverityscan--clientclaude-codecursor--scan-global--offline
# CycloneDX 1.6 (inventory-only vs vuln-enriched) and SPDX 2.3 SBOMverityscan--offline--formatcyclonedx--outputbom.cdx.json
verityscan--offline--formatcyclonedx--scannersvuln--outputbom-vulns.cdx.json
verityscan--offline--formatspdx--outputbom.spdx.json
# OWASP MCP Top 10 compliance scorecard & gateverityscan--path.--offline--complianceowasp-mcp-top-10--fail-on-non-compliant
# Inventory drift baseline & CI gate (exits 2 on drift)verityscan--offline--save-inventory-baseline.verity-inventory.json
verityscan--offline--compare-inventory-baseline.verity-inventory.json--fail-on-drift
Schema (verity-baseline.v1.json): --save-baseline writes schema_version: "1.0", generated_by, and deterministic entries sorted by (file_path, rule_id, fingerprint) atomically via a temporary file and os.replace(). No scan_duration_ms, timestamps, absolute machine paths, or plaintext secrets are stored.
Pre-redaction fingerprints (verity:v1:<16-hex>_<occ>): Computed before secret scrubbing so AST findings survive line shifts, duplicate findings disambiguate via _0/_1, and rotating a secret invalidates its baseline entry without storing plaintext credentials.
Schema-mismatch guard (exit 2): verity scan --baseline rejects verity test rug-pull hash maps ({tool: sha256}) with exit code 2, and verity test --baseline rejects verity-baseline.v1.json scan baselines with exit code 2.
[[ignore]]: match by id (including OSV/CVE aliases), paths, servers, or fingerprint, with reason and optional expires = "YYYY-MM-DD". Expired rules re-activate findings and emit expired_ignore_warnings.
[[allowlists]]: match paths, servers, stopwords, and regexes against regex_target (secret, match, or line) with description.
Inline suppressions: # verity-ignore, # verity-ignore: RULE_1, RULE_2 -- <reason>, and # nosemgrep: <rule-id> on the finding line or immediately preceding line tag findings with suppression: {"kind": "inSource", "source": "inline", ...} unless --no-inline-ignores is set. --strict-policy requires a non-empty reason / description.
verity 0.2.2 — scan
root: /Users/ivan/app
mode: offline (no live probes)
SEVERITY COUNT
critical 1
high 2
medium 3
low 0
info 1
total 7
CRITICAL VERITY-STATIC-SHELL-DROPPER .mcp.json:12 shell: true with interpolated env var
HIGH SEC-STATIC-SECRET-IN-CONFIG .mcp.json:8 hard-coded API token
MEDIUM VERITY-AST-CWE-89-SQLI app/db.py:58 f-string used in cursor.execute
duration: 1.2s files: 812 configs: 4
Counts per severity, suppressed_counts (baseline, ignore_file, policy, inline, other, total), optional new_findings / baseline_findings / resolved_since_baseline, and expired_ignore_warnings
findings
array
Active finding objects (see below)
suppressed_findings
array
Suppressed finding objects with suppression metadata (present when --show-suppressed is set)
Finding object fields:
Field
Type
Description
id
string
Rule identifier, e.g. VERITY-STATIC-SHELL-DROPPER or VERITY-STATIC-TOOL-POISONING
severity
enum
critical, high, medium, low, info
title
string
Short human description
location
object
file, line, column
evidence
string
Snippet explaining the match
remediation
string
Suggested fix
fingerprint
string
sha256: hash of rule, location, evidence
{"schema_version":"1.0","tool":{"name":"verity","version":"0.2.2"},"scan":{"path":"/Users/ivan/app","offline":true,"live_probe":false,"duration_ms":1240},"summary":{"critical":1,"high":2,"medium":3,"low":0,"info":1,"total":7},"findings":[{"id":"VERITY-STATIC-SHELL-DROPPER","severity":"critical","title":"Shell execution with interpolated input","location":{"file":".mcp.json","line":12,"column":5},"evidence":"\"command\": \"npx ... --token $TOKEN\"","remediation":"Pass arguments as an array and avoid shell interpretation.","fingerprint":"sha256:6f1c...e9"}]}
SARIF 2.1.0 export (--format sarif) is a [Pro] feature requiring verity-pro. When verity-pro is absent, Free emits the deterministic PRO_FEATURE_REQUIRED JSON payload ("ok": false, "verdict": "PRO_REQUIRED", "error": "PRO_FEATURE_REQUIRED"), exits with code 2, and writes zero partial files even when --output is supplied. When verity-pro is installed, --format sarif and ComplianceReportEngine.generate_bundle() emit one run per invocation, one rule per finding identifier, and one result per finding with exact physicalLocation.region.startLine (falling back to 1 when line info is absent) and artifactLocation.uri, alongside OSV v1.6.0 records storing AIVSS under database_specific.aivss.
Field
Value
version
2.1.0
runs[0].tool.driver.name
verity
runs[0].tool.driver.version
scanner version
runs[0].results[].ruleId
finding id
runs[0].results[].level
critical/high → error, medium → warning, low/info → note
{"version":"2.1.0","runs":[{"tool":{"driver":{"name":"verity","version":"0.2.2"}},"results":[{"ruleId":"VERITY-STATIC-SHELL-DROPPER","level":"error","message":{"text":"Shell execution with interpolated input"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":".mcp.json"},"region":{"startLine":12,"startColumn":5}}}],"partialFingerprints":{"verityFingerprint":"sha256:6f1c...e9"}}]}]}
Scan completed; no blocking active findings (or gate threshold not exceeded)
1
Active findings met or exceeded --fail-on-severity/--fail-on/--fail-on-findings, --fail-on-non-compliant failed, or new findings appeared with --baseline --fail-on-new
2
Usage error, missing --config-file/--config/--ignore-file/--baseline, baseline schema mismatch, --strict-policy error, inventory drift (--fail-on-drift), or gated [Pro] feature such as --format sarif (PRO_FEATURE_REQUIRED, zero partial file writes)
Runs isolated payload tests for CWE-89 (SQL injection), CWE-639 (insecure direct object reference), CWE-943 (NoSQL injection), and CWE-94 (code injection). Payloads are evaluated locally; --url is the only mode that performs network I/O.
# Every demo caseveritytest--demo
# A single demo targetveritytest--demo--targetsqlite-basic
veritytest--demo--targetpostgres-basic
veritytest--demo--targetmongo-basic
veritytest--demo--targetcode-exec-basic
# SQL injection against a dialectveritytest--sql"SELECT * FROM users WHERE name = '%s'"--dialectpostgres
veritytest--sql"SELECT * FROM users WHERE name = '%s'"--dialectsqlite
# Probe a live MCP SSE endpointVERITY_TEST_AUTHORIZATION="Bearer $TOKEN"\veritytest--urlhttp://127.0.0.1:8000/sse
# Command probeveritytest--command'python3 server.py'# JSON outputveritytest--demo--formatjson--outputtests.json
# Baseline MCP tool hashes, then gate on driftveritytest--command'python3 server.py'--save-baseline.verity-test-baseline.json
veritytest--command'python3 server.py'--baseline.verity-test-baseline.json
{"schema_version":"1.0","tool":{"name":"verity","version":"0.2.2"},"suite":"demo","cases":[{"cwe":"CWE-89","status":"vulnerable","payload":"' OR 1=1 --","evidence":"tautology accepted by evaluator","duration_ms":3}],"summary":{"vulnerable":1,"patched":0,"skipped":0,"error":0},"baseline":null}
Requires verity-pro; in Free, --format sarif emits "ok": false, "verdict": "PRO_REQUIRED", "error": "PRO_FEATURE_REQUIRED", exits with code 2, and writes no partial file even when --output is supplied.
When verity-pro is installed, emitted as OASIS SARIF 2.1.0 with exact physicalLocation.region.startLine (falling back to 1 when line info is absent) and artifactLocation.uri, suitable for GitHub code scanning, Azure DevOps, and DefectDojo.
ComplianceReportEngine.generate_bundle() additionally pairs SARIF 2.1.0 with OSV v1.6.0 records that store AIVSS under database_specific.aivss.
tool.driver.rules is populated once per distinct finding identifier.
results[].partialFingerprints.verityFingerprint enables deduplication across runs.
Severity mapping is fixed: critical/high → error, medium → warning, low/info → note.
Use --baseline .verity-baseline.json --fail-on-new on long-lived brownfield branches to block only regressions, paired with --fail-on-severity HIGH when prioritizing high-impact issues.
Use --fail-on-findings without a baseline only on greenfield repositories.
Always pair --output with an artifact upload; exit codes alone discard evidence.
Keep --offline in CI unless the job is explicitly authorized to probe live endpoints.