vulkro diff
Show how the API surface changed since a git branch, tag or commit.
vulkro diff origin/main
vulkro diff v1.0.0 . --format json
It prints the change and never fails on it. To fail a build on findings new since a ref, use vulkro gate --base <ref>.
Arguments and flags
| Argument or flag | Description |
|---|---|
[BASE] | Git ref to compare against, for example main, HEAD~1, v1.0.0. Default main. |
[PATH] | Project root. Default .. |
-f, --format <FMT> | table (default), json, gh-pr, junit, csv and the other output formats. |
--ai | Add a plain-language summary of the security change (new unauthenticated routes, removed auth checks, new findings) from your AI model. Advisory only: it never changes the diff or the exit code. See vulkro ai. |
--ai-model <MODEL>, --ai-url <URL> | Override the model or runtime for --ai. |
Exit codes
0 diff printed, 2 bad ref or a scan or IO error. It never returns 1.
See also: vulkro history, Baselines.
Command reference
Generated from vulkro diff --help (vulkro 0.41.0). Run scripts/gen-docs.sh in the product repository to refresh it; do not edit this section by hand.
Show which endpoints changed since a git branch, tag or commit.
vulkro diff [OPTIONS] [BASE] [PATH]
Arguments
| Argument | Description |
|---|---|
[BASE] | Base git ref to compare against (e.g. main, HEAD~1, v1.0.0) Default: main. |
[PATH] | Path to the project root (default: current directory) Default: .. |
Options
| Flag | Description |
|---|---|
-f, --format <FORMAT> | Output format. Default: table. |
--offline | Hard-disable every outbound network call for this run (sets VULKRO_OFFLINE=1). Blocks the CVE feed, the license heartbeat, the update check, webhooks, and any cloud AI endpoint; a loopback model (http://127.0.0.1, http://localhost) is still allowed. Equivalent to exporting VULKRO_OFFLINE=1, and the flag wins when both are set. |
--ai | [advisory] Attach a plain-language AI SECURITY-DELTA narrative to the surface diff: new unauthenticated routes, removed auth checks, and new / regressed findings, explained for a reviewer. The resolved LOCAL model (see vulkro ai) narrates ONLY the deterministic signals; it never changes the diff, the findings, or the exit code. The narrative is additive (a ai_narrative field in JSON, a labelled block in text), labelled advisory / non-deterministic / excluded-from-benchmark, and omitted entirely without --ai. A loopback model is allowed under VULKRO_OFFLINE; a cloud url is refused offline. AI off or unreachable prints a note and leaves the diff unchanged. |
-q, --quiet | Print only warnings and errors on stderr: no progress, tips or next-step hints. Results on stdout and exit codes are unchanged. |
--ai-model <MODEL> | AI model tag override for --ai (highest precedence). Overrides VULKRO_AI_MODEL, the saved vulkro ai use selection, and the smart default. Example: --ai-model qwen2.5-coder:7b |
--no-color | Turn off coloured output. Colour is also off when NO_COLOR is set to a non-empty value or TERM=dumb. |
--ai-url <URL> | AI runtime base url override for --ai (OpenAI-compatible). Example: --ai-url http://127.0.0.1:11434/v1. A loopback url is allowed under VULKRO_OFFLINE; a cloud url is refused offline. |
-h, --help | Print help (see a summary with '-h') |
Full vulkro diff --help
Show which endpoints changed since a git branch, tag or commit.
Compare current API surface against a git ref (branch, tag, or SHA).
Exit code: 0 diff rendered, 2 on a bad ref or a scan / IO error. It prints the surface delta and does not fail on it, so it never returns 1 (use `vulkro gate --base <ref>` to fail a build on findings new since a ref).
Usage: vulkro diff [OPTIONS] [BASE] [PATH]
Arguments:
[BASE]
Base git ref to compare against (e.g. main, HEAD~1, v1.0.0)
[default: main]
[PATH]
Path to the project root (default: current directory)
[default: .]
Options:
-f, --format <FORMAT>
Output format
Possible values:
- table
- json
- sarif
- gh-pr
- gh-pr-inline-comments: GitHub PR per-finding **inline review comments**. NDJSON, one `{path, line, side, severity, rule_id, fingerprint, body}` object per line. Designed to be piped straight to a `gh api` loop so `vulkro gate` can drop comments next to the offending line on the Files Changed tab without going through a GitHub App. See the GitHub CLI integration guide at docs.vulkro.com. `gh-pr-inline` is accepted as an alias: it is the name the docs and `vulkro-sf` use
- github-annotations: GitHub Actions / GitLab CI **PR annotations**. One workflow-command line per finding (`::error file=...,line=...,endLine=...,title=<rule id>::<message> (<helpUri>)`). Printed straight to a CI job's stdout, GitHub turns each line into an inline annotation pinned to `file:line` on the Files Changed tab; GitLab CI's annotation parser reads the same grammar. When run against a baseline (`--gate-vs` / a `gate` flow) only NEW findings are annotated so a first run does not paper the PR
- gitlab-mr: GitLab Merge-Request comment: GitLab-flavored Markdown with collapsible blocks
- bitbucket-pr: Bitbucket Pull-Request comment: flat Markdown (Bitbucket does not render `<details>`)
- azure-pr: Azure DevOps Pull-Request comment: flat Markdown (shared with Bitbucket)
- junit
- csv
- cyclonedx: CycloneDX 1.6 JSON SBOM (uses `ScanResult.packages`)
- cyclonedx-1.7: CycloneDX 1.7 JSON SBOM. Same component shape as `cyclonedx`; emits the newer `specVersion`. Offered alongside 1.6 (which stays default)
- spdx: SPDX 2.3 JSON SBOM
- spdx3: SPDX 3.0.1 JSON-LD SBOM (`@context` + `@graph` of typed elements). Offered alongside SPDX 2.3, which stays the default for `--format spdx`
- cbom: CycloneDX 1.6 CBOM (Cryptographic Bill of Materials): one `cryptographic-asset` component per detected weak algorithm (MD5, SHA-1, ECB, RC4, DES, static IV, insecure RNG), with file:line occurrences inlined under `evidence.occurrences`. Compliance buyers (FedRAMP, post-quantum readiness reviews) ask for this as a distinct artefact from the library SBOM
- openvex: OpenVEX 0.2.0 exploitability statements for each dependency CVE (`affected` / `not_affected` / `under_investigation`), with `not_affected` backed by reachability analysis. Pairs with an SBOM
- cyclonedx-vex: CycloneDX 1.6 VEX: the same exploitability verdicts as `openvex`, in a CycloneDX `vulnerabilities[].analysis` document
- cbom-1.7: CycloneDX 1.7 CBOM. Same crypto-asset grouping as `cbom` plus a richer post-quantum descriptor. Offered alongside 1.6 (default)
- aibom: CycloneDX 1.6 ML-BOM (AIBOM): the AI SDKs and frameworks the project declares or imports, the model identifiers its code names, model files in the repository (hashed, pickle formats flagged) and the MCP servers and tools it declares, each with file:line evidence
- pdf: PDF render of the executive HTML report (requires `wkhtmltopdf` on PATH)
- ropa-md: GDPR Article 30 Records-of-Processing template - Markdown
- ropa-html: GDPR Article 30 Records-of-Processing template - HTML
- ndjson: Newline-delimited JSON: one finding per line plus a trailing summary line. Designed for SIEM ingestion and `jq` filter pipelines
- evidence-graph: Evidence-graph JSON (`evidence-graph/1.0`): a stable, versioned, AI-consumable document that composes endpoints, taint source -> sink flows, reachability verdicts, findings, and the dependency SBOM into one graph. Meant to be handed to an external AI agent as deterministic ground truth (Vulkro embeds no model; the agent brings its own). Pairs with `vulkro aggregate` for cross-repo linking. See `docs/ai-tool/`
[default: table]
--offline
Hard-disable every outbound network call for this run (sets VULKRO_OFFLINE=1). Blocks the CVE feed, the license heartbeat, the update check, webhooks, and any cloud AI endpoint; a loopback model (http://127.0.0.1, http://localhost) is still allowed. Equivalent to exporting VULKRO_OFFLINE=1, and the flag wins when both are set
--ai
[advisory] Attach a plain-language AI SECURITY-DELTA narrative to the surface diff: new unauthenticated routes, removed auth checks, and new / regressed findings, explained for a reviewer. The resolved LOCAL model (see `vulkro ai`) narrates ONLY the deterministic signals; it never changes the diff, the findings, or the exit code. The narrative is additive (a `ai_narrative` field in JSON, a labelled block in text), labelled advisory / non-deterministic / excluded-from-benchmark, and omitted entirely without `--ai`. A loopback model is allowed under VULKRO_OFFLINE; a cloud url is refused offline. AI off or unreachable prints a note and leaves the diff unchanged
-q, --quiet
Print only warnings and errors on stderr: no progress, tips or next-step hints. Results on stdout and exit codes are unchanged
--ai-model <MODEL>
AI model tag override for `--ai` (highest precedence). Overrides VULKRO_AI_MODEL, the saved `vulkro ai use` selection, and the smart default. Example: `--ai-model qwen2.5-coder:7b`
--no-color
Turn off coloured output. Colour is also off when NO_COLOR is set to a non-empty value or TERM=dumb
--ai-url <URL>
AI runtime base url override for `--ai` (OpenAI-compatible). Example: `--ai-url http://127.0.0.1:11434/v1`. A loopback url is allowed under VULKRO_OFFLINE; a cloud url is refused offline
-h, --help
Print help (see a summary with '-h')