Repository files navigation

VulnCheck Logo

The VulnCheck CLI

vulncheck is access to the VulnCheck API on the command line. It brings index browsing, backup management, and vulnerability scanning to the terminal.

ReleaseGo ReferenceLintTestsPRs Welcome

Installation

Provided install scripts

You can easily install vulncheck using an install script. Choose the script and method that matches your operating system:

macOS and Linux

Open a terminal and run:

curl -sSL https://raw.githubusercontent.com/vulncheck-oss/cli/main/install.sh | bash

This will prompt you to choose between system-wide installation (requires sudo) or local user installation.

Note

The install script also supports non-interactive installation options:

  • --sudo for system-wide installation without prompts
  • --non-sudo for local user installation without prompts
  • --help or -h to see all available options
curl -sSL https://raw.githubusercontent.com/vulncheck-oss/cli/main/install.sh | bash -s -- --help

Windows

Open PowerShell and run:

iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/vulncheck-oss/cli/main/install.ps1'))

vulncheck binaries are also available for MacOS, Linux, and Windows. You can download precompiled binaries from our releases page

Verify the installation

Once installed, confirm the binary prints the desired version:

vulncheck version

You should see the version, build date, and changelog URL. If you get "command not found", reopen your shell so the new PATH is picked up, then try again.

Configuration

  • Run vulncheck auth login to authenticate with your VulnCheck account.
  • Alternatively vulncheck will respect the VC_TOKEN environment variable.
  • vulncheck auth by itself will show other options like checking your status and logging out.

VC_TOKEN wins over the saved config file. Because of that, auth login and auth logout refuse while it is set — otherwise they would report success having changed nothing that takes effect. Run vulncheck auth status to see which of the two sources the active token came from.

Agentic / scripted usage

The CLI is designed to be safe to drive from scripts and AI agents. This section is the contract — the surfaces below are intended to remain stable across releases (additions are not breaking changes; renames / removals are).

Global flags

FlagEffect
--jsonEmit JSON on stdout; route info/progress lines to stderr; errors emitted as a structured envelope.
--quietSuppress informational output. Errors and payloads still render.
--no-colorDisable ANSI styling. Also honours the NO_COLOR env var.
--no-interactiveRefuse to block on TUI prompts; commands that need a prompt return an error instead. Implied by --json, non-TTY stdin/stdout, and any of the CI / BUILD_NUMBER / RUN_ID env vars.

Environment variables

VariableEffect
VC_TOKENAPI token. Takes precedence over ~/.config/vulncheck/vulncheck.yaml. While it is set, auth login and auth logout refuse rather than writing a config file that would be ignored — unset VC_TOKEN first.
NO_COLORAny non-empty value disables ANSI styling.
CI / BUILD_NUMBER / RUN_IDAny of these set implies non-interactive mode (no prompts).

Exit codes

CodeMeaning
0Success.
1Generic / internal error.
2Validation failure (bad args, missing required flag, malformed request).
3Auth failure (no token, or the server rejected the token).
4Resource not found (HTTP 404, no such index).
5Rate limited (HTTP 429).
6Network failure (DNS, connection refused, timeout).
130Cancelled by SIGINT (POSIX 128 + 2).

Error envelope

In --json mode, errors are emitted to stdout as:

{
"schema_version": 1,
"error": {
"code": "auth_required",
"message": "...",
"http_status": 401,
"hint": "..."
}
}

code is one of: internal, validation, auth_required, auth_invalid, not_found, rate_limited, network, bad_request, cancelled. http_status is omitted for non-HTTP errors. hint is optional remediation context — present only when the message alone isn't actionable (e.g. naming VC_TOKEN as the source of a rejected token) — and is rendered on stderr as hint: ... outside --json mode.

Probe commands

Use these to inspect the CLI itself before dispatching work:

vulncheck version --json
# {"schema_version": 1, "version": "...", "build_date": "...", "changelog_url": "..."}
vulncheck auth status --json
# {"schema_version": 1, "authenticated": true, "token_source": "env", "user": "...", "email": "..."}# Exit 0 even when authenticated=false — agents dispatch on the bool.# token_shadowed: true is added when VC_TOKEN is overriding a *different*# token saved in vulncheck.yaml — the usual cause of "I logged in but# nothing changed". Omitted otherwise, so the CI shape (VC_TOKEN only,# no config file) never reports shadowing.
vulncheck commands
# {"schema_version": 1, "root": {"name":"vulncheck", "subcommands":[...]}, ...}# Machine-readable dump of the whole command tree — every subcommand,# every flag (with type + default + usage), aliases, deprecation. Use# this instead of parsing --help. Auth is not required.

Pagination

vulncheck token list --json --limit 10 --page 2
vulncheck token list --json --all # auto-paginate, single combined array
vulncheck index list <index> --json --all

Batch input

purl, cpe, tag, pdns accept multiple inputs via positional args, stdin (when piped), or --from-file <path>. Blank lines and #-prefixed comments in the file are ignored. Batch mode requires --json.

# Stdin
cat purls.txt | vulncheck purl --json
# File
vulncheck cpe --from-file ./cpes.txt --json

The batch envelope is a stable array, one row per input, in input order:

[
{"input": "pkg:npm/lodash@4.0.0", "data": { ... }},
{"input": "pkg:bad/string", "error": "no result returned for this purl"}
]

Cancellation

SIGINT / SIGTERM cancel in-flight HTTP requests cleanly via context propagation. Long-running ops (scan, offline sync, backup download) honour cancellation; partial files are removed on the way out where applicable.

JSON output discipline

When --json is set:

  • stdout carries only the JSON payload (or the error envelope above).
  • stderr carries every info line, progress bar, spinner, prompt, and warning.
  • TUI elements (bubbletea, huh prompts) are automatically suppressed.

This means vulncheck <cmd> --json | jq always works — no tail/sed cleanup needed.

Available commands

Every command below accepts the global flags (--json, --quiet, --no-color, --no-interactive, --help/-h). Per-command flag tables list only what is specific to that command.

  • auth — log in / out, check status
  • token — API token management
  • indices — list or browse the catalogue of indices
  • index — query one index
  • backup — download or fetch a signed URL for an index backup
  • cpe — look up CVEs for a CPE (single or batch)
  • purl — look up CVEs for a PURL (single or batch)
  • tag — look up IP-intelligence tag membership
  • pdns — look up passive-DNS list membership
  • rule — look up initial-access-intelligence rules
  • scan — scan a directory (SBOM + vulnerability lookup)
  • offline — sync indices locally and query them without hitting the API
  • version — print the CLI version
  • upgrade — update the CLI in place

auth

vulncheck auth login
vulncheck auth logout
vulncheck auth status [--json]

login walks you through a browser or paste-token flow — refuses when --no-interactive. status --json calls /me to actually verify the token; the payload always has .authenticated: bool and exits 0 regardless (see Probe commands).

token

vulncheck token list [--limit N] [--page N] [--all]
vulncheck token create <label>
vulncheck token remove <id>
vulncheck token browse

list --json --all auto-paginates and returns one combined JSON array.

create --json returns {schema_version, id, label, token_on_stderr: true} and prints the actual secret on a single line to stderr. That way a pipeline like vulncheck token create ci-runner --json > token.json never captures the secret in the JSON file. Pass --allow-token-on-stdout if you want the token embedded in the JSON payload instead ({... "token": "vc_..."}) — you're taking responsibility for the redirection.

browse is interactive; it refuses with exit 2 under --no-interactive.

indices

vulncheck indices list [<search>]
vulncheck indices browse [<search>]

Lists (or interactively browses) the catalogue of available indices. list accepts a fuzzy search term.

index

vulncheck index list <index> [--full] [--all] [query flags]
vulncheck index browse <index> [query flags]

list --all walks next_cursor end-to-end and emits one combined array. browse runs an interactive viewport; under --json (or --no-interactive) it falls back to list output. Query flags come from the index's schema (--cve, --alias, --limit, --cursor, etc.); see the API docs for the full set.

backup

vulncheck backup url <index> # signed temporary URL only
vulncheck backup download <index> # download the archive

download picks the bubbletea progress bar for TTYs and a plain SIGINT-safe streaming download (writing to <name>.part and renaming on success) for headless callers. url --json returns {filename, sha256, date_added, url}.

cpe

vulncheck cpe <cpe>
vulncheck cpe --from-file cpes.txt --json
echo cpe:2.3:… | vulncheck cpe --json

Batch mode (multiple positional args, --from-file, or piped stdin) requires --json and returns the stable batch envelope.

purl

vulncheck purl <purl>
vulncheck purl --from-file purls.txt --json

Same batch semantics as cpe. Batch requests are sent as a single /v3/purls POST rather than N GETs.

tag

vulncheck tag <tag-name>
vulncheck tag --from-file tags.txt --json

Returns the newline-split list of matches for the given IP-intelligence tag. Batch input supported.

pdns

vulncheck pdns <list-name>
vulncheck pdns --from-file lists.txt --json

Passive-DNS list membership. Batch input supported.

rule

vulncheck rule <rule-name> [--table]

Look up an initial-access-intelligence rule. --table renders single-column table output; --json (global) supersedes.

scan

vulncheck scan <path> [flags]
vulncheck scan --sbom-input-file <file> --json

Generates an SBOM for <path>, extracts PURLs, then either calls the vulncheck API (default) or queries local offline indices.

FlagDescription
-f, --fileSave results to a file.
-n, --file-nameCustom output filename (default output.json).
-o, --sbom-output-fileSave the generated SBOM to a file.
-i, --sbom-input-fileLoad an existing SBOM instead of generating one.
-s, --sbom-onlyGenerate the SBOM without running the vuln lookup.
-c, --include-cpesExtract CPEs as well as PURLs (offline mode only, for now).
--offlineUse locally-synced indices instead of the API.
--offline-metaPopulate metadata (CVSS, KEV, description) from vulncheck-nvd2 in offline mode.
--warn-on-indexWarn instead of failing when a required offline index isn't cached.
--disable-uiAlias for --no-interactive (kept for backwards compatibility).
--enrichEnrich the generated SBOM with metadata from proxy.golang.org / Maven Central / NPM / PyPI. Comma-separated scopes: all, golang, java, javascript, python; prefix with - to exclude (e.g. all,-java). Off by default; requires network — cannot be combined with --offline or --sbom-input-file.

The progress TUI is auto-suppressed whenever the renderer can't safely draw it (--json, --no-interactive, non-TTY, CI).

offline

vulncheck offline sync [--add <name>|--remove <name>|--purge|--force|--choose] [--json]
vulncheck offline status [--json]
vulncheck offline purl <purl> [--json]
vulncheck offline cpe <cpe> [--json] [--stats]
vulncheck offline ipintel <3d|10d|30d> [--country=...] [--asn=...] [--cidr=...] [--json]

Local queries against synced indices. sync --json returns {schema_version, action, selected, elapsed_seconds}; status --json returns the cached-index array. Under --no-interactive the sync command refuses without an explicit --add / --remove / --purge (no picker prompt).

version

vulncheck version [--json]

--json returns {schema_version, version, build_date, changelog_url} — the canonical probe for agents.

upgrade

vulncheck upgrade status
vulncheck upgrade latest [--force]
vulncheck upgrade --version X.X.X
  • upgrade status — check whether a newer release is available.
  • upgrade latest — install the newest release. --force reinstalls the current version.
  • upgrade --version X.X.X — install a specific version.

Tip

Looking to plug this into your Github Repository? Check out our own Action

About

VulnCheck's official command line tool

Resources

Contributing

Stars

159 stars

Watchers

7 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

