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.

This guide walks you from a fresh install to a completed dry-run scan. By the end you will have Warden installed globally, your environment validated, a set of scan artifacts written to scan-results/, and a clear picture of what a CI-mode run looks like. No GitHub token or Snyk account is required for the dry-run steps.
Dry-run mode (--dry-run) never creates branches, commits, or pull requests. It is always safe to run against any local repository — including repositories with uncommitted changes.
1

Install Warden

Install Warden globally from the npm registry:
npm install -g @devdonzo/warden
Confirm the installation succeeded:
warden --version
You should see the current version number (1.8.0 or later). If the command is not found, ensure your global npm bin directory is on your PATH.
2

Validate your environment

Before running a scan, check that all required tools and credentials are present:
warden validate
warden validate runs four checks in sequence:
CheckWhat it inspects
EnvironmentGITHUB_TOKEN, SNYK_TOKEN, .env file presence
Dependenciesgit, node, npm, snyk, pip-audit, gh in PATH
Git repository.git directory, configured remotes, uncommitted changes
Project manifestpackage.json (Node.js) or requirements.txt / pyproject.toml (Python)
Errors block the scan by default. Warnings are informational — missing SNYK_TOKEN is a warning, not a hard failure, because Warden will fall back to npm-audit automatically.To check your environment in more detail, including Node.js version, Git, npm, and token status, run:
warden doctor
3

Run a dry-run scan

Run a safe dry-run scan against the current directory using npm-audit as the scanner:
warden scan . --dry-run --scanner npm-audit --severity high --max-fixes 2
Flag breakdown:
FlagEffect
--dry-runPlan fixes without creating branches, commits, or PRs
--scanner npm-auditUse npm audit as the vulnerability scanner
--severity highOnly select findings at high severity or above
--max-fixes 2Attempt at most 2 automated fixes per run
Warden will run pre-flight validation, invoke the scanner, triage findings against policy, plan remediations, write artifacts to scan-results/, and print an agentic assessment to the terminal. Because --dry-run is set, no code is modified.Other valid scanner values are snyk, pip-audit, and all. Valid severity levels are low, medium, high, and critical.
4

Review the output artifacts

After the scan completes, inspect the scan-results/ directory:
ls scan-results/
Warden writes a consistent set of artifacts on every run. The table below describes each file:
ArtifactPurpose
scan-results.jsonNormalized scanner output with all vulnerability fields
warden-report.mdHuman-readable operator report with findings, posture, and remediation summary
scan-results.htmlStandalone HTML version of the operator report
agent-run-record.jsonAgent handoff record: findings, attempted fixes, applied fixes, policy decisions, and why-it-matters context
warden-approval-request.jsonWritten when policy blocks risky remediation pending human approval
history.jsonLongitudinal run history with trend data (improving, worsening, unchanged)
memory.jsonRecurring vulnerable package memory with per-package occurrence counts
.warden-baseline.jsonAccepted-risk baseline (written by warden baseline --create, not the scan command)
The JSON artifacts conform to schemas in the schemas/ directory of the Warden package. Any CI job, dashboard, or downstream agent can consume them without parsing terminal output.Open the HTML report in a browser for a formatted view:
open scan-results/scan-results.html
5

Run with CI policy gates

Once you are comfortable with the dry-run output, run with CI mode enabled to see deterministic exit codes in action:
warden scan . --ci --json --scanner npm-audit --severity high
Additional flags:
FlagEffect
--ciEnable CI policy gates; exit with a non-zero code if policy fails
--jsonPrint the full run result as JSON to stdout instead of the interactive console output
Exit code contract:
CodeMeaning
0Scan complete, policy passed
1Fatal error during scan
2Baseline regression detected (used by warden baseline --check)
Non-zero set by policyPipeline failure threshold crossed (severity gate, posture gate)
In CI, the --json flag suppresses all interactive output and writes a single JSON object to stdout. This makes it straightforward to pipe results to jq, upload them as artifacts, or feed them to a downstream job.

Output Artifacts Reference

Every Warden scan writes the following files into scan-results/ in the project root:
ArtifactFormatAlways written
scan-results.jsonJSON
warden-report.mdMarkdown
scan-results.htmlHTML
agent-run-record.jsonJSON
warden-approval-request.jsonJSONOnly when policy blocks remediation
history.jsonJSON
memory.jsonJSON
.warden-baseline.jsonJSONOnly after warden baseline --create
Set a GITHUB_TOKEN environment variable (or add it to .env) to unlock branch creation and automatic pull request generation. When GITHUB_TOKEN is present and --dry-run is not set, Warden pushes fix branches and opens PRs with full vulnerability context as the PR body.

Build docs developers (and LLMs) love