vulkro gate
Fail a build only on findings that are new compared with a git branch or commit, so existing debt never blocks a change.
vulkro gate --base origin/main
It scans the working tree and the base ref, and reports only findings in the working tree that are not in the base.
gate or scan --gate-vs
vulkro gate --base <ref>compares the full findings of both trees. It catches a new caller that makes an old sink reachable.vulkro scan --gate-vs <ref>only looks at changed lines. It is cheaper but misses that case.
The Salesforce CLI's flag of the same name works differently: vulkro-sf scan --gate-vs <ref> scans the base ref as well and matches findings across the two trees, like vulkro gate --base (see Salesforce CI/CD).
A new finding marked Not checked (a class Vulkro flags but cannot decide offline, such as object-level authorization) is reported but never fails the gate. Set VULKRO_GATE_SEVERITY_ONLY=1 to let them fail it again.
Flags
| Flag | Description |
|---|---|
[PATH] | Project root. Default .. |
--base <REF> | Ref to compare against (main, origin/main, a SHA). Required unless VULKRO_GATE_BASE is set. |
--format <FMT> | table (default), json (totals plus new findings) or sarif (new findings only). |
GitHub Actions
- uses: actions/checkout@v4
with:
fetch-depth: 0 # the base ref must be in history
- run: vulkro gate --base origin/${{ github.base_ref }}
Exit codes
| Code | Meaning |
|---|---|
0 | No new findings that fail the gate. |
1 | New findings that fail the gate, or no active licence (license_required). |
2 | Bad ref, git not available, or scan failure. Also 2 when no source file could be read. |
Inside a git hook, a machine without a licence is never blocked: the gate exits 0 with a notice.
See also: vulkro install-hook, CI/CD integration.
Command reference
Generated from vulkro gate --help (vulkro 0.41.0). Run scripts/gen-docs.sh in the product repository to refresh it; do not edit this section by hand.
Fail a build only on findings that are new compared with a git branch or commit.
vulkro gate [OPTIONS] [PATH]
Arguments
| Argument | Description |
|---|---|
[PATH] | Path to the project root. Defaults to the current directory. Default: .. |
Options
| Flag | Description |
|---|---|
--base <REF> | Git ref to compare against (e.g. main, origin/main, a SHA). Required unless VULKRO_GATE_BASE is set. |
--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. |
-f, --format <FORMAT> | Output format: table (default), json, or sarif. JSON includes totals + the new-findings array; SARIF ships only the new findings (the consumer is a PR gate, pre-existing findings are deliberately suppressed because they were already in the base ref) Default: table. |
-q, --quiet | Print only warnings and errors on stderr: no progress, tips or next-step hints. Results on stdout and exit codes are unchanged. |
--no-color | Turn off coloured output. Colour is also off when NO_COLOR is set to a non-empty value or TERM=dumb. |
-h, --help | Print help (see a summary with '-h') |
Full vulkro gate --help
Fail a build only on findings that are new compared with a git branch or commit.
Two-tree finding-diff gate. Scans the working tree AND a baseline git ref, then surfaces only the findings present in the working tree but not the baseline. Exit code 1 fires ONLY on new findings, so the gate never blocks a PR on pre-existing technical debt.
This is the canonical "fail-on-new-only" CI gate. The related `scan --gate-vs <ref>` flag filters by changed-line ranges only (cheaper, but blind to new callers that make existing sinks reachable); `gate --base <ref>` catches those because it compares the full finding sets across both trees.
A new finding whose `disposition` is `not-examined` is REPORTED but never fails the gate: that is the class vulkro flags structurally but cannot decide offline (object-level and function-level authorization, and the absence-asserting rules), and failing a build on it asserts a verdict the analysis declined to reach. The JSON format reports both numbers (`totals.gating` and `totals.withheld_not_examined`), and a warning on stderr names how many rows were withheld.
Inside a git hook (the pre-commit hook `vulkro install-hook` writes), a machine without a licence never blocks the commit: the gate checks nothing, exits 0, and one stderr line names the `release-gate` capability, how to get a licence, and ends with `vulkro: license_required`. A hook is recognised by `VULKRO_GIT_HOOK`, or by the `GIT_INDEX_FILE` git exports to every commit hook, so a hook an earlier release installed gets the same treatment. Outside a hook the command refuses as every scanning command does without a licence (exit 1 and the `license_required` marker).
Environment variables: VULKRO_GATE_BASE Default base ref. Overridden by --base. Useful in CI lanes that always compare against `origin/main`: set it once and forget about it. VULKRO_GATE_SEVERITY_ONLY Set to 1 to restore the previous behaviour: severity alone decides and `not-examined` rows fail the build again. Off by default. VULKRO_GIT_HOOK Exported by the hooks `vulkro install-hook` writes (set to the hook name) to mark a run started by a git hook; see above. Not something you set yourself.
Exit codes: 0 no new gating findings vs the baseline. 1 one or more new gating findings (the gate is the report). 2 error: bad ref, git not available, scan failure. Without a licence: 1 with the `license_required` marker, or 0 with a notice inside a git hook.
"No new findings" is never 0 when the WORKING tree examined no source file at all: a diff of two trees neither of which was read is empty for the wrong reason. That case is 2 when nothing at all was reported and 1 when the passes that need no extractor did report findings.
Usage: vulkro gate [OPTIONS] [PATH]
Arguments:
[PATH]
Path to the project root. Defaults to the current directory
[default: .]
Options:
--base <REF>
Git ref to compare against (e.g. `main`, `origin/main`, a SHA). Required unless `VULKRO_GATE_BASE` is set
--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
-f, --format <FORMAT>
Output format: `table` (default), `json`, or `sarif`. JSON includes totals + the new-findings array; SARIF ships only the new findings (the consumer is a PR gate, pre-existing findings are deliberately suppressed because they were already in the base ref)
[default: table]
-q, --quiet
Print only warnings and errors on stderr: no progress, tips or next-step hints. Results on stdout and exit codes are unchanged
--no-color
Turn off coloured output. Colour is also off when NO_COLOR is set to a non-empty value or TERM=dumb
-h, --help
Print help (see a summary with '-h')