Repository files navigation

VulnCheck Logo

The VulnCheck CLI

vulncheck is access to the VulnCheck API on the command line. It brings index browsing, backup management, and vulnerability scanning to the terminal.

ReleaseGo ReferenceLintTestsPRs Welcome

Installation

Provided install scripts

You can easily install vulncheck using an install script. Choose the script and method that matches your operating system:

macOS and Linux

Open a terminal and run:

curl -sSL https://raw.githubusercontent.com/vulncheck-oss/cli/main/install.sh | bash

This will prompt you to choose between system-wide installation (requires sudo) or local user installation.

Note

The install script also supports non-interactive installation options:

  • --sudo for system-wide installation without prompts
  • --non-sudo for local user installation without prompts
  • --help or -h to see all available options
curl -sSL https://raw.githubusercontent.com/vulncheck-oss/cli/main/install.sh | bash -s -- --help

Windows

Open PowerShell and run:

iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/vulncheck-oss/cli/main/install.ps1'))

vulncheck binaries are also available for MacOS, Linux, and Windows. You can download precompiled binaries from our releases page

Verify the installation

Once installed, confirm the binary prints the desired version:

vulncheck version

You should see the version, build date, and changelog URL. If you get "command not found", reopen your shell so the new PATH is picked up, then try again.

Configuration

  • Run vulncheck auth login to authenticate with your VulnCheck account.
  • Alternatively vulncheck will respect the VC_TOKEN environment variable.
  • vulncheck auth by itself will show other options like checking your status and logging out.

VC_TOKEN wins over the saved config file. Because of that, auth login and auth logout refuse while it is set — otherwise they would report success having changed nothing that takes effect. Run vulncheck auth status to see which of the two sources the active token came from.

Agentic / scripted usage

The CLI is designed to be safe to drive from scripts and AI agents. This section is the contract — the surfaces below are intended to remain stable across releases (additions are not breaking changes; renames / removals are).

Global flags

FlagEffect
--jsonEmit JSON on stdout; route info/progress lines to stderr; errors emitted as a structured envelope.
--quietSuppress informational output. Errors and payloads still render.
--no-colorDisable ANSI styling. Also honours the NO_COLOR env var.
--no-interactiveRefuse to block on TUI prompts; commands that need a prompt return an error instead. Implied by --json, non-TTY stdin/stdout, and any of the CI / BUILD_NUMBER / RUN_ID env vars.

Environment variables

VariableEffect
VC_TOKENAPI token. Takes precedence over ~/.config/vulncheck/vulncheck.yaml. While it is set, auth login and auth logout refuse rather than writing a config file that would be ignored — unset VC_TOKEN first.
NO_COLORAny non-empty value disables ANSI styling.
CI / BUILD_NUMBER / RUN_IDAny of these set implies non-interactive mode (no prompts).

Exit codes

CodeMeaning
0Success.
1Generic / internal error.
2Validation failure (bad args, missing required flag, malformed request).
3Auth failure (no token, or the server rejected the token).
4Resource not found (HTTP 404, no such index).
5Rate limited (HTTP 429).
6Network failure (DNS, connection refused, timeout).
130Cancelled by SIGINT (POSIX 128 + 2).

Error envelope

In --json mode, errors are emitted to stdout as:

{
"schema_version": 1,
"error": {
"code": "auth_required",
"message": "...",
"http_status": 401,
"hint": "..."
}
}

code is one of: internal, validation, auth_required, auth_invalid, not_found, rate_limited, network, bad_request, cancelled. http_status is omitted for non-HTTP errors. hint is optional remediation context — present only when the message alone isn't actionable (e.g. naming VC_TOKEN as the source of a rejected token) — and is rendered on stderr as hint: ... outside --json mode.

Probe commands

Use these to inspect the CLI itself before dispatching work:

vulncheck version --json
# {"schema_version": 1, "version": "...", "build_date": "...", "changelog_url": "..."}
vulncheck auth status --json
# {"schema_version": 1, "authenticated": true, "token_source": "env", "user": "...", "email": "..."}# Exit 0 even when authenticated=false — agents dispatch on the bool.# token_shadowed: true is added when VC_TOKEN is overriding a *different*# token saved in vulncheck.yaml — the usual cause of "I logged in but# nothing changed". Omitted otherwise, so the CI shape (VC_TOKEN only,# no config file) never reports shadowing.
vulncheck commands
# {"schema_version": 1, "root": {"name":"vulncheck", "subcommands":[...]}, ...}# Machine-readable dump of the whole command tree — every subcommand,# every flag (with type + default + usage), aliases, deprecation. Use# this instead of parsing --help. Auth is not required.

Pagination

vulncheck token list --json --limit 10 --page 2
vulncheck token list --json --all # auto-paginate, single combined array
vulncheck index list <index> --json --all

Batch input

purl, cpe, tag, pdns accept multiple inputs via positional args, stdin (when piped), or --from-file <path>. Blank lines and #-prefixed comments in the file are ignored. Batch mode requires --json.

# Stdin
cat purls.txt | vulncheck purl --json
# File
vulncheck cpe --from-file ./cpes.txt --json

The batch envelope is a stable array, one row per input, in input order:

[
{"input": "pkg:npm/lodash@4.0.0", "data": { ... }},
{"input": "pkg:bad/string", "error": "no result returned for this purl"}
]

Cancellation

SIGINT / SIGTERM cancel in-flight HTTP requests cleanly via context propagation. Long-running ops (scan, offline sync, backup download) honour cancellation; partial files are removed on the way out where applicable.

JSON output discipline

When --json is set:

  • stdout carries only the JSON payload (or the error envelope above).
  • stderr carries every info line, progress bar, spinner, prompt, and warning.
  • TUI elements (bubbletea, huh prompts) are automatically suppressed.

This means vulncheck <cmd> --json | jq always works — no tail/sed cleanup needed.

Available commands

Every command below accepts the global flags (--json, --quiet, --no-color, --no-interactive, --help/-h). Per-command flag tables list only what is specific to that command.

  • auth — log in / out, check status
  • token — API token management
  • indices — list or browse the catalogue of indices
  • index — query one index
  • backup — download or fetch a signed URL for an index backup
  • cpe — look up CVEs for a CPE (single or batch)
  • purl — look up CVEs for a PURL (single or batch)
  • tag — look up IP-intelligence tag membership
  • pdns — look up passive-DNS list membership
  • rule — look up initial-access-intelligence rules
  • scan — scan a directory (SBOM + vulnerability lookup)
  • offline — sync indices locally and query them without hitting the API
  • version — print the CLI version
  • upgrade — update the CLI in place

auth

vulncheck auth login
vulncheck auth logout
vulncheck auth status [--json]

login walks you through a browser or paste-token flow — refuses when --no-interactive. status --json calls /me to actually verify the token; the payload always has .authenticated: bool and exits 0 regardless (see Probe commands).

token

vulncheck token list [--limit N] [--page N] [--all]
vulncheck token create <label>
vulncheck token remove <id>
vulncheck token browse

list --json --all auto-paginates and returns one combined JSON array.

create --json returns {schema_version, id, label, token_on_stderr: true} and prints the actual secret on a single line to stderr. That way a pipeline like vulncheck token create ci-runner --json > token.json never captures the secret in the JSON file. Pass --allow-token-on-stdout if you want the token embedded in the JSON payload instead ({... "token": "vc_..."}) — you're taking responsibility for the redirection.

browse is interactive; it refuses with exit 2 under --no-interactive.

indices

vulncheck indices list [<search>]
vulncheck indices browse [<search>]

Lists (or interactively browses) the catalogue of available indices. list accepts a fuzzy search term.

index

vulncheck index list <index> [--full] [--all] [query flags]
vulncheck index browse <index> [query flags]

list --all walks next_cursor end-to-end and emits one combined array. browse runs an interactive viewport; under --json (or --no-interactive) it falls back to list output. Query flags come from the index's schema (--cve, --alias, --limit, --cursor, etc.); see the API docs for the full set.

backup

vulncheck backup url <index> # signed temporary URL only
vulncheck backup download <index> # download the archive

download picks the bubbletea progress bar for TTYs and a plain SIGINT-safe streaming download (writing to <name>.part and renaming on success) for headless callers. url --json returns {filename, sha256, date_added, url}.

cpe

vulncheck cpe <cpe>
vulncheck cpe --from-file cpes.txt --json
echo cpe:2.3:… | vulncheck cpe --json

Batch mode (multiple positional args, --from-file, or piped stdin) requires --json and returns the stable batch envelope.

purl

vulncheck purl <purl>
vulncheck purl --from-file purls.txt --json

Same batch semantics as cpe. Batch requests are sent as a single /v3/purls POST rather than N GETs.

tag

vulncheck tag <tag-name>
vulncheck tag --from-file tags.txt --json

Returns the newline-split list of matches for the given IP-intelligence tag. Batch input supported.

pdns

vulncheck pdns <list-name>
vulncheck pdns --from-file lists.txt --json

Passive-DNS list membership. Batch input supported.

rule

vulncheck rule <rule-name> [--table]

Look up an initial-access-intelligence rule. --table renders single-column table output; --json (global) supersedes.

scan

vulncheck scan <path> [flags]
vulncheck scan --sbom-input-file <file> --json

Generates an SBOM for <path>, extracts PURLs, then either calls the vulncheck API (default) or queries local offline indices.

FlagDescription
-f, --fileSave results to a file.
-n, --file-nameCustom output filename (default output.json).
-o, --sbom-output-fileSave the generated SBOM to a file.
-i, --sbom-input-fileLoad an existing SBOM instead of generating one.
-s, --sbom-onlyGenerate the SBOM without running the vuln lookup.
-c, --include-cpesExtract CPEs as well as PURLs (offline mode only, for now).
--offlineUse locally-synced indices instead of the API.
--offline-metaPopulate metadata (CVSS, KEV, description) from vulncheck-nvd2 in offline mode.
--warn-on-indexWarn instead of failing when a required offline index isn't cached.
--disable-uiAlias for --no-interactive (kept for backwards compatibility).
--enrichEnrich the generated SBOM with metadata from proxy.golang.org / Maven Central / NPM / PyPI. Comma-separated scopes: all, golang, java, javascript, python; prefix with - to exclude (e.g. all,-java). Off by default; requires network — cannot be combined with --offline or --sbom-input-file.

The progress TUI is auto-suppressed whenever the renderer can't safely draw it (--json, --no-interactive, non-TTY, CI).

offline

vulncheck offline sync [--add <name>|--remove <name>|--purge|--force|--choose] [--json]
vulncheck offline status [--json]
vulncheck offline purl <purl> [--json]
vulncheck offline cpe <cpe> [--json] [--stats]
vulncheck offline ipintel <3d|10d|30d> [--country=...] [--asn=...] [--cidr=...] [--json]

Local queries against synced indices. sync --json returns {schema_version, action, selected, elapsed_seconds}; status --json returns the cached-index array. Under --no-interactive the sync command refuses without an explicit --add / --remove / --purge (no picker prompt).

version

vulncheck version [--json]

--json returns {schema_version, version, build_date, changelog_url} — the canonical probe for agents.

upgrade

vulncheck upgrade status
vulncheck upgrade latest [--force]
vulncheck upgrade --version X.X.X
  • upgrade status — check whether a newer release is available.
  • upgrade latest — install the newest release. --force reinstalls the current version.
  • upgrade --version X.X.X — install a specific version.

Tip

Looking to plug this into your Github Repository? Check out our own Action

About

VulnCheck's official command line tool

Resources

Contributing

Stars

159 stars

Watchers

7 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

