Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/DevDonzo/warden/llms.txt

Use this file to discover all available pages before exploring further.

warden scan is Warden’s primary command. It runs a vulnerability scanner against a local repository or a remote GitHub repository, hands the results to the AI orchestrator for risk assessment, applies up to a configurable number of auto-fixes, and optionally creates GitHub pull requests. In CI mode it emits a non-zero exit code whenever a policy gate is triggered, making it suitable for blocking pipelines on newly introduced risk.

Synopsis

warden scan [repository] [options]

Arguments

repository
string
A GitHub repository URL (e.g. https://github.com/owner/repo) or a local filesystem path (e.g. ./my-project or an absolute path). When omitted, Warden targets the current working directory. GitHub URLs are validated for format and sanitized before use.

Flags

--scanner
string
default:"snyk"
The vulnerability scanner to run. Accepted values: snyk, npm-audit, pip-audit, all. Use pip-audit for Python projects, npm-audit for Node.js projects without a Snyk token, and all to run every available scanner.
--severity
string
default:"high"
Minimum vulnerability severity to include in the fix pipeline. Accepted values: low, medium, high, critical. Vulnerabilities below this threshold are still reported but not acted upon.
--max-fixes
number
default:"1"
Maximum number of vulnerability fixes to apply in a single run. Keeping this low reduces the blast radius of automated changes.
--dry-run
boolean
Preview the changes Warden would make — including which vulnerabilities would be fixed and which PRs would be opened — without actually creating branches or pull requests.
--ci
boolean
Enable CI policy gates. When a policy gate is triggered (e.g. unresolved critical vulnerabilities above the severity threshold), Warden exits with code 2 instead of 0. Use this in automated pipelines to block merges on policy failures.
--approval-token
string
A human-in-the-loop approval token. Pass the string approved to satisfy the approval gate and allow risky remediations to proceed that would otherwise be blocked by policy.
--skip-validation
boolean
Skip the pre-flight environment validation step. Use only when you are certain the environment is correctly configured and want to speed up runs.
--json
boolean
Emit the full scan result as JSON to stdout instead of formatted log output. Quiet mode is automatically enabled when this flag is set.
-v, --verbose
boolean
Enable verbose debug logging. Prints internal orchestrator steps, agent reasoning, and tool invocations.
-q, --quiet
boolean
Suppress non-essential output including the Warden banner and section headers. Useful for scripting.

Examples

warden scan --dry-run

Output sections

When running without --json, Warden prints structured sections as the orchestration pipeline progresses:
SectionDescription
🔍 Pre-flight ValidationEnvironment checks for Git, tokens, and project structure. Skipped with --skip-validation.
🧠 Agentic AssessmentAI-generated risk posture (critical / elevated / guarded / stable), risk score (0–100), and a plain-English summary.
📈 TrendCompares the current run against historical data — improving, worsening, unchanged, or first-run.
🧠 MemoryPersistent hotspot tracking: packages that appear repeatedly across runs with occurrence counts and last-seen severity.
📝 ReportsPaths to generated Markdown and HTML reports, approval request files, and the agent run record.
🚦 PolicyWhether human approval is required, whether the pipeline should be failed, and the reasons for each decision.
Combine --json with a tool like jq to pipe scan results into custom dashboards or downstream scripts: warden scan --json | jq '.remediationPlan.riskScore'

Exit codes

CodeMeaning
0Scan completed successfully; no policy gate triggered
1Fatal error during scan (misconfiguration, scanner crash, etc.)
2CI policy gate triggered — unresolved risk above threshold (only possible with --ci)
Exit code 2 is only emitted when --ci is passed. Without that flag, Warden always exits with 0 or 1 regardless of findings.

Build docs developers (and LLMs) love