CLI
CLI reference
crp-scan / cveriskpilot-scan@cveriskpilot/scan. The CLI scans dependencies, secrets, and IaC, then maps findings to NIST 800-53, SOC 2, CMMC, FedRAMP, ASVS, and SSDF controls.Installation
Install globally, run with npx, or clone from GitHub.
npm install -g @cveriskpilot/scannpx @cveriskpilot/scan@latest --preset startupgit clone https://github.com/devbrewster/cveriskpilot-scan.git
cd cveriskpilot-scan
npm linkQuick Start
Common commands to get started quickly. Both crp-scan and cveriskpilot-scan are valid binary names.
crp-scan --preset startupcrp-scan --preset all --verbosecrp-scan --deps-only --ci --fail-on CRITICALcrp-scan --secrets-only --format jsoncrp-scan --preset defense --exclude "**/test/**" --format sarif# JSON — full findings + compliance impact
crp-scan --format json > scan-results.json
# SARIF — upload to GitHub Code Scanning
crp-scan --format sarif > results.sarif
# Markdown — paste into PR comments or wiki
crp-scan --format markdown > compliance-report.md
# Pipe JSON to jq for quick queries
crp-scan --format json | jq '.complianceImpact.frameworkSummary'crp-scan --preset enterprise --api-key $CRP_API_KEY --client "Acme Production"crp-scan --client "Acme Production" --preset startup --save-profile
crp-scan rerunCLI Flags
All available flags organized by category.
Commands
| Flag | Description |
|---|---|
crp-scan [dir] | Scan the directory (default: the current one). With an API key, the scan is uploaded. |
crp-scan rerun [dir] | Scan again with the project's saved profile, or, without one, the options of the last scan of that directory, and upload. Needs an API key unless you add --no-upload, and exits with code 3 when nothing reaches the dashboard. |
Scanner Control
| Flag | Description |
|---|---|
--deps-only | Run dependency (SBOM) scan only. Skips secrets and IaC checks. |
--secrets-only | Run secrets scan only. Detects API keys, tokens, and credentials using 30+ regex patterns and entropy detection. |
--iac-only | Run Infrastructure as Code scan only. Checks Terraform, Dockerfile, Kubernetes YAML, and CloudFormation. |
--api-routes | Run the API route security scan only (Next.js route handlers). |
Framework Selection
| Flag | Description |
|---|---|
--frameworks <list> | Comma-separated list of frameworks to map findings against. Options (13): nist-800-53, soc2-type2, cmmc-level2, fedramp-moderate, owasp-asvs, nist-ssdf, gdpr, hipaa, pci-dss, iso-27001, nist-csf, eu-cra, nis2. Short aliases such as nist, soc2, cmmc, fedramp, asvs, ssdf, pci, iso and csf also work. |
--preset <name> | Load a predefined set of frameworks. See framework presets table below. |
--list-frameworks | Print all available frameworks and presets, then exit. |
Filtering
| Flag | Description |
|---|---|
--severity <level> | Minimum severity threshold. Options: INFO, LOW, MEDIUM, HIGH, CRITICAL. Findings below this level are left out of the output (not out of the upload). |
--exclude <glob> | Exclude file paths matching the glob pattern from the secrets and IaC scanners. Repeatable (e.g., --exclude node_modules --exclude dist). This changes what is scanned: after you add a pattern, uploaded findings under the newly excluded paths close as fixed, pending verification. |
--exclude-cwe <list> | Comma-separated list of CWE IDs to exclude from results (e.g., --exclude-cwe CWE-79,CWE-89). |
Output
| Flag | Description |
|---|---|
--format <type> | Output format. Options: table (default), json, sarif, markdown. |
--fail-on <level> | Exit with code 1 if any finding meets or exceeds this severity. Options: INFO, LOW, MEDIUM, HIGH, CRITICAL (default). Any other value is an error. |
--ci | CI mode. JSON output, no progress display, deterministic exit codes. An explicit --format or --fail-on still applies. Recommended for automated pipelines. |
--verbose | Enable verbose output. Shows detailed scan progress, file-by-file results, and timing information. |
Upload
| Flag | Description |
|---|---|
--api-key <key> | CVERiskPilot API key. When a key is set, every scan is uploaded to your workspace, including a scan with no findings. Can also be set via the CRP_API_KEY environment variable. |
--api-url <url> | API endpoint URL. Defaults to https://cveriskpilot.com (the CRP_API_URL environment variable also sets it). Override only if CVERiskPilot support gives you a different endpoint. It must be https; plain http is accepted only for localhost, so the API key is never sent unencrypted. |
--client <id|name> | Client to upload into: its id or exact name. Also CRP_CLIENT. Optional when your organization, or the API key, has exactly one client; otherwise the upload is refused with CLIENT_REQUIRED. |
--asset <name> | Asset the scan covers. Default: the git remote as host/owner/repo (plus the sub-directory when you scan part of a monorepo), else the directory name. |
--fail-on-upload-error | Exit with code 3 when nothing reaches the dashboard (the upload failed, or no scanner produced complete results to send) and the scan itself passed. Without it, the error is printed and the exit code reflects the scan only. |
--no-upload | Skip uploading results to CVERiskPilot. Scan results are printed locally only. |
--dry-run | Preview results without uploading or saving anything; --save-profile is skipped too. |
Profiles
| Flag | Description |
|---|---|
--save-profile | Save the current options to .cveriskpilot.json in the project root: scanners, preset or frameworks, severity, fail-on, excludes, client and asset. The API key and URL are never saved, and neither is a client that came only from CRP_CLIENT. |
--no-profile | Ignore .cveriskpilot.json for this run. |
Uploading to CVERiskPilot
With an API key, each scan becomes an upload in your workspace. Its findings and cases appear under Findings and Cases, the upload page shows the repository, commit and branch, and the pass/fail verdict also appears on the Pipelines page. The CLI prints the link after the upload, on stderr, so JSON and SARIF output stay clean.
Uploaded 12 findings to CVERiskPilot (client "Acme Production", asset "github.com/acme/web").
Dashboard: https://cveriskpilot.com/upload/<job id>
Pipeline: https://cveriskpilot.com/pipelines/<scan id>Fixed findings move to verification
Every upload names the asset it scanned and the scanners that ran. When a newer scan of the same asset and scanners no longer reports a finding, CVERiskPilot marks it resolved and moves its case to Fixed, pending verification for a person to confirm. A finding that comes back reopens its case. To keep that accurate:
- A scan with no findings is uploaded too, so the last open findings can close.
- The upload carries every finding the scanners reported. --severity, --exclude-cwe and --since change only what is printed and what fails the run. --exclude is different: it changes which files are scanned, so findings under newly excluded paths close like fixed ones.
- The asset name is the same on every machine: the git remote as host/owner/repo, with credentials removed, plus the sub-directory for a monorepo package; without a remote, the directory name. Local paths are never sent.
- If dependency advisories could not be checked for every package, the dependency results are left out of the upload, with a warning, so earlier results stay open. If only npm audit fails, the OSV results are uploaded and the findings npm audit reported before stay open.
Upload from the default branch
An upload updates the dashboard's findings for its asset, so upload scans of the code you ship: pushes to the default branch and scheduled scans. A pull request or feature-branch build scans code that is not merged; uploaded, it could close a default-branch finding the branch happens to fix, or open cases for code that never merges. In CI, give the API key only to default-branch jobs. Pull request runs still gate the build without it. CVERiskPilot adds a CI scan to the dashboard only when it is known to be of the default branch: GitHub Actions and GitLab CI normally report it; elsewhere a build of main or master counts, and for another default branch set CI_DEFAULT_BRANCH in the job. Other scans keep their verdict under Pipelines, and the CLI says so.
Repository metadata and errors
Uploads carry the repository URL (never with credentials), commit, branch, whether it is the default branch, and the pull request number, read from git and from GitHub Actions, GitLab CI, Azure Pipelines, CircleCI, Bitbucket, Buildkite and Jenkins variables. If an upload fails, the CLI prints the endpoint, the status, the server's error code and message, and what to do next, such as passing --client when the answer is CLIENT_REQUIRED.
Saved profiles and re-runs
--save-profile writes the options of the current run to .cveriskpilot.json in the project root. Commit it and every scan of the project, local or in CI, uses the same options (flags, and GitHub Action inputs that are set, still win). crp-scan rerun scans again with the profile, or with the options of the last scan of that directory, and uploads; it exits with code 3 when nothing reaches the dashboard.
{
"version": 1,
"scanners": ["deps", "secrets", "iac"],
"preset": "startup",
"failOn": "HIGH",
"exclude": ["test/**"],
"client": "Acme Production",
"asset": "github.com/acme/web"
}Precedence: command-line flags, then the CRP_CLIENT environment variable, then the profile, then the defaults. A flag replaces the profile's value, and --preset or --frameworks replaces its whole framework selection. The API key and API URL are never read from the profile, and a client set only through CRP_CLIENT is never written to it.
Framework Presets
Presets bundle multiple frameworks into a single --preset flag. Use --list-frameworks to see all available options. Without an API key, the default table output shows control IDs for the core six frameworks (NIST 800-53, SOC 2, CMMC, FedRAMP, ASVS, SSDF) and only an affected-control count for the other seven; add a CVERiskPilot API key from any plan, Free included, to see every control ID.
| Preset | Frameworks | Use Case |
|---|---|---|
federal | NIST 800-53, FedRAMP, SSDF | Federal agencies and contractors subject to FISMA and FedRAMP requirements. |
defense | NIST 800-53, CMMC, SSDF | Defense Industrial Base (DIB) contractors pursuing CMMC certification. |
enterprise | NIST 800-53, SOC 2, ASVS, SSDF | Enterprise organizations with SOC 2 audit requirements and secure development practices. |
startup | SOC 2, ASVS | Startups and SaaS companies building toward SOC 2 compliance. |
devsecops | ASVS, SSDF | Development teams focused on secure coding standards and software supply chain security. |
healthcare | HIPAA, NIST 800-53 | Healthcare organizations and business associates subject to the HIPAA Security Rule. |
payments | PCI DSS, NIST 800-53, SOC 2 | Merchants and payment service providers working toward PCI DSS 4.0. |
international | ISO 27001, GDPR, NIS2 | Organizations aligning to ISO/IEC 27001 and European data-protection and cybersecurity rules. |
eu-compliance | GDPR, EU CRA, NIS2 | Products and services sold into the EU under GDPR, the Cyber Resilience Act and NIS2. |
all | All 13: NIST 800-53, SOC 2, CMMC, FedRAMP, ASVS, SSDF, GDPR, HIPAA, PCI DSS, ISO 27001, NIST CSF 2.0, EU CRA, NIS2 | Map findings against all 13 implemented frameworks. |
Output Formats
Set the output format with --format <type>. The default is table.
| Format | Description |
|---|---|
table | Color-coded severity badges with per-finding compliance control mapping (e.g., SOC 2 Type II:CC6.1, OWASP ASVS:V1.2). Adapts to terminal width — no information gets cut off. |
json | Structured JSON with full finding details (CWE/CVE IDs), severity summary, verdict breakdown, and complete compliance impact per framework. Pipe to jq or save with > scan-results.json. |
sarif | SARIF 2.1.0 for GitHub Code Scanning, GitLab SAST, and Azure DevOps. Save with > results.sarif. |
markdown | Markdown tables with findings, compliance impact, and summary. Save with > compliance-report.md for PR comments or wiki pages. |
Exit Codes
Use exit codes to gate CI/CD pipelines. Combine with --fail-on and --ci for deterministic behavior.
| Code | Status | Description |
|---|---|---|
0 | PASS | Scan completed successfully. No findings met the --fail-on threshold (or no threshold was set). |
1 | FAIL | Scan completed but one or more findings met or exceeded the --fail-on severity threshold. |
2 | ERROR | Scan could not complete due to an error (invalid arguments, missing files, runtime failure). |
3 | UPLOAD | The scan passed but nothing reached CVERiskPilot: the upload failed, or no scanner produced complete results to send. Only with --fail-on-upload-error, and always for crp-scan rerun. |
How Compliance Mapping Works
Every finding that carries a mapped CWE follows a deterministic chain from vulnerability to compliance control, through NIST 800-53. Without an API key, the table output shows control IDs for the core six frameworks (NIST 800-53, SOC 2, CMMC, FedRAMP, ASVS, SSDF); add an API key from any plan to see all 13. Across those six, 71 CWEs map to 77 distinct controls (119 across all 13). Dependency findings use the CWEs on their advisory; when an advisory lists none, the CLI tags the finding CWE-829, CWE-1104 and CWE-502.
For example, a hardcoded API key (CWE-798) maps to NIST 800-53 control IA-5 (Authenticator Management), which then maps to SOC 2 CC6.1, CMMC IA.L2-3.5.3, and corresponding FedRAMP and ASVS controls. CWE-798 also maps to CM-6 and SA-15, which bring in further controls, including SSDF PO.3. This chain is fully offline and deterministic — no network calls required.
| Finding | CWE | NIST 800-53 | SOC 2 | CMMC |
|---|---|---|---|---|
| Hardcoded API Key | CWE-798 | IA-5, CM-6, SA-15 | CC6.1, CC8.1 | IA.L2-3.5.3, CM.L2-3.4.2, CA.L2-3.12.1 |
| SQL Injection | CWE-89 | SI-10, SA-11 | CC6.8, CC8.1 | SI.L2-3.14.1, CA.L2-3.12.1 |
| Cross-Site Scripting | CWE-79 | SI-10, SC-18 | CC6.8 | SI.L2-3.14.1, SI.L2-3.14.2 |
| Dockerfile Running as Root | CWE-269 | AC-6 | CC6.1 | AC.L2-3.1.5 |
Dependencies (SBOM)
Supported lockfiles: package-lock.json, yarn.lock, requirements.txt, Cargo.lock, go.sum
Secrets Detection
30+ regex patterns plus entropy detection for API keys, tokens, passwords, and credentials
Infrastructure as Code
Terraform, Dockerfile, Kubernetes YAML, and CloudFormation template scanning
Next Steps
Pipeline Setup Guide
Step-by-step guide to integrate crp-scan into your CI/CD pipeline.
Open pageGitHub Action
Wire the scanner into GitHub workflows with the hosted action path.
Open pageStart Audit Readiness trial
Create a workspace, begin a 14-day Audit Readiness trial, and create an API key in Settings.
Start Audit Readiness trial