VulnCheck Logo

The VulnCheck CLI

vulncheck is access to the VulnCheck API on the command line. It brings index browsing, backup management, and vulnerability scanning to the terminal.

ReleaseGo ReferenceLintTestsPRs Welcome

Installation

Provided install scripts

You can easily install vulncheck using an install script. Choose the script and method that matches your operating system:

macOS and Linux

Open a terminal and run:

curl -sSL https://raw.githubusercontent.com/vulncheck-oss/cli/main/install.sh | bash

This will prompt you to choose between system-wide installation (requires sudo) or local user installation.

Note

The install script also supports non-interactive installation options:

  • --sudo for system-wide installation without prompts
  • --non-sudo for local user installation without prompts
  • --help or -h to see all available options
curl -sSL https://raw.githubusercontent.com/vulncheck-oss/cli/main/install.sh | bash -s -- --help

Windows

Open PowerShell and run:

iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/vulncheck-oss/cli/main/install.ps1'))

vulncheck binaries are also available for MacOS, Linux, and Windows. You can download precompiled binaries from our releases page

Verify the installation

Once installed, confirm the binary prints the desired version:

vulncheck version

You should see the version, build date, and changelog URL. If you get "command not found", reopen your shell so the new PATH is picked up, then try again.

Configuration

  • Run vulncheck auth login to authenticate with your VulnCheck account.
  • Alternatively vulncheck will respect the VC_TOKEN environment variable.
  • vulncheck auth by itself will show other options like checking your status and logging out.

VC_TOKEN wins over the saved config file. Because of that, auth login and auth logout refuse while it is set — otherwise they would report success having changed nothing that takes effect. Run vulncheck auth status to see which of the two sources the active token came from.

Agentic / scripted usage

The CLI is designed to be safe to drive from scripts and AI agents. This section is the contract — the surfaces below are intended to remain stable across releases (additions are not breaking changes; renames / removals are).

Global flags

FlagEffect
--jsonEmit JSON on stdout; route info/progress lines to stderr; errors emitted as a structured envelope.
--quietSuppress informational output. Errors and payloads still render.
--no-colorDisable ANSI styling. Also honours the NO_COLOR env var.
--no-interactiveRefuse to block on TUI prompts; commands that need a prompt return an error instead. Implied by --json, non-TTY stdin/stdout, and any of the CI / BUILD_NUMBER / RUN_ID env vars.

Environment variables

VariableEffect
VC_TOKENAPI token. Takes precedence over ~/.config/vulncheck/vulncheck.yaml. While it is set, auth login and auth logout refuse rather than writing a config file that would be ignored — unset VC_TOKEN first.
NO_COLORAny non-empty value disables ANSI styling.
CI / BUILD_NUMBER / RUN_IDAny of these set implies non-interactive mode (no prompts).

Exit codes

CodeMeaning
0Success.
1Generic / internal error.
2Validation failure (bad args, missing required flag, malformed request).
3Auth failure (no token, or the server rejected the token).
4Resource not found (HTTP 404, no such index).
5Rate limited (HTTP 429).
6Network failure (DNS, connection refused, timeout).
130Cancelled by SIGINT (POSIX 128 + 2).

Error envelope

In --json mode, errors are emitted to stdout as:

{
"schema_version": 1,
"error": {
"code": "auth_required",
"message": "...",
"http_status": 401,
"hint": "..."
}
}

code is one of: internal, validation, auth_required, auth_invalid, not_found, rate_limited, network, bad_request, cancelled. http_status is omitted for non-HTTP errors. hint is optional remediation context — present only when the message alone isn't actionable (e.g. naming VC_TOKEN as the source of a rejected token) — and is rendered on stderr as hint: ... outside --json mode.

Probe commands

Use these to inspect the CLI itself before dispatching work:

vulncheck version --json
# {"schema_version": 1, "version": "...", "build_date": "...", "changelog_url": "..."}
vulncheck auth status --json
# {"schema_version": 1, "authenticated": true, "token_source": "env", "user": "...", "email": "..."}# Exit 0 even when authenticated=false — agents dispatch on the bool.# token_shadowed: true is added when VC_TOKEN is overriding a *different*# token saved in vulncheck.yaml — the usual cause of "I logged in but# nothing changed". Omitted otherwise, so the CI shape (VC_TOKEN only,# no config file) never reports shadowing.
vulncheck commands
# {"schema_version": 1, "root": {"name":"vulncheck", "subcommands":[...]}, ...}# Machine-readable dump of the whole command tree — every subcommand,# every flag (with type + default + usage), aliases, deprecation. Use# this instead of parsing --help. Auth is not required.

Pagination

vulncheck token list --json --limit 10 --page 2
vulncheck token list --json --all # auto-paginate, single combined array
vulncheck index list <index> --json --all

Batch input

purl, cpe, tag, pdns accept multiple inputs via positional args, stdin (when piped), or --from-file <path>. Blank lines and #-prefixed comments in the file are ignored. Batch mode requires --json.

# Stdin
cat purls.txt | vulncheck purl --json
# File
vulncheck cpe --from-file ./cpes.txt --json

The batch envelope is a stable array, one row per input, in input order:

[
{"input": "pkg:npm/lodash@4.0.0", "data": { ... }},
{"input": "pkg:bad/string", "error": "no result returned for this purl"}
]

Cancellation

SIGINT / SIGTERM cancel in-flight HTTP requests cleanly via context propagation. Long-running ops (scan, offline sync, backup download) honour cancellation; partial files are removed on the way out where applicable.

JSON output discipline

When --json is set:

  • stdout carries only the JSON payload (or the error envelope above).
  • stderr carries every info line, progress bar, spinner, prompt, and warning.
  • TUI elements (bubbletea, huh prompts) are automatically suppressed.

This means vulncheck <cmd> --json | jq always works — no tail/sed cleanup needed.

Available commands

Every command below accepts the global flags (--json, --quiet, --no-color, --no-interactive, --help/-h). Per-command flag tables list only what is specific to that command.

  • auth — log in / out, check status
  • token — API token management
  • indices — list or browse the catalogue of indices
  • index — query one index
  • backup — download or fetch a signed URL for an index backup
  • cpe — look up CVEs for a CPE (single or batch)
  • purl — look up CVEs for a PURL (single or batch)
  • tag — look up IP-intelligence tag membership
  • pdns — look up passive-DNS list membership
  • rule — look up initial-access-intelligence rules
  • scan — scan a directory (SBOM + vulnerability lookup)
  • offline — sync indices locally and query them without hitting the API
  • version — print the CLI version
  • upgrade — update the CLI in place

auth

vulncheck auth login
vulncheck auth logout
vulncheck auth status [--json]

login walks you through a browser or paste-token flow — refuses when --no-interactive. status --json calls /me to actually verify the token; the payload always has .authenticated: bool and exits 0 regardless (see Probe commands).

token

vulncheck token list [--limit N] [--page N] [--all]
vulncheck token create <label>
vulncheck token remove <id>
vulncheck token browse

list --json --all auto-paginates and returns one combined JSON array.

create --json returns {schema_version, id, label, token_on_stderr: true} and prints the actual secret on a single line to stderr. That way a pipeline like vulncheck token create ci-runner --json > token.json never captures the secret in the JSON file. Pass --allow-token-on-stdout if you want the token embedded in the JSON payload instead ({... "token": "vc_..."}) — you're taking responsibility for the redirection.

browse is interactive; it refuses with exit 2 under --no-interactive.

indices

vulncheck indices list [<search>]
vulncheck indices browse [<search>]

Lists (or interactively browses) the catalogue of available indices. list accepts a fuzzy search term.

index

vulncheck index list <index> [--full] [--all] [query flags]
vulncheck index browse <index> [query flags]

list --all walks next_cursor end-to-end and emits one combined array. browse runs an interactive viewport; under --json (or --no-interactive) it falls back to list output. Query flags come from the index's schema (--cve, --alias, --limit, --cursor, etc.); see the API docs for the full set.

backup

vulncheck backup url <index> # signed temporary URL only
vulncheck backup download <index> # download the archive

download picks the bubbletea progress bar for TTYs and a plain SIGINT-safe streaming download (writing to <name>.part and renaming on success) for headless callers. url --json returns {filename, sha256, date_added, url}.

cpe

vulncheck cpe <cpe>
vulncheck cpe --from-file cpes.txt --json
echo cpe:2.3:… | vulncheck cpe --json

Batch mode (multiple positional args, --from-file, or piped stdin) requires --json and returns the stable batch envelope.

purl

vulncheck purl <purl>
vulncheck purl --from-file purls.txt --json

Same batch semantics as cpe. Batch requests are sent as a single /v3/purls POST rather than N GETs.

tag

vulncheck tag <tag-name>
vulncheck tag --from-file tags.txt --json

Returns the newline-split list of matches for the given IP-intelligence tag. Batch input supported.

pdns

vulncheck pdns <list-name>
vulncheck pdns --from-file lists.txt --json

Passive-DNS list membership. Batch input supported.

rule

vulncheck rule <rule-name> [--table]

Look up an initial-access-intelligence rule. --table renders single-column table output; --json (global) supersedes.

scan

vulncheck scan <path> [flags]
vulncheck scan --sbom-input-file <file> --json

Generates an SBOM for <path>, extracts PURLs, then either calls the vulncheck API (default) or queries local offline indices.

FlagDescription
-f, --fileSave results to a file.
-n, --file-nameCustom output filename (default output.json).
-o, --sbom-output-fileSave the generated SBOM to a file.
-i, --sbom-input-fileLoad an existing SBOM instead of generating one.
-s, --sbom-onlyGenerate the SBOM without running the vuln lookup.
-c, --include-cpesExtract CPEs as well as PURLs (offline mode only, for now).
--offlineUse locally-synced indices instead of the API.
--offline-metaPopulate metadata (CVSS, KEV, description) from vulncheck-nvd2 in offline mode.
--warn-on-indexWarn instead of failing when a required offline index isn't cached.
--disable-uiAlias for --no-interactive (kept for backwards compatibility).
--enrichEnrich the generated SBOM with metadata from proxy.golang.org / Maven Central / NPM / PyPI. Comma-separated scopes: all, golang, java, javascript, python; prefix with - to exclude (e.g. all,-java). Off by default; requires network — cannot be combined with --offline or --sbom-input-file.

The progress TUI is auto-suppressed whenever the renderer can't safely draw it (--json, --no-interactive, non-TTY, CI).

offline

vulncheck offline sync [--add <name>|--remove <name>|--purge|--force|--choose] [--json]
vulncheck offline status [--json]
vulncheck offline purl <purl> [--json]
vulncheck offline cpe <cpe> [--json] [--stats]
vulncheck offline ipintel <3d|10d|30d> [--country=...] [--asn=...] [--cidr=...] [--json]

Local queries against synced indices. sync --json returns {schema_version, action, selected, elapsed_seconds}; status --json returns the cached-index array. Under --no-interactive the sync command refuses without an explicit --add / --remove / --purge (no picker prompt).

version

vulncheck version [--json]

--json returns {schema_version, version, build_date, changelog_url} — the canonical probe for agents.

upgrade

vulncheck upgrade status
vulncheck upgrade latest [--force]
vulncheck upgrade --version X.X.X
  • upgrade status — check whether a newer release is available.
  • upgrade latest — install the newest release. --force reinstalls the current version.
  • upgrade --version X.X.X — install a specific version.

Tip

Looking to plug this into your Github Repository? Check out our own Action

About

VulnCheck's official command line tool

Resources

Contributing

Stars

159 stars

Watchers

7 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

VulnCheck Logo

The VulnCheck CLI

vulncheck is access to the VulnCheck API on the command line. It brings index browsing, backup management, and vulnerability scanning to the terminal.

ReleaseGo ReferenceLintTestsPRs Welcome

Installation

Provided install scripts

You can easily install vulncheck using an install script. Choose the script and method that matches your operating system:

macOS and Linux

Open a terminal and run:

curl -sSL https://raw.githubusercontent.com/vulncheck-oss/cli/main/install.sh | bash

This will prompt you to choose between system-wide installation (requires sudo) or local user installation.

Note

The install script also supports non-interactive installation options:

  • --sudo for system-wide installation without prompts
  • --non-sudo for local user installation without prompts
  • --help or -h to see all available options
curl -sSL https://raw.githubusercontent.com/vulncheck-oss/cli/main/install.sh | bash -s -- --help

Windows

Open PowerShell and run:

iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/vulncheck-oss/cli/main/install.ps1'))

vulncheck binaries are also available for MacOS, Linux, and Windows. You can download precompiled binaries from our releases page

Verify the installation

Once installed, confirm the binary prints the desired version:

vulncheck version

You should see the version, build date, and changelog URL. If you get "command not found", reopen your shell so the new PATH is picked up, then try again.

Configuration

  • Run vulncheck auth login to authenticate with your VulnCheck account.
  • Alternatively vulncheck will respect the VC_TOKEN environment variable.
  • vulncheck auth by itself will show other options like checking your status and logging out.

VC_TOKEN wins over the saved config file. Because of that, auth login and auth logout refuse while it is set — otherwise they would report success having changed nothing that takes effect. Run vulncheck auth status to see which of the two sources the active token came from.

Agentic / scripted usage

The CLI is designed to be safe to drive from scripts and AI agents. This section is the contract — the surfaces below are intended to remain stable across releases (additions are not breaking changes; renames / removals are).

Global flags

FlagEffect
--jsonEmit JSON on stdout; route info/progress lines to stderr; errors emitted as a structured envelope.
--quietSuppress informational output. Errors and payloads still render.
--no-colorDisable ANSI styling. Also honours the NO_COLOR env var.
--no-interactiveRefuse to block on TUI prompts; commands that need a prompt return an error instead. Implied by --json, non-TTY stdin/stdout, and any of the CI / BUILD_NUMBER / RUN_ID env vars.

Environment variables

VariableEffect
VC_TOKENAPI token. Takes precedence over ~/.config/vulncheck/vulncheck.yaml. While it is set, auth login and auth logout refuse rather than writing a config file that would be ignored — unset VC_TOKEN first.
NO_COLORAny non-empty value disables ANSI styling.
CI / BUILD_NUMBER / RUN_IDAny of these set implies non-interactive mode (no prompts).

Exit codes

CodeMeaning
0Success.
1Generic / internal error.
2Validation failure (bad args, missing required flag, malformed request).
3Auth failure (no token, or the server rejected the token).
4Resource not found (HTTP 404, no such index).
5Rate limited (HTTP 429).
6Network failure (DNS, connection refused, timeout).
130Cancelled by SIGINT (POSIX 128 + 2).

Error envelope

In --json mode, errors are emitted to stdout as:

{
"schema_version": 1,
"error": {
"code": "auth_required",
"message": "...",
"http_status": 401,
"hint": "..."
}
}

code is one of: internal, validation, auth_required, auth_invalid, not_found, rate_limited, network, bad_request, cancelled. http_status is omitted for non-HTTP errors. hint is optional remediation context — present only when the message alone isn't actionable (e.g. naming VC_TOKEN as the source of a rejected token) — and is rendered on stderr as hint: ... outside --json mode.

Probe commands

Use these to inspect the CLI itself before dispatching work:

vulncheck version --json
# {"schema_version": 1, "version": "...", "build_date": "...", "changelog_url": "..."}
vulncheck auth status --json
# {"schema_version": 1, "authenticated": true, "token_source": "env", "user": "...", "email": "..."}# Exit 0 even when authenticated=false — agents dispatch on the bool.# token_shadowed: true is added when VC_TOKEN is overriding a *different*# token saved in vulncheck.yaml — the usual cause of "I logged in but# nothing changed". Omitted otherwise, so the CI shape (VC_TOKEN only,# no config file) never reports shadowing.
vulncheck commands
# {"schema_version": 1, "root": {"name":"vulncheck", "subcommands":[...]}, ...}# Machine-readable dump of the whole command tree — every subcommand,# every flag (with type + default + usage), aliases, deprecation. Use# this instead of parsing --help. Auth is not required.

Pagination

vulncheck token list --json --limit 10 --page 2
vulncheck token list --json --all # auto-paginate, single combined array
vulncheck index list <index> --json --all

Batch input

purl, cpe, tag, pdns accept multiple inputs via positional args, stdin (when piped), or --from-file <path>. Blank lines and #-prefixed comments in the file are ignored. Batch mode requires --json.

# Stdin
cat purls.txt | vulncheck purl --json
# File
vulncheck cpe --from-file ./cpes.txt --json

The batch envelope is a stable array, one row per input, in input order:

[
{"input": "pkg:npm/lodash@4.0.0", "data": { ... }},
{"input": "pkg:bad/string", "error": "no result returned for this purl"}
]

Cancellation

SIGINT / SIGTERM cancel in-flight HTTP requests cleanly via context propagation. Long-running ops (scan, offline sync, backup download) honour cancellation; partial files are removed on the way out where applicable.

JSON output discipline

When --json is set:

  • stdout carries only the JSON payload (or the error envelope above).
  • stderr carries every info line, progress bar, spinner, prompt, and warning.
  • TUI elements (bubbletea, huh prompts) are automatically suppressed.

This means vulncheck <cmd> --json | jq always works — no tail/sed cleanup needed.

Available commands

Every command below accepts the global flags (--json, --quiet, --no-color, --no-interactive, --help/-h). Per-command flag tables list only what is specific to that command.

  • auth — log in / out, check status
  • token — API token management
  • indices — list or browse the catalogue of indices
  • index — query one index
  • backup — download or fetch a signed URL for an index backup
  • cpe — look up CVEs for a CPE (single or batch)
  • purl — look up CVEs for a PURL (single or batch)
  • tag — look up IP-intelligence tag membership
  • pdns — look up passive-DNS list membership
  • rule — look up initial-access-intelligence rules
  • scan — scan a directory (SBOM + vulnerability lookup)
  • offline — sync indices locally and query them without hitting the API
  • version — print the CLI version
  • upgrade — update the CLI in place

auth

vulncheck auth login
vulncheck auth logout
vulncheck auth status [--json]

login walks you through a browser or paste-token flow — refuses when --no-interactive. status --json calls /me to actually verify the token; the payload always has .authenticated: bool and exits 0 regardless (see Probe commands).

token

vulncheck token list [--limit N] [--page N] [--all]
vulncheck token create <label>
vulncheck token remove <id>
vulncheck token browse

list --json --all auto-paginates and returns one combined JSON array.

create --json returns {schema_version, id, label, token_on_stderr: true} and prints the actual secret on a single line to stderr. That way a pipeline like vulncheck token create ci-runner --json > token.json never captures the secret in the JSON file. Pass --allow-token-on-stdout if you want the token embedded in the JSON payload instead ({... "token": "vc_..."}) — you're taking responsibility for the redirection.

browse is interactive; it refuses with exit 2 under --no-interactive.

indices

vulncheck indices list [<search>]
vulncheck indices browse [<search>]

Lists (or interactively browses) the catalogue of available indices. list accepts a fuzzy search term.

index

vulncheck index list <index> [--full] [--all] [query flags]
vulncheck index browse <index> [query flags]

list --all walks next_cursor end-to-end and emits one combined array. browse runs an interactive viewport; under --json (or --no-interactive) it falls back to list output. Query flags come from the index's schema (--cve, --alias, --limit, --cursor, etc.); see the API docs for the full set.

backup

vulncheck backup url <index> # signed temporary URL only
vulncheck backup download <index> # download the archive

download picks the bubbletea progress bar for TTYs and a plain SIGINT-safe streaming download (writing to <name>.part and renaming on success) for headless callers. url --json returns {filename, sha256, date_added, url}.

cpe

vulncheck cpe <cpe>
vulncheck cpe --from-file cpes.txt --json
echo cpe:2.3:… | vulncheck cpe --json

Batch mode (multiple positional args, --from-file, or piped stdin) requires --json and returns the stable batch envelope.

purl

vulncheck purl <purl>
vulncheck purl --from-file purls.txt --json

Same batch semantics as cpe. Batch requests are sent as a single /v3/purls POST rather than N GETs.

tag

vulncheck tag <tag-name>
vulncheck tag --from-file tags.txt --json

Returns the newline-split list of matches for the given IP-intelligence tag. Batch input supported.

pdns

vulncheck pdns <list-name>
vulncheck pdns --from-file lists.txt --json

Passive-DNS list membership. Batch input supported.

rule

vulncheck rule <rule-name> [--table]

Look up an initial-access-intelligence rule. --table renders single-column table output; --json (global) supersedes.

scan

vulncheck scan <path> [flags]
vulncheck scan --sbom-input-file <file> --json

Generates an SBOM for <path>, extracts PURLs, then either calls the vulncheck API (default) or queries local offline indices.

FlagDescription
-f, --fileSave results to a file.
-n, --file-nameCustom output filename (default output.json).
-o, --sbom-output-fileSave the generated SBOM to a file.
-i, --sbom-input-fileLoad an existing SBOM instead of generating one.
-s, --sbom-onlyGenerate the SBOM without running the vuln lookup.
-c, --include-cpesExtract CPEs as well as PURLs (offline mode only, for now).
--offlineUse locally-synced indices instead of the API.
--offline-metaPopulate metadata (CVSS, KEV, description) from vulncheck-nvd2 in offline mode.
--warn-on-indexWarn instead of failing when a required offline index isn't cached.
--disable-uiAlias for --no-interactive (kept for backwards compatibility).
--enrichEnrich the generated SBOM with metadata from proxy.golang.org / Maven Central / NPM / PyPI. Comma-separated scopes: all, golang, java, javascript, python; prefix with - to exclude (e.g. all,-java). Off by default; requires network — cannot be combined with --offline or --sbom-input-file.

The progress TUI is auto-suppressed whenever the renderer can't safely draw it (--json, --no-interactive, non-TTY, CI).

offline

vulncheck offline sync [--add <name>|--remove <name>|--purge|--force|--choose] [--json]
vulncheck offline status [--json]
vulncheck offline purl <purl> [--json]
vulncheck offline cpe <cpe> [--json] [--stats]
vulncheck offline ipintel <3d|10d|30d> [--country=...] [--asn=...] [--cidr=...] [--json]

Local queries against synced indices. sync --json returns {schema_version, action, selected, elapsed_seconds}; status --json returns the cached-index array. Under --no-interactive the sync command refuses without an explicit --add / --remove / --purge (no picker prompt).

version

vulncheck version [--json]

--json returns {schema_version, version, build_date, changelog_url} — the canonical probe for agents.

upgrade

vulncheck upgrade status
vulncheck upgrade latest [--force]
vulncheck upgrade --version X.X.X
  • upgrade status — check whether a newer release is available.
  • upgrade latest — install the newest release. --force reinstalls the current version.
  • upgrade --version X.X.X — install a specific version.

Tip

Looking to plug this into your Github Repository? Check out our own Action

About

VulnCheck's official command line tool

Resources

Contributing

Stars

159 stars

Watchers

7 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

Repository files navigation

VulnCheck Logo

The VulnCheck CLI

vulncheck is access to the VulnCheck API on the command line. It brings index browsing, backup management, and vulnerability scanning to the terminal.

ReleaseGo ReferenceLintTestsPRs Welcome

Installation

Provided install scripts

You can easily install vulncheck using an install script. Choose the script and method that matches your operating system:

macOS and Linux

Open a terminal and run:

curl -sSL https://raw.githubusercontent.com/vulncheck-oss/cli/main/install.sh | bash

This will prompt you to choose between system-wide installation (requires sudo) or local user installation.

Note

The install script also supports non-interactive installation options:

  • --sudo for system-wide installation without prompts
  • --non-sudo for local user installation without prompts
  • --help or -h to see all available options
curl -sSL https://raw.githubusercontent.com/vulncheck-oss/cli/main/install.sh | bash -s -- --help

Windows

Open PowerShell and run:

iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/vulncheck-oss/cli/main/install.ps1'))

vulncheck binaries are also available for MacOS, Linux, and Windows. You can download precompiled binaries from our releases page

Verify the installation

Once installed, confirm the binary prints the desired version:

vulncheck version

You should see the version, build date, and changelog URL. If you get "command not found", reopen your shell so the new PATH is picked up, then try again.

Configuration

  • Run vulncheck auth login to authenticate with your VulnCheck account.
  • Alternatively vulncheck will respect the VC_TOKEN environment variable.
  • vulncheck auth by itself will show other options like checking your status and logging out.

VC_TOKEN wins over the saved config file. Because of that, auth login and auth logout refuse while it is set — otherwise they would report success having changed nothing that takes effect. Run vulncheck auth status to see which of the two sources the active token came from.

Agentic / scripted usage

The CLI is designed to be safe to drive from scripts and AI agents. This section is the contract — the surfaces below are intended to remain stable across releases (additions are not breaking changes; renames / removals are).

Global flags

FlagEffect
--jsonEmit JSON on stdout; route info/progress lines to stderr; errors emitted as a structured envelope.
--quietSuppress informational output. Errors and payloads still render.
--no-colorDisable ANSI styling. Also honours the NO_COLOR env var.
--no-interactiveRefuse to block on TUI prompts; commands that need a prompt return an error instead. Implied by --json, non-TTY stdin/stdout, and any of the CI / BUILD_NUMBER / RUN_ID env vars.

Environment variables

VariableEffect
VC_TOKENAPI token. Takes precedence over ~/.config/vulncheck/vulncheck.yaml. While it is set, auth login and auth logout refuse rather than writing a config file that would be ignored — unset VC_TOKEN first.
NO_COLORAny non-empty value disables ANSI styling.
CI / BUILD_NUMBER / RUN_IDAny of these set implies non-interactive mode (no prompts).

Exit codes

CodeMeaning
0Success.
1Generic / internal error.
2Validation failure (bad args, missing required flag, malformed request).
3Auth failure (no token, or the server rejected the token).
4Resource not found (HTTP 404, no such index).
5Rate limited (HTTP 429).
6Network failure (DNS, connection refused, timeout).
130Cancelled by SIGINT (POSIX 128 + 2).

Error envelope

In --json mode, errors are emitted to stdout as:

{
"schema_version": 1,
"error": {
"code": "auth_required",
"message": "...",
"http_status": 401,
"hint": "..."
}
}

code is one of: internal, validation, auth_required, auth_invalid, not_found, rate_limited, network, bad_request, cancelled. http_status is omitted for non-HTTP errors. hint is optional remediation context — present only when the message alone isn't actionable (e.g. naming VC_TOKEN as the source of a rejected token) — and is rendered on stderr as hint: ... outside --json mode.

Probe commands

Use these to inspect the CLI itself before dispatching work:

vulncheck version --json
# {"schema_version": 1, "version": "...", "build_date": "...", "changelog_url": "..."}
vulncheck auth status --json
# {"schema_version": 1, "authenticated": true, "token_source": "env", "user": "...", "email": "..."}# Exit 0 even when authenticated=false — agents dispatch on the bool.# token_shadowed: true is added when VC_TOKEN is overriding a *different*# token saved in vulncheck.yaml — the usual cause of "I logged in but# nothing changed". Omitted otherwise, so the CI shape (VC_TOKEN only,# no config file) never reports shadowing.
vulncheck commands
# {"schema_version": 1, "root": {"name":"vulncheck", "subcommands":[...]}, ...}# Machine-readable dump of the whole command tree — every subcommand,# every flag (with type + default + usage), aliases, deprecation. Use# this instead of parsing --help. Auth is not required.

Pagination

vulncheck token list --json --limit 10 --page 2
vulncheck token list --json --all # auto-paginate, single combined array
vulncheck index list <index> --json --all

Batch input

purl, cpe, tag, pdns accept multiple inputs via positional args, stdin (when piped), or --from-file <path>. Blank lines and #-prefixed comments in the file are ignored. Batch mode requires --json.

# Stdin
cat purls.txt | vulncheck purl --json
# File
vulncheck cpe --from-file ./cpes.txt --json

The batch envelope is a stable array, one row per input, in input order:

[
{"input": "pkg:npm/lodash@4.0.0", "data": { ... }},
{"input": "pkg:bad/string", "error": "no result returned for this purl"}
]

Cancellation

SIGINT / SIGTERM cancel in-flight HTTP requests cleanly via context propagation. Long-running ops (scan, offline sync, backup download) honour cancellation; partial files are removed on the way out where applicable.

JSON output discipline

When --json is set:

  • stdout carries only the JSON payload (or the error envelope above).
  • stderr carries every info line, progress bar, spinner, prompt, and warning.
  • TUI elements (bubbletea, huh prompts) are automatically suppressed.

This means vulncheck <cmd> --json | jq always works — no tail/sed cleanup needed.

Available commands

Every command below accepts the global flags (--json, --quiet, --no-color, --no-interactive, --help/-h). Per-command flag tables list only what is specific to that command.

  • auth — log in / out, check status
  • token — API token management
  • indices — list or browse the catalogue of indices
  • index — query one index
  • backup — download or fetch a signed URL for an index backup
  • cpe — look up CVEs for a CPE (single or batch)
  • purl — look up CVEs for a PURL (single or batch)
  • tag — look up IP-intelligence tag membership
  • pdns — look up passive-DNS list membership
  • rule — look up initial-access-intelligence rules
  • scan — scan a directory (SBOM + vulnerability lookup)
  • offline — sync indices locally and query them without hitting the API
  • version — print the CLI version
  • upgrade — update the CLI in place

auth

vulncheck auth login
vulncheck auth logout
vulncheck auth status [--json]

login walks you through a browser or paste-token flow — refuses when --no-interactive. status --json calls /me to actually verify the token; the payload always has .authenticated: bool and exits 0 regardless (see Probe commands).

token

vulncheck token list [--limit N] [--page N] [--all]
vulncheck token create <label>
vulncheck token remove <id>
vulncheck token browse

list --json --all auto-paginates and returns one combined JSON array.

create --json returns {schema_version, id, label, token_on_stderr: true} and prints the actual secret on a single line to stderr. That way a pipeline like vulncheck token create ci-runner --json > token.json never captures the secret in the JSON file. Pass --allow-token-on-stdout if you want the token embedded in the JSON payload instead ({... "token": "vc_..."}) — you're taking responsibility for the redirection.

browse is interactive; it refuses with exit 2 under --no-interactive.

indices

vulncheck indices list [<search>]
vulncheck indices browse [<search>]

Lists (or interactively browses) the catalogue of available indices. list accepts a fuzzy search term.

index

vulncheck index list <index> [--full] [--all] [query flags]
vulncheck index browse <index> [query flags]

list --all walks next_cursor end-to-end and emits one combined array. browse runs an interactive viewport; under --json (or --no-interactive) it falls back to list output. Query flags come from the index's schema (--cve, --alias, --limit, --cursor, etc.); see the API docs for the full set.

backup

vulncheck backup url <index> # signed temporary URL only
vulncheck backup download <index> # download the archive

download picks the bubbletea progress bar for TTYs and a plain SIGINT-safe streaming download (writing to <name>.part and renaming on success) for headless callers. url --json returns {filename, sha256, date_added, url}.

cpe

vulncheck cpe <cpe>
vulncheck cpe --from-file cpes.txt --json
echo cpe:2.3:… | vulncheck cpe --json

Batch mode (multiple positional args, --from-file, or piped stdin) requires --json and returns the stable batch envelope.

purl

vulncheck purl <purl>
vulncheck purl --from-file purls.txt --json

Same batch semantics as cpe. Batch requests are sent as a single /v3/purls POST rather than N GETs.

tag

vulncheck tag <tag-name>
vulncheck tag --from-file tags.txt --json

Returns the newline-split list of matches for the given IP-intelligence tag. Batch input supported.

pdns

vulncheck pdns <list-name>
vulncheck pdns --from-file lists.txt --json

Passive-DNS list membership. Batch input supported.

rule

vulncheck rule <rule-name> [--table]

Look up an initial-access-intelligence rule. --table renders single-column table output; --json (global) supersedes.

scan

vulncheck scan <path> [flags]
vulncheck scan --sbom-input-file <file> --json

Generates an SBOM for <path>, extracts PURLs, then either calls the vulncheck API (default) or queries local offline indices.

FlagDescription
-f, --fileSave results to a file.
-n, --file-nameCustom output filename (default output.json).
-o, --sbom-output-fileSave the generated SBOM to a file.
-i, --sbom-input-fileLoad an existing SBOM instead of generating one.
-s, --sbom-onlyGenerate the SBOM without running the vuln lookup.
-c, --include-cpesExtract CPEs as well as PURLs (offline mode only, for now).
--offlineUse locally-synced indices instead of the API.
--offline-metaPopulate metadata (CVSS, KEV, description) from vulncheck-nvd2 in offline mode.
--warn-on-indexWarn instead of failing when a required offline index isn't cached.
--disable-uiAlias for --no-interactive (kept for backwards compatibility).
--enrichEnrich the generated SBOM with metadata from proxy.golang.org / Maven Central / NPM / PyPI. Comma-separated scopes: all, golang, java, javascript, python; prefix with - to exclude (e.g. all,-java). Off by default; requires network — cannot be combined with --offline or --sbom-input-file.

The progress TUI is auto-suppressed whenever the renderer can't safely draw it (--json, --no-interactive, non-TTY, CI).

offline

vulncheck offline sync [--add <name>|--remove <name>|--purge|--force|--choose] [--json]
vulncheck offline status [--json]
vulncheck offline purl <purl> [--json]
vulncheck offline cpe <cpe> [--json] [--stats]
vulncheck offline ipintel <3d|10d|30d> [--country=...] [--asn=...] [--cidr=...] [--json]

Local queries against synced indices. sync --json returns {schema_version, action, selected, elapsed_seconds}; status --json returns the cached-index array. Under --no-interactive the sync command refuses without an explicit --add / --remove / --purge (no picker prompt).

version

vulncheck version [--json]

--json returns {schema_version, version, build_date, changelog_url} — the canonical probe for agents.

upgrade

vulncheck upgrade status
vulncheck upgrade latest [--force]
vulncheck upgrade --version X.X.X
  • upgrade status — check whether a newer release is available.
  • upgrade latest — install the newest release. --force reinstalls the current version.
  • upgrade --version X.X.X — install a specific version.

Tip

Looking to plug this into your Github Repository? Check out our own Action

About

VulnCheck's official command line tool

Resources

Contributing

Stars

159 stars

Watchers

7 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

VulnCheck Logo

The VulnCheck CLI

vulncheck is access to the VulnCheck API on the command line. It brings index browsing, backup management, and vulnerability scanning to the terminal.

ReleaseGo ReferenceLintTestsPRs Welcome

Installation

Provided install scripts

You can easily install vulncheck using an install script. Choose the script and method that matches your operating system:

macOS and Linux

Open a terminal and run:

curl -sSL https://raw.githubusercontent.com/vulncheck-oss/cli/main/install.sh | bash

This will prompt you to choose between system-wide installation (requires sudo) or local user installation.

Note

The install script also supports non-interactive installation options:

  • --sudo for system-wide installation without prompts
  • --non-sudo for local user installation without prompts
  • --help or -h to see all available options
curl -sSL https://raw.githubusercontent.com/vulncheck-oss/cli/main/install.sh | bash -s -- --help

Windows

Open PowerShell and run:

iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/vulncheck-oss/cli/main/install.ps1'))

vulncheck binaries are also available for MacOS, Linux, and Windows. You can download precompiled binaries from our releases page

Verify the installation

Once installed, confirm the binary prints the desired version:

vulncheck version

You should see the version, build date, and changelog URL. If you get "command not found", reopen your shell so the new PATH is picked up, then try again.

Configuration

  • Run vulncheck auth login to authenticate with your VulnCheck account.
  • Alternatively vulncheck will respect the VC_TOKEN environment variable.
  • vulncheck auth by itself will show other options like checking your status and logging out.

VC_TOKEN wins over the saved config file. Because of that, auth login and auth logout refuse while it is set — otherwise they would report success having changed nothing that takes effect. Run vulncheck auth status to see which of the two sources the active token came from.

Agentic / scripted usage

The CLI is designed to be safe to drive from scripts and AI agents. This section is the contract — the surfaces below are intended to remain stable across releases (additions are not breaking changes; renames / removals are).

Global flags

FlagEffect
--jsonEmit JSON on stdout; route info/progress lines to stderr; errors emitted as a structured envelope.
--quietSuppress informational output. Errors and payloads still render.
--no-colorDisable ANSI styling. Also honours the NO_COLOR env var.
--no-interactiveRefuse to block on TUI prompts; commands that need a prompt return an error instead. Implied by --json, non-TTY stdin/stdout, and any of the CI / BUILD_NUMBER / RUN_ID env vars.

Environment variables

VariableEffect
VC_TOKENAPI token. Takes precedence over ~/.config/vulncheck/vulncheck.yaml. While it is set, auth login and auth logout refuse rather than writing a config file that would be ignored — unset VC_TOKEN first.
NO_COLORAny non-empty value disables ANSI styling.
CI / BUILD_NUMBER / RUN_IDAny of these set implies non-interactive mode (no prompts).

Exit codes

CodeMeaning
0Success.
1Generic / internal error.
2Validation failure (bad args, missing required flag, malformed request).
3Auth failure (no token, or the server rejected the token).
4Resource not found (HTTP 404, no such index).
5Rate limited (HTTP 429).
6Network failure (DNS, connection refused, timeout).
130Cancelled by SIGINT (POSIX 128 + 2).

Error envelope

In --json mode, errors are emitted to stdout as:

{
"schema_version": 1,
"error": {
"code": "auth_required",
"message": "...",
"http_status": 401,
"hint": "..."
}
}

code is one of: internal, validation, auth_required, auth_invalid, not_found, rate_limited, network, bad_request, cancelled. http_status is omitted for non-HTTP errors. hint is optional remediation context — present only when the message alone isn't actionable (e.g. naming VC_TOKEN as the source of a rejected token) — and is rendered on stderr as hint: ... outside --json mode.

Probe commands

Use these to inspect the CLI itself before dispatching work:

vulncheck version --json
# {"schema_version": 1, "version": "...", "build_date": "...", "changelog_url": "..."}
vulncheck auth status --json
# {"schema_version": 1, "authenticated": true, "token_source": "env", "user": "...", "email": "..."}# Exit 0 even when authenticated=false — agents dispatch on the bool.# token_shadowed: true is added when VC_TOKEN is overriding a *different*# token saved in vulncheck.yaml — the usual cause of "I logged in but# nothing changed". Omitted otherwise, so the CI shape (VC_TOKEN only,# no config file) never reports shadowing.
vulncheck commands
# {"schema_version": 1, "root": {"name":"vulncheck", "subcommands":[...]}, ...}# Machine-readable dump of the whole command tree — every subcommand,# every flag (with type + default + usage), aliases, deprecation. Use# this instead of parsing --help. Auth is not required.

Pagination

vulncheck token list --json --limit 10 --page 2
vulncheck token list --json --all # auto-paginate, single combined array
vulncheck index list <index> --json --all

Batch input

purl, cpe, tag, pdns accept multiple inputs via positional args, stdin (when piped), or --from-file <path>. Blank lines and #-prefixed comments in the file are ignored. Batch mode requires --json.

# Stdin
cat purls.txt | vulncheck purl --json
# File
vulncheck cpe --from-file ./cpes.txt --json

The batch envelope is a stable array, one row per input, in input order:

[
{"input": "pkg:npm/lodash@4.0.0", "data": { ... }},
{"input": "pkg:bad/string", "error": "no result returned for this purl"}
]

Cancellation

SIGINT / SIGTERM cancel in-flight HTTP requests cleanly via context propagation. Long-running ops (scan, offline sync, backup download) honour cancellation; partial files are removed on the way out where applicable.

JSON output discipline

When --json is set:

  • stdout carries only the JSON payload (or the error envelope above).
  • stderr carries every info line, progress bar, spinner, prompt, and warning.
  • TUI elements (bubbletea, huh prompts) are automatically suppressed.

This means vulncheck <cmd> --json | jq always works — no tail/sed cleanup needed.

Available commands

Every command below accepts the global flags (--json, --quiet, --no-color, --no-interactive, --help/-h). Per-command flag tables list only what is specific to that command.

  • auth — log in / out, check status
  • token — API token management
  • indices — list or browse the catalogue of indices
  • index — query one index
  • backup — download or fetch a signed URL for an index backup
  • cpe — look up CVEs for a CPE (single or batch)
  • purl — look up CVEs for a PURL (single or batch)
  • tag — look up IP-intelligence tag membership
  • pdns — look up passive-DNS list membership
  • rule — look up initial-access-intelligence rules
  • scan — scan a directory (SBOM + vulnerability lookup)
  • offline — sync indices locally and query them without hitting the API
  • version — print the CLI version
  • upgrade — update the CLI in place

auth

vulncheck auth login
vulncheck auth logout
vulncheck auth status [--json]

login walks you through a browser or paste-token flow — refuses when --no-interactive. status --json calls /me to actually verify the token; the payload always has .authenticated: bool and exits 0 regardless (see Probe commands).

token

vulncheck token list [--limit N] [--page N] [--all]
vulncheck token create <label>
vulncheck token remove <id>
vulncheck token browse

list --json --all auto-paginates and returns one combined JSON array.

create --json returns {schema_version, id, label, token_on_stderr: true} and prints the actual secret on a single line to stderr. That way a pipeline like vulncheck token create ci-runner --json > token.json never captures the secret in the JSON file. Pass --allow-token-on-stdout if you want the token embedded in the JSON payload instead ({... "token": "vc_..."}) — you're taking responsibility for the redirection.

browse is interactive; it refuses with exit 2 under --no-interactive.

indices

vulncheck indices list [<search>]
vulncheck indices browse [<search>]

Lists (or interactively browses) the catalogue of available indices. list accepts a fuzzy search term.

index

vulncheck index list <index> [--full] [--all] [query flags]
vulncheck index browse <index> [query flags]

list --all walks next_cursor end-to-end and emits one combined array. browse runs an interactive viewport; under --json (or --no-interactive) it falls back to list output. Query flags come from the index's schema (--cve, --alias, --limit, --cursor, etc.); see the API docs for the full set.

backup

vulncheck backup url <index> # signed temporary URL only
vulncheck backup download <index> # download the archive

download picks the bubbletea progress bar for TTYs and a plain SIGINT-safe streaming download (writing to <name>.part and renaming on success) for headless callers. url --json returns {filename, sha256, date_added, url}.

cpe

vulncheck cpe <cpe>
vulncheck cpe --from-file cpes.txt --json
echo cpe:2.3:… | vulncheck cpe --json

Batch mode (multiple positional args, --from-file, or piped stdin) requires --json and returns the stable batch envelope.

purl

vulncheck purl <purl>
vulncheck purl --from-file purls.txt --json

Same batch semantics as cpe. Batch requests are sent as a single /v3/purls POST rather than N GETs.

tag

vulncheck tag <tag-name>
vulncheck tag --from-file tags.txt --json

Returns the newline-split list of matches for the given IP-intelligence tag. Batch input supported.

pdns

vulncheck pdns <list-name>
vulncheck pdns --from-file lists.txt --json

Passive-DNS list membership. Batch input supported.

rule

vulncheck rule <rule-name> [--table]

Look up an initial-access-intelligence rule. --table renders single-column table output; --json (global) supersedes.

scan

vulncheck scan <path> [flags]
vulncheck scan --sbom-input-file <file> --json

Generates an SBOM for <path>, extracts PURLs, then either calls the vulncheck API (default) or queries local offline indices.

FlagDescription
-f, --fileSave results to a file.
-n, --file-nameCustom output filename (default output.json).
-o, --sbom-output-fileSave the generated SBOM to a file.
-i, --sbom-input-fileLoad an existing SBOM instead of generating one.
-s, --sbom-onlyGenerate the SBOM without running the vuln lookup.
-c, --include-cpesExtract CPEs as well as PURLs (offline mode only, for now).
--offlineUse locally-synced indices instead of the API.
--offline-metaPopulate metadata (CVSS, KEV, description) from vulncheck-nvd2 in offline mode.
--warn-on-indexWarn instead of failing when a required offline index isn't cached.
--disable-uiAlias for --no-interactive (kept for backwards compatibility).
--enrichEnrich the generated SBOM with metadata from proxy.golang.org / Maven Central / NPM / PyPI. Comma-separated scopes: all, golang, java, javascript, python; prefix with - to exclude (e.g. all,-java). Off by default; requires network — cannot be combined with --offline or --sbom-input-file.

The progress TUI is auto-suppressed whenever the renderer can't safely draw it (--json, --no-interactive, non-TTY, CI).

offline

vulncheck offline sync [--add <name>|--remove <name>|--purge|--force|--choose] [--json]
vulncheck offline status [--json]
vulncheck offline purl <purl> [--json]
vulncheck offline cpe <cpe> [--json] [--stats]
vulncheck offline ipintel <3d|10d|30d> [--country=...] [--asn=...] [--cidr=...] [--json]

Local queries against synced indices. sync --json returns {schema_version, action, selected, elapsed_seconds}; status --json returns the cached-index array. Under --no-interactive the sync command refuses without an explicit --add / --remove / --purge (no picker prompt).

version

vulncheck version [--json]

--json returns {schema_version, version, build_date, changelog_url} — the canonical probe for agents.

upgrade

vulncheck upgrade status
vulncheck upgrade latest [--force]
vulncheck upgrade --version X.X.X
  • upgrade status — check whether a newer release is available.
  • upgrade latest — install the newest release. --force reinstalls the current version.
  • upgrade --version X.X.X — install a specific version.

Tip

Looking to plug this into your Github Repository? Check out our own Action

About

VulnCheck's official command line tool

Resources

Contributing

Stars

159 stars

Watchers

7 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

VulnCheck Logo

The VulnCheck CLI

vulncheck is access to the VulnCheck API on the command line. It brings index browsing, backup management, and vulnerability scanning to the terminal.

ReleaseGo ReferenceLintTestsPRs Welcome

Installation

Provided install scripts

You can easily install vulncheck using an install script. Choose the script and method that matches your operating system:

macOS and Linux

Open a terminal and run:

curl -sSL https://raw.githubusercontent.com/vulncheck-oss/cli/main/install.sh | bash

This will prompt you to choose between system-wide installation (requires sudo) or local user installation.

Note

The install script also supports non-interactive installation options:

  • --sudo for system-wide installation without prompts
  • --non-sudo for local user installation without prompts
  • --help or -h to see all available options
curl -sSL https://raw.githubusercontent.com/vulncheck-oss/cli/main/install.sh | bash -s -- --help

Windows

Open PowerShell and run:

iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/vulncheck-oss/cli/main/install.ps1'))

vulncheck binaries are also available for MacOS, Linux, and Windows. You can download precompiled binaries from our releases page

Verify the installation

Once installed, confirm the binary prints the desired version:

vulncheck version

You should see the version, build date, and changelog URL. If you get "command not found", reopen your shell so the new PATH is picked up, then try again.

Configuration

  • Run vulncheck auth login to authenticate with your VulnCheck account.
  • Alternatively vulncheck will respect the VC_TOKEN environment variable.
  • vulncheck auth by itself will show other options like checking your status and logging out.

VC_TOKEN wins over the saved config file. Because of that, auth login and auth logout refuse while it is set — otherwise they would report success having changed nothing that takes effect. Run vulncheck auth status to see which of the two sources the active token came from.

Agentic / scripted usage

The CLI is designed to be safe to drive from scripts and AI agents. This section is the contract — the surfaces below are intended to remain stable across releases (additions are not breaking changes; renames / removals are).

Global flags

FlagEffect
--jsonEmit JSON on stdout; route info/progress lines to stderr; errors emitted as a structured envelope.
--quietSuppress informational output. Errors and payloads still render.
--no-colorDisable ANSI styling. Also honours the NO_COLOR env var.
--no-interactiveRefuse to block on TUI prompts; commands that need a prompt return an error instead. Implied by --json, non-TTY stdin/stdout, and any of the CI / BUILD_NUMBER / RUN_ID env vars.

Environment variables

VariableEffect
VC_TOKENAPI token. Takes precedence over ~/.config/vulncheck/vulncheck.yaml. While it is set, auth login and auth logout refuse rather than writing a config file that would be ignored — unset VC_TOKEN first.
NO_COLORAny non-empty value disables ANSI styling.
CI / BUILD_NUMBER / RUN_IDAny of these set implies non-interactive mode (no prompts).

Exit codes

CodeMeaning
0Success.
1Generic / internal error.
2Validation failure (bad args, missing required flag, malformed request).
3Auth failure (no token, or the server rejected the token).
4Resource not found (HTTP 404, no such index).
5Rate limited (HTTP 429).
6Network failure (DNS, connection refused, timeout).
130Cancelled by SIGINT (POSIX 128 + 2).

Error envelope

In --json mode, errors are emitted to stdout as:

{
"schema_version": 1,
"error": {
"code": "auth_required",
"message": "...",
"http_status": 401,
"hint": "..."
}
}

code is one of: internal, validation, auth_required, auth_invalid, not_found, rate_limited, network, bad_request, cancelled. http_status is omitted for non-HTTP errors. hint is optional remediation context — present only when the message alone isn't actionable (e.g. naming VC_TOKEN as the source of a rejected token) — and is rendered on stderr as hint: ... outside --json mode.

Probe commands

Use these to inspect the CLI itself before dispatching work:

vulncheck version --json
# {"schema_version": 1, "version": "...", "build_date": "...", "changelog_url": "..."}
vulncheck auth status --json
# {"schema_version": 1, "authenticated": true, "token_source": "env", "user": "...", "email": "..."}# Exit 0 even when authenticated=false — agents dispatch on the bool.# token_shadowed: true is added when VC_TOKEN is overriding a *different*# token saved in vulncheck.yaml — the usual cause of "I logged in but# nothing changed". Omitted otherwise, so the CI shape (VC_TOKEN only,# no config file) never reports shadowing.
vulncheck commands
# {"schema_version": 1, "root": {"name":"vulncheck", "subcommands":[...]}, ...}# Machine-readable dump of the whole command tree — every subcommand,# every flag (with type + default + usage), aliases, deprecation. Use# this instead of parsing --help. Auth is not required.

Pagination

vulncheck token list --json --limit 10 --page 2
vulncheck token list --json --all # auto-paginate, single combined array
vulncheck index list <index> --json --all

Batch input

purl, cpe, tag, pdns accept multiple inputs via positional args, stdin (when piped), or --from-file <path>. Blank lines and #-prefixed comments in the file are ignored. Batch mode requires --json.

# Stdin
cat purls.txt | vulncheck purl --json
# File
vulncheck cpe --from-file ./cpes.txt --json

The batch envelope is a stable array, one row per input, in input order:

[
{"input": "pkg:npm/lodash@4.0.0", "data": { ... }},
{"input": "pkg:bad/string", "error": "no result returned for this purl"}
]

Cancellation

SIGINT / SIGTERM cancel in-flight HTTP requests cleanly via context propagation. Long-running ops (scan, offline sync, backup download) honour cancellation; partial files are removed on the way out where applicable.

JSON output discipline

When --json is set:

  • stdout carries only the JSON payload (or the error envelope above).
  • stderr carries every info line, progress bar, spinner, prompt, and warning.
  • TUI elements (bubbletea, huh prompts) are automatically suppressed.

This means vulncheck <cmd> --json | jq always works — no tail/sed cleanup needed.

Available commands

Every command below accepts the global flags (--json, --quiet, --no-color, --no-interactive, --help/-h). Per-command flag tables list only what is specific to that command.

  • auth — log in / out, check status
  • token — API token management
  • indices — list or browse the catalogue of indices
  • index — query one index
  • backup — download or fetch a signed URL for an index backup
  • cpe — look up CVEs for a CPE (single or batch)
  • purl — look up CVEs for a PURL (single or batch)
  • tag — look up IP-intelligence tag membership
  • pdns — look up passive-DNS list membership
  • rule — look up initial-access-intelligence rules
  • scan — scan a directory (SBOM + vulnerability lookup)
  • offline — sync indices locally and query them without hitting the API
  • version — print the CLI version
  • upgrade — update the CLI in place

auth

vulncheck auth login
vulncheck auth logout
vulncheck auth status [--json]

login walks you through a browser or paste-token flow — refuses when --no-interactive. status --json calls /me to actually verify the token; the payload always has .authenticated: bool and exits 0 regardless (see Probe commands).

token

vulncheck token list [--limit N] [--page N] [--all]
vulncheck token create <label>
vulncheck token remove <id>
vulncheck token browse

list --json --all auto-paginates and returns one combined JSON array.

create --json returns {schema_version, id, label, token_on_stderr: true} and prints the actual secret on a single line to stderr. That way a pipeline like vulncheck token create ci-runner --json > token.json never captures the secret in the JSON file. Pass --allow-token-on-stdout if you want the token embedded in the JSON payload instead ({... "token": "vc_..."}) — you're taking responsibility for the redirection.

browse is interactive; it refuses with exit 2 under --no-interactive.

indices

vulncheck indices list [<search>]
vulncheck indices browse [<search>]

Lists (or interactively browses) the catalogue of available indices. list accepts a fuzzy search term.

index

vulncheck index list <index> [--full] [--all] [query flags]
vulncheck index browse <index> [query flags]

list --all walks next_cursor end-to-end and emits one combined array. browse runs an interactive viewport; under --json (or --no-interactive) it falls back to list output. Query flags come from the index's schema (--cve, --alias, --limit, --cursor, etc.); see the API docs for the full set.

backup

vulncheck backup url <index> # signed temporary URL only
vulncheck backup download <index> # download the archive

download picks the bubbletea progress bar for TTYs and a plain SIGINT-safe streaming download (writing to <name>.part and renaming on success) for headless callers. url --json returns {filename, sha256, date_added, url}.

cpe

vulncheck cpe <cpe>
vulncheck cpe --from-file cpes.txt --json
echo cpe:2.3:… | vulncheck cpe --json

Batch mode (multiple positional args, --from-file, or piped stdin) requires --json and returns the stable batch envelope.

purl

vulncheck purl <purl>
vulncheck purl --from-file purls.txt --json

Same batch semantics as cpe. Batch requests are sent as a single /v3/purls POST rather than N GETs.

tag

vulncheck tag <tag-name>
vulncheck tag --from-file tags.txt --json

Returns the newline-split list of matches for the given IP-intelligence tag. Batch input supported.

pdns

vulncheck pdns <list-name>
vulncheck pdns --from-file lists.txt --json

Passive-DNS list membership. Batch input supported.

rule

vulncheck rule <rule-name> [--table]

Look up an initial-access-intelligence rule. --table renders single-column table output; --json (global) supersedes.

scan

vulncheck scan <path> [flags]
vulncheck scan --sbom-input-file <file> --json

Generates an SBOM for <path>, extracts PURLs, then either calls the vulncheck API (default) or queries local offline indices.

FlagDescription
-f, --fileSave results to a file.
-n, --file-nameCustom output filename (default output.json).
-o, --sbom-output-fileSave the generated SBOM to a file.
-i, --sbom-input-fileLoad an existing SBOM instead of generating one.
-s, --sbom-onlyGenerate the SBOM without running the vuln lookup.
-c, --include-cpesExtract CPEs as well as PURLs (offline mode only, for now).
--offlineUse locally-synced indices instead of the API.
--offline-metaPopulate metadata (CVSS, KEV, description) from vulncheck-nvd2 in offline mode.
--warn-on-indexWarn instead of failing when a required offline index isn't cached.
--disable-uiAlias for --no-interactive (kept for backwards compatibility).
--enrichEnrich the generated SBOM with metadata from proxy.golang.org / Maven Central / NPM / PyPI. Comma-separated scopes: all, golang, java, javascript, python; prefix with - to exclude (e.g. all,-java). Off by default; requires network — cannot be combined with --offline or --sbom-input-file.

The progress TUI is auto-suppressed whenever the renderer can't safely draw it (--json, --no-interactive, non-TTY, CI).

offline

vulncheck offline sync [--add <name>|--remove <name>|--purge|--force|--choose] [--json]
vulncheck offline status [--json]
vulncheck offline purl <purl> [--json]
vulncheck offline cpe <cpe> [--json] [--stats]
vulncheck offline ipintel <3d|10d|30d> [--country=...] [--asn=...] [--cidr=...] [--json]

Local queries against synced indices. sync --json returns {schema_version, action, selected, elapsed_seconds}; status --json returns the cached-index array. Under --no-interactive the sync command refuses without an explicit --add / --remove / --purge (no picker prompt).

version

vulncheck version [--json]

--json returns {schema_version, version, build_date, changelog_url} — the canonical probe for agents.

upgrade

vulncheck upgrade status
vulncheck upgrade latest [--force]
vulncheck upgrade --version X.X.X
  • upgrade status — check whether a newer release is available.
  • upgrade latest — install the newest release. --force reinstalls the current version.
  • upgrade --version X.X.X — install a specific version.

Tip

Looking to plug this into your Github Repository? Check out our own Action

About

VulnCheck's official command line tool

Resources

Contributing

Stars

159 stars

Watchers

7 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

Repository files navigation

VulnCheck Logo

The VulnCheck CLI

vulncheck is access to the VulnCheck API on the command line. It brings index browsing, backup management, and vulnerability scanning to the terminal.

ReleaseGo ReferenceLintTestsPRs Welcome

Installation

Provided install scripts

You can easily install vulncheck using an install script. Choose the script and method that matches your operating system:

macOS and Linux

Open a terminal and run:

curl -sSL https://raw.githubusercontent.com/vulncheck-oss/cli/main/install.sh | bash

This will prompt you to choose between system-wide installation (requires sudo) or local user installation.

Note

The install script also supports non-interactive installation options:

  • --sudo for system-wide installation without prompts
  • --non-sudo for local user installation without prompts
  • --help or -h to see all available options
curl -sSL https://raw.githubusercontent.com/vulncheck-oss/cli/main/install.sh | bash -s -- --help

Windows

Open PowerShell and run:

iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/vulncheck-oss/cli/main/install.ps1'))

vulncheck binaries are also available for MacOS, Linux, and Windows. You can download precompiled binaries from our releases page

Verify the installation

Once installed, confirm the binary prints the desired version:

vulncheck version

You should see the version, build date, and changelog URL. If you get "command not found", reopen your shell so the new PATH is picked up, then try again.

Configuration

  • Run vulncheck auth login to authenticate with your VulnCheck account.
  • Alternatively vulncheck will respect the VC_TOKEN environment variable.
  • vulncheck auth by itself will show other options like checking your status and logging out.

VC_TOKEN wins over the saved config file. Because of that, auth login and auth logout refuse while it is set — otherwise they would report success having changed nothing that takes effect. Run vulncheck auth status to see which of the two sources the active token came from.

Agentic / scripted usage

The CLI is designed to be safe to drive from scripts and AI agents. This section is the contract — the surfaces below are intended to remain stable across releases (additions are not breaking changes; renames / removals are).

Global flags

FlagEffect
--jsonEmit JSON on stdout; route info/progress lines to stderr; errors emitted as a structured envelope.
--quietSuppress informational output. Errors and payloads still render.
--no-colorDisable ANSI styling. Also honours the NO_COLOR env var.
--no-interactiveRefuse to block on TUI prompts; commands that need a prompt return an error instead. Implied by --json, non-TTY stdin/stdout, and any of the CI / BUILD_NUMBER / RUN_ID env vars.

Environment variables

VariableEffect
VC_TOKENAPI token. Takes precedence over ~/.config/vulncheck/vulncheck.yaml. While it is set, auth login and auth logout refuse rather than writing a config file that would be ignored — unset VC_TOKEN first.
NO_COLORAny non-empty value disables ANSI styling.
CI / BUILD_NUMBER / RUN_IDAny of these set implies non-interactive mode (no prompts).

Exit codes

CodeMeaning
0Success.
1Generic / internal error.
2Validation failure (bad args, missing required flag, malformed request).
3Auth failure (no token, or the server rejected the token).
4Resource not found (HTTP 404, no such index).
5Rate limited (HTTP 429).
6Network failure (DNS, connection refused, timeout).
130Cancelled by SIGINT (POSIX 128 + 2).

Error envelope

In --json mode, errors are emitted to stdout as:

{
"schema_version": 1,
"error": {
"code": "auth_required",
"message": "...",
"http_status": 401,
"hint": "..."
}
}

code is one of: internal, validation, auth_required, auth_invalid, not_found, rate_limited, network, bad_request, cancelled. http_status is omitted for non-HTTP errors. hint is optional remediation context — present only when the message alone isn't actionable (e.g. naming VC_TOKEN as the source of a rejected token) — and is rendered on stderr as hint: ... outside --json mode.

Probe commands

Use these to inspect the CLI itself before dispatching work:

vulncheck version --json
# {"schema_version": 1, "version": "...", "build_date": "...", "changelog_url": "..."}
vulncheck auth status --json
# {"schema_version": 1, "authenticated": true, "token_source": "env", "user": "...", "email": "..."}# Exit 0 even when authenticated=false — agents dispatch on the bool.# token_shadowed: true is added when VC_TOKEN is overriding a *different*# token saved in vulncheck.yaml — the usual cause of "I logged in but# nothing changed". Omitted otherwise, so the CI shape (VC_TOKEN only,# no config file) never reports shadowing.
vulncheck commands
# {"schema_version": 1, "root": {"name":"vulncheck", "subcommands":[...]}, ...}# Machine-readable dump of the whole command tree — every subcommand,# every flag (with type + default + usage), aliases, deprecation. Use# this instead of parsing --help. Auth is not required.

Pagination

vulncheck token list --json --limit 10 --page 2
vulncheck token list --json --all # auto-paginate, single combined array
vulncheck index list <index> --json --all

Batch input

purl, cpe, tag, pdns accept multiple inputs via positional args, stdin (when piped), or --from-file <path>. Blank lines and #-prefixed comments in the file are ignored. Batch mode requires --json.

# Stdin
cat purls.txt | vulncheck purl --json
# File
vulncheck cpe --from-file ./cpes.txt --json

The batch envelope is a stable array, one row per input, in input order:

[
{"input": "pkg:npm/lodash@4.0.0", "data": { ... }},
{"input": "pkg:bad/string", "error": "no result returned for this purl"}
]

Cancellation

SIGINT / SIGTERM cancel in-flight HTTP requests cleanly via context propagation. Long-running ops (scan, offline sync, backup download) honour cancellation; partial files are removed on the way out where applicable.

JSON output discipline

When --json is set:

  • stdout carries only the JSON payload (or the error envelope above).
  • stderr carries every info line, progress bar, spinner, prompt, and warning.
  • TUI elements (bubbletea, huh prompts) are automatically suppressed.

This means vulncheck <cmd> --json | jq always works — no tail/sed cleanup needed.

Available commands

Every command below accepts the global flags (--json, --quiet, --no-color, --no-interactive, --help/-h). Per-command flag tables list only what is specific to that command.

  • auth — log in / out, check status
  • token — API token management
  • indices — list or browse the catalogue of indices
  • index — query one index
  • backup — download or fetch a signed URL for an index backup
  • cpe — look up CVEs for a CPE (single or batch)
  • purl — look up CVEs for a PURL (single or batch)
  • tag — look up IP-intelligence tag membership
  • pdns — look up passive-DNS list membership
  • rule — look up initial-access-intelligence rules
  • scan — scan a directory (SBOM + vulnerability lookup)
  • offline — sync indices locally and query them without hitting the API
  • version — print the CLI version
  • upgrade — update the CLI in place

auth

vulncheck auth login
vulncheck auth logout
vulncheck auth status [--json]

login walks you through a browser or paste-token flow — refuses when --no-interactive. status --json calls /me to actually verify the token; the payload always has .authenticated: bool and exits 0 regardless (see Probe commands).

token

vulncheck token list [--limit N] [--page N] [--all]
vulncheck token create <label>
vulncheck token remove <id>
vulncheck token browse

list --json --all auto-paginates and returns one combined JSON array.

create --json returns {schema_version, id, label, token_on_stderr: true} and prints the actual secret on a single line to stderr. That way a pipeline like vulncheck token create ci-runner --json > token.json never captures the secret in the JSON file. Pass --allow-token-on-stdout if you want the token embedded in the JSON payload instead ({... "token": "vc_..."}) — you're taking responsibility for the redirection.

browse is interactive; it refuses with exit 2 under --no-interactive.

indices

vulncheck indices list [<search>]
vulncheck indices browse [<search>]

Lists (or interactively browses) the catalogue of available indices. list accepts a fuzzy search term.

index

vulncheck index list <index> [--full] [--all] [query flags]
vulncheck index browse <index> [query flags]

list --all walks next_cursor end-to-end and emits one combined array. browse runs an interactive viewport; under --json (or --no-interactive) it falls back to list output. Query flags come from the index's schema (--cve, --alias, --limit, --cursor, etc.); see the API docs for the full set.

backup

vulncheck backup url <index> # signed temporary URL only
vulncheck backup download <index> # download the archive

download picks the bubbletea progress bar for TTYs and a plain SIGINT-safe streaming download (writing to <name>.part and renaming on success) for headless callers. url --json returns {filename, sha256, date_added, url}.

cpe

vulncheck cpe <cpe>
vulncheck cpe --from-file cpes.txt --json
echo cpe:2.3:… | vulncheck cpe --json

Batch mode (multiple positional args, --from-file, or piped stdin) requires --json and returns the stable batch envelope.

purl

vulncheck purl <purl>
vulncheck purl --from-file purls.txt --json

Same batch semantics as cpe. Batch requests are sent as a single /v3/purls POST rather than N GETs.

tag

vulncheck tag <tag-name>
vulncheck tag --from-file tags.txt --json

Returns the newline-split list of matches for the given IP-intelligence tag. Batch input supported.

pdns

vulncheck pdns <list-name>
vulncheck pdns --from-file lists.txt --json

Passive-DNS list membership. Batch input supported.

rule

vulncheck rule <rule-name> [--table]

Look up an initial-access-intelligence rule. --table renders single-column table output; --json (global) supersedes.

scan

vulncheck scan <path> [flags]
vulncheck scan --sbom-input-file <file> --json

Generates an SBOM for <path>, extracts PURLs, then either calls the vulncheck API (default) or queries local offline indices.

FlagDescription
-f, --fileSave results to a file.
-n, --file-nameCustom output filename (default output.json).
-o, --sbom-output-fileSave the generated SBOM to a file.
-i, --sbom-input-fileLoad an existing SBOM instead of generating one.
-s, --sbom-onlyGenerate the SBOM without running the vuln lookup.
-c, --include-cpesExtract CPEs as well as PURLs (offline mode only, for now).
--offlineUse locally-synced indices instead of the API.
--offline-metaPopulate metadata (CVSS, KEV, description) from vulncheck-nvd2 in offline mode.
--warn-on-indexWarn instead of failing when a required offline index isn't cached.
--disable-uiAlias for --no-interactive (kept for backwards compatibility).
--enrichEnrich the generated SBOM with metadata from proxy.golang.org / Maven Central / NPM / PyPI. Comma-separated scopes: all, golang, java, javascript, python; prefix with - to exclude (e.g. all,-java). Off by default; requires network — cannot be combined with --offline or --sbom-input-file.

The progress TUI is auto-suppressed whenever the renderer can't safely draw it (--json, --no-interactive, non-TTY, CI).

offline

vulncheck offline sync [--add <name>|--remove <name>|--purge|--force|--choose] [--json]
vulncheck offline status [--json]
vulncheck offline purl <purl> [--json]
vulncheck offline cpe <cpe> [--json] [--stats]
vulncheck offline ipintel <3d|10d|30d> [--country=...] [--asn=...] [--cidr=...] [--json]

Local queries against synced indices. sync --json returns {schema_version, action, selected, elapsed_seconds}; status --json returns the cached-index array. Under --no-interactive the sync command refuses without an explicit --add / --remove / --purge (no picker prompt).

version

vulncheck version [--json]

--json returns {schema_version, version, build_date, changelog_url} — the canonical probe for agents.

upgrade

vulncheck upgrade status
vulncheck upgrade latest [--force]
vulncheck upgrade --version X.X.X
  • upgrade status — check whether a newer release is available.
  • upgrade latest — install the newest release. --force reinstalls the current version.
  • upgrade --version X.X.X — install a specific version.

Tip

Looking to plug this into your Github Repository? Check out our own Action

About

VulnCheck's official command line tool

Resources

Contributing

Stars

159 stars

Watchers

7 watching

Forks

Releases

Packages

Used by

Contributors

Languages