@vibgrate/cli 2026.702.1 → 2026.703.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/DOCS.md +521 -146
  2. package/LICENSE +202 -0
  3. package/NOTICE +40 -0
  4. package/README.md +232 -250
  5. package/dist/baseline-D2T3V76P.js +6 -0
  6. package/dist/baseline-D2T3V76P.js.map +1 -0
  7. package/dist/chunk-4M2MUQRO.js +800 -0
  8. package/dist/chunk-4M2MUQRO.js.map +1 -0
  9. package/dist/chunk-E7Q3P6V7.js +6267 -0
  10. package/dist/chunk-E7Q3P6V7.js.map +1 -0
  11. package/dist/chunk-ROWQLHEX.js +31 -0
  12. package/dist/chunk-ROWQLHEX.js.map +1 -0
  13. package/dist/chunk-RXP66R2E.js +39 -0
  14. package/dist/chunk-RXP66R2E.js.map +1 -0
  15. package/dist/chunk-TVPE5CA2.js +11389 -0
  16. package/dist/chunk-TVPE5CA2.js.map +1 -0
  17. package/dist/chunk-X5YT263H.js +912 -0
  18. package/dist/chunk-X5YT263H.js.map +1 -0
  19. package/dist/cli.d.ts +44 -1
  20. package/dist/cli.js +3816 -165
  21. package/dist/cli.js.map +1 -0
  22. package/dist/fs-7KZ4F3SB.js +3 -0
  23. package/dist/fs-7KZ4F3SB.js.map +1 -0
  24. package/dist/index.d.ts +1010 -1
  25. package/dist/index.js +42 -1
  26. package/dist/index.js.map +1 -0
  27. package/dist/parse-worker.d.ts +23 -0
  28. package/dist/parse-worker.js +32 -0
  29. package/dist/parse-worker.js.map +1 -0
  30. package/dist/types-C6ZyQpa9.d.ts +168 -0
  31. package/grammars/tree-sitter-bash.wasm +0 -0
  32. package/grammars/tree-sitter-c.wasm +0 -0
  33. package/grammars/tree-sitter-c_sharp.wasm +0 -0
  34. package/grammars/tree-sitter-cpp.wasm +0 -0
  35. package/grammars/tree-sitter-dart.wasm +0 -0
  36. package/grammars/tree-sitter-elixir.wasm +0 -0
  37. package/grammars/tree-sitter-go.wasm +0 -0
  38. package/grammars/tree-sitter-java.wasm +0 -0
  39. package/grammars/tree-sitter-javascript.wasm +0 -0
  40. package/grammars/tree-sitter-kotlin.wasm +0 -0
  41. package/grammars/tree-sitter-lua.wasm +0 -0
  42. package/grammars/tree-sitter-php.wasm +0 -0
  43. package/grammars/tree-sitter-python.wasm +0 -0
  44. package/grammars/tree-sitter-ruby.wasm +0 -0
  45. package/grammars/tree-sitter-rust.wasm +0 -0
  46. package/grammars/tree-sitter-scala.wasm +0 -0
  47. package/grammars/tree-sitter-swift.wasm +0 -0
  48. package/grammars/tree-sitter-tsx.wasm +0 -0
  49. package/grammars/tree-sitter-typescript.wasm +0 -0
  50. package/grammars/tree-sitter-zig.wasm +0 -0
  51. package/package.json +68 -33
  52. package/scripts/postinstall.mjs +84 -0
  53. package/skills/README.md +58 -0
  54. package/skills/vg/SKILL.md +42 -0
  55. package/HCS-RUNTIME-SETUP.md +0 -73
  56. package/LICENSE.md +0 -45
  57. package/dist/baseline-TJDKYSFL.js +0 -1
  58. package/dist/chunk-EK7ODJWE.js +0 -1
  59. package/dist/chunk-GGDB72YE.js +0 -323
  60. package/dist/chunk-MKDRULJ6.js +0 -1
  61. package/dist/chunk-NGFYX3CW.js +0 -2
  62. package/dist/chunk-OQSVJXWJ.js +0 -143
  63. package/dist/chunk-XTHPCEME.js +0 -2
  64. package/dist/dist-5D3BKCOR.js +0 -1
  65. package/dist/fs-PXXYZATK-ZP2RBR47.js +0 -1
  66. package/dist/hcs-wasm/package.json +0 -3
  67. package/dist/hcs-wasm/vibgrate_hcs_wasm.js +0 -450
  68. package/dist/hcs-wasm/vibgrate_hcs_wasm_bg.wasm +0 -0
  69. package/dist/hcs-worker.js +0 -374406
  70. package/dist/semver-TPPMM2NV.js +0 -1
package/DOCS.md CHANGED
@@ -11,14 +11,34 @@ For a quick overview, see the [README](./README.md). This document covers everyt
11
11
  - [How It Works](#how-it-works)
12
12
  - [Choosing a rollout model: one-off vs CI](#choosing-a-rollout-model-one-off-vs-ci)
13
13
  - [Commands Reference](#commands-reference)
14
- - [vibgrate init](#vibgrate-init)
15
- - [vibgrate scan](#vibgrate-scan)
16
- - [vibgrate baseline](#vibgrate-baseline)
17
- - [vibgrate report](#vibgrate-report)
18
- - [vibgrate sbom](#vibgrate-sbom)
19
- - [vibgrate push](#vibgrate-push)
20
- - [vibgrate dsn create](#vibgrate-dsn-create)
21
- - [vibgrate update](#vibgrate-update)
14
+ - [vg init](#vg-init)
15
+ - [vg scan](#vg-scan)
16
+ - [Vulnerabilities and exposure attribution](#vulnerabilities-and-exposure-attribution)
17
+ - [vg why](#vg-why)
18
+ - [vg bisect](#vg-bisect)
19
+ - [vg baseline](#vg-baseline)
20
+ - [vg report](#vg-report)
21
+ - [vg sbom](#vg-sbom)
22
+ - [vg push](#vg-push)
23
+ - [vg dsn create](#vg-dsn-create)
24
+ - [vg update](#vg-update)
25
+ - [Code Graph Commands](#code-graph-commands)
26
+ - [vg build](#vg-build)
27
+ - [vg show](#vg-show)
28
+ - [vg ask](#vg-ask)
29
+ - [vg impact](#vg-impact)
30
+ - [vg path](#vg-path)
31
+ - [vg tree](#vg-tree)
32
+ - [vg map / vg hubs / vg areas / vg oddities](#vg-map--vg-hubs--vg-areas--vg-oddities)
33
+ - [vg lib](#vg-lib)
34
+ - [vg serve](#vg-serve)
35
+ - [vg install](#vg-install)
36
+ - [vg share](#vg-share)
37
+ - [vg status](#vg-status)
38
+ - [vg facts](#vg-facts)
39
+ - [vg tests](#vg-tests)
40
+ - [vg embed](#vg-embed)
41
+ - [vg export](#vg-export)
22
42
  - [Upgrade Drift Score](#upgrade-drift-score)
23
43
  - [Drift Baselines & Fitness Functions](#drift-baselines--fitness-functions)
24
44
  - [How the Score Is Calculated](#how-the-score-is-calculated)
@@ -44,6 +64,7 @@ For a quick overview, see the [README](./README.md). This document covers everyt
44
64
  - [Breaking Change Exposure](#breaking-change-exposure)
45
65
  - [File Hotspots](#file-hotspots)
46
66
  - [Security Posture](#security-posture)
67
+ - [Security Scanners](#security-scanners)
47
68
  - [Service Dependencies](#service-dependencies)
48
69
  - [Architecture Layers](#architecture-layers)
49
70
  - [Code Quality Metrics](#code-quality-metrics)
@@ -59,13 +80,12 @@ For a quick overview, see the [README](./README.md). This document covers everyt
59
80
  - [Privacy & Security](#privacy--security)
60
81
  - [Exit Codes](#exit-codes)
61
82
  - [Programmatic API](#programmatic-api)
62
- - [HCS Extract Runtime Prerequisites](#hcs-extract-runtime-prerequisites)
63
83
 
64
84
  ---
65
85
 
66
86
  ## How It Works
67
87
 
68
- Vibgrate recursively scans your repository for `package.json` (Node/TypeScript), `.sln`/`.csproj`/`.vbproj` (.NET), Python manifests, and Java build manifests. For each project it discovers, it:
88
+ Vibgrate recursively scans your repository for `package.json` (Node/TypeScript), `.sln`/`.csproj` (.NET), Python manifests, and Java build manifests. For each project it discovers, it:
69
89
 
70
90
  1. **Detects** the runtime version, target framework, and all dependencies
71
91
  2. **Queries** the npm/NuGet registry for latest stable versions (with built-in caching and concurrency control)
@@ -73,7 +93,7 @@ Vibgrate recursively scans your repository for `package.json` (Node/TypeScript),
73
93
  4. **Generates** a deterministic Upgrade Drift Score (0–100)
74
94
  5. **Produces** findings, a full JSON artifact, and optional SARIF output
75
95
 
76
- Core drift analysis does not execute source code. Vibgrate Cloud upload remains optional.
96
+ Core drift analysis does not execute source code. Optional security scanners can run lightweight secret heuristics and local toolchain checks. Vibgrate Cloud upload remains optional.
77
97
 
78
98
  ---
79
99
 
@@ -99,13 +119,15 @@ This section summarizes what the CLI supports today and how to use each capabili
99
119
 
100
120
  ### Supported project ecosystems
101
121
 
102
- Vibgrate currently discovers and evaluates projects in:
122
+ Vibgrate evaluates **upgrade drift** in depth for:
103
123
 
104
124
  - **Node.js / TypeScript** (`package.json`, lockfiles)
105
- - **.NET** (`.sln`, `.csproj`, `.vbproj`)
125
+ - **.NET** (`.sln`, `.csproj`)
106
126
  - **Python** (`requirements.txt`, `pyproject.toml`-style manifests)
107
127
  - **Java** (`pom.xml`, Gradle-style manifests)
108
128
 
129
+ **Known-vulnerability detection** (`--vulns`) and **dependency attribution** (`vg why`, exposure windows) additionally cover npm / pnpm / yarn, pip / poetry / pipenv, cargo, composer, bundler, go, pub, hex, NuGet, and Maven/Gradle — read from each project's lockfile.
130
+
109
131
  ### End-to-end workflow (recommended)
110
132
 
111
133
  1. Run an initial scan.
@@ -117,16 +139,16 @@ Example:
117
139
 
118
140
  ```bash
119
141
  # Step 1: first scan
120
- vibgrate scan
142
+ vg scan
121
143
 
122
144
  # Step 2: baseline
123
- vibgrate baseline
145
+ vg baseline
124
146
 
125
147
  # Step 3: policy in CI
126
- vibgrate scan --baseline .vibgrate/baseline.json --drift-budget 40 --drift-worsening 5 --fail-on error
148
+ vg scan --baseline .vibgrate/baseline.json --drift-budget 40 --drift-worsening 5 --fail-on error
127
149
 
128
150
  # Step 4: produce report
129
- vibgrate report --in .vibgrate/scan_result.json --format md
151
+ vg report --in .vibgrate/scan_result.json --format md
130
152
  ```
131
153
 
132
154
  Expected results:
@@ -137,12 +159,12 @@ Expected results:
137
159
 
138
160
  ## Commands Reference
139
161
 
140
- ### vibgrate init
162
+ ### vg init
141
163
 
142
164
  Initialise Vibgrate in a project.
143
165
 
144
166
  ```bash
145
- vibgrate init [path] [--baseline] [--yes]
167
+ vg init [path] [--baseline] [--yes]
146
168
  ```
147
169
 
148
170
  | Flag | Description |
@@ -157,22 +179,23 @@ Creates:
157
179
 
158
180
  ---
159
181
 
160
- ### vibgrate scan
182
+ ### vg scan
161
183
 
162
184
  The primary command. Scans your project for upgrade drift.
163
185
 
164
186
  ```bash
165
- vibgrate scan [path] [--format text|json|sarif|md] [--out <file>] [--fail-on warn|error] [--offline] [--package-manifest <file>] [--no-local-artifacts] [--max-privacy] [--baseline <file>] [--drift-budget <score>] [--drift-worsening <percent>] [--changed-only] [--exclude <glob>...] [--concurrency <n>]
187
+ vg scan [path] [--vulns] [--full] [--format text|json|sarif|md] [--out <file>] [--fail-on warn|error] [--offline] [--package-manifest <file>] [--no-local-artifacts] [--max-privacy] [--baseline <file>] [--drift-budget <score>] [--drift-worsening <percent>] [--changed-only] [--concurrency <n>]
166
188
  ```
167
189
 
168
190
  | Flag | Default | Description |
169
191
  |------|---------|-------------|
192
+ | `--vulns` | — | Also detect known vulnerabilities (OSV online; offline via `--package-manifest` advisories) |
193
+ | `--full` | — | Comprehensive scan: enables `--vulns` and reports banned dependencies when a standards policy exists |
170
194
  | `--format` | `text` | Output format: `text`, `json`, `sarif`, or `md` |
171
195
  | `--out <file>` | — | Write output to a file |
172
196
  | `--fail-on <level>` | — | Exit with code 2 if findings at this level exist |
173
197
  | `--baseline <file>` | — | Compare against a previous baseline |
174
198
  | `--changed-only` | — | Only scan changed files |
175
- | `-e, --exclude <glob>` | — | Exclude paths matching a glob pattern. Repeatable, and a single value may list several patterns separated by commas or semicolons. Merged with `exclude` from the config file |
176
199
  | `--concurrency <n>` | `8` | Max concurrent npm registry calls |
177
200
  | `--drift-budget <score>` | — | Fitness gate: fail if drift score is above this budget |
178
201
  | `--drift-worsening <percent>` | — | Fitness gate: fail if drift worsens by more than % vs baseline |
@@ -185,101 +208,110 @@ vibgrate scan [path] [--format text|json|sarif|md] [--out <file>] [--fail-on war
185
208
  | `--package-manifest <file>` | — | JSON or ZIP package-version manifest used for offline/latest lookups (latest bundle: `https://github.com/vibgrate/manifests/latest-packages.zip`) |
186
209
  | `--no-local-artifacts` | — | Do not write `.vibgrate/*.json` scan artifacts to disk |
187
210
  | `--max-privacy` | — | Hardened privacy mode with minimal scanners and no local artifacts |
188
- | `--emit-facts` | — | Emit the schema-validated HCS fact payload (an in-toto attestation predicate) to stdout instead of a scan report. Runs offline and writes nothing to the scanned tree |
189
211
 
190
212
  By default, the scan writes `.vibgrate/scan_result.json`. Use `--no-local-artifacts` or `--max-privacy` to suppress local JSON artifact files.
191
213
 
192
- #### Emitting a fact payload for attestation (`--emit-facts`)
214
+ For offline drift scoring, pass `--package-manifest <file>` with a downloaded manifest bundle such as `https://github.com/vibgrate/manifests/latest-packages.zip`.
193
215
 
194
- `--emit-facts` turns a scan into machine-readable evidence: it runs offline,
195
- writes only a single JSON document to stdout (no source code — drift facts and
196
- counts), and is deterministic for a given commit so re-runs are byte-stable. The
197
- document is the predicate body for the `https://vibgrate.com/attestations/hcs/v0.5`
198
- in-toto attestation, ready to bind to a published artifact:
216
+ Examples:
199
217
 
200
218
  ```bash
201
- vibgrate scan --emit-facts > vibgrate-facts.json
202
- cosign attest --yes \
203
- --type https://vibgrate.com/attestations/hcs/v0.5 \
204
- --predicate vibgrate-facts.json "$IMAGE_REF"
219
+ # Standard text scan
220
+ vg scan
221
+
222
+ # JSON output for automation
223
+ vg scan --format json --out scan.json
224
+
225
+ # CI gate with baseline regression protection
226
+ vg scan --baseline .vibgrate/baseline.json --drift-budget 40 --drift-worsening 5 --fail-on error
227
+
228
+ # Upload result in the same command
229
+ vg scan --push --strict
205
230
  ```
206
231
 
207
- See [`docs/SIGNING-AND-PROVENANCE.md`](../../docs/SIGNING-AND-PROVENANCE.md) for the
208
- full signing & provenance pipeline.
232
+ Expected results:
209
233
 
210
- For offline drift scoring, pass `--package-manifest <file>` with a downloaded manifest bundle such as `https://github.com/vibgrate/manifests/latest-packages.zip`.
234
+ - Clear score/risk output in terminal (or JSON/SARIF when selected).
235
+ - Exit code `2` when configured quality gates are exceeded.
236
+ - When `--push` is enabled, artifact upload is attempted after scan completion.
237
+
238
+ ---
211
239
 
212
- #### Excluding paths from a scan
240
+ ### Vulnerabilities and exposure attribution
213
241
 
214
- Use `--exclude` (alias `-e`) to skip directories or files from the scan. Values are [glob patterns](#exclude-glob-syntax) matched against repository-relative, forward-slash paths. The flag is **repeatable**, and a single value may carry **several patterns separated by commas or semicolons** use whichever reads best:
242
+ `vg scan --vulns` matches your installed dependencies against the public OSV database and records each known vulnerability advisory id and CVE, severity, CVSS, and the fixing version in the scan artifact, as findings, and in SARIF. Supply advisories in a `--package-manifest` bundle to run it offline.
243
+
244
+ In a git repository the scan also attributes each finding: the commit, author, and date that introduced the vulnerable version, and how long you have been exposed. These exposure windows aggregate into remediation metrics framed around the EU Cyber Resilience Act (CRA): open counts by severity, mean and maximum time exposed, and per-severity SLA breaches (defaults: critical 7 days, high 30, moderate 90, low 180). The metrics are descriptive — they show whether remediation keeps pace; they are not a compliance certification.
245
+
246
+ The scan also reconstructs **closed** exposure windows from history — a vulnerable version that was later bumped out of the affected range or removed from the lockfile entirely — and reports real remediation time (MTTR) from them: measured, not estimated. Offline, a package-version manifest extends this to advisories that are fully fixed today, so a dependency that is clean now but was once vulnerable still counts toward your remediation record.
247
+
248
+ Detection and attribution read each project's lockfile, so they cover npm / pnpm / yarn, pip / poetry / pipenv, cargo, composer, bundler, go, pub, hex, NuGet, and Maven/Gradle.
215
249
 
216
250
  ```bash
217
- # Repeat the flag
218
- vibgrate scan --exclude "legacy/**" --exclude "vendor/**"
251
+ # Online detection against OSV
252
+ vg scan --vulns
219
253
 
220
- # Or list multiple patterns in one flag (comma- or semicolon-separated)
221
- vibgrate scan --exclude "legacy/**,vendor/**;**/fixtures/**"
222
- ```
254
+ # Air-gapped: advisories supplied in the manifest bundle
255
+ vg scan --vulns --offline --package-manifest ./package-versions.zip
223
256
 
224
- CLI excludes are **additive**: they are merged (and de-duplicated) with any `exclude` patterns from your [config file](#configuration), so command-line excludes never replace your committed defaults.
257
+ # Everything in one run: drift + vulnerabilities + a banned-dependency report
258
+ vg scan --full
259
+ ```
225
260
 
226
- <a id="exclude-glob-syntax"></a>
227
- Supported glob syntax:
261
+ ---
228
262
 
229
- | Pattern | Matches |
230
- |---------|---------|
231
- | `*` | Any run of characters within a single path segment (no `/`) |
232
- | `**` | Any number of path segments, including `/` (recursive) |
233
- | `?` | Exactly one non-separator character |
234
- | `{a,b}` | Alternation — either `a` or `b` |
235
- | `[abc]` | A single character from the set |
236
- | `legacy` | A bare name is treated as a directory prefix — equivalent to `legacy/**` |
263
+ ### vg why
237
264
 
238
- Examples:
265
+ Explain a dependency from git history: who added it, every version since, and any open vulnerabilities it carries.
239
266
 
240
267
  ```bash
241
- # Standard text scan
242
- vibgrate scan
268
+ vg why <package>
269
+ ```
243
270
 
244
- # JSON output for automation
245
- vibgrate scan --format json --out scan.json
271
+ `vg why` reads your lockfile's history, so it works across npm / pnpm / yarn, pip / poetry, cargo, composer, bundler, go, pub, hex, NuGet, and Maven/Gradle projects. For Maven/Gradle the history comes from a resolved `gradle.lockfile`, or a `pom.xml`'s pinned direct-dependency versions (versions managed by a BOM/`dependencyManagement` aren't resolved). Open vulnerabilities and their introduction attribution come from your most recent `vg scan --vulns`.
246
272
 
247
- # Skip vendored and generated code
248
- vibgrate scan --exclude "vendor/**,**/*.generated.ts;dist/**"
273
+ ---
249
274
 
250
- # CI gate with baseline regression protection
251
- vibgrate scan --baseline .vibgrate/baseline.json --drift-budget 40 --drift-worsening 5 --fail-on error
275
+ ### vg bisect
252
276
 
253
- # Upload result in the same command
254
- vibgrate scan --push --strict
277
+ Pinpoint the commit where a dependency crossed a version line. Where `vg why` narrates every version change, `vg bisect` answers one targeted question: *when did we cross this line?* — for example, when a vulnerable dependency was finally patched past the fixed version, or when a major was adopted.
278
+
279
+ ```bash
280
+ vg bisect <package> <constraint>
255
281
  ```
256
282
 
257
- Expected results:
283
+ `<constraint>` is a version or a semver range. A bare version means "reached or surpassed" — `vg bisect lodash 4.17.21` is the same as `vg bisect lodash '>=4.17.21'`. It reads the same lockfile history `vg why` uses (npm / pnpm / yarn, pip / poetry, cargo, composer, bundler, go, pub, hex, NuGet, and Maven/Gradle), offline and without checking out any commit.
258
284
 
259
- - Clear score/risk output in terminal (or JSON/SARIF when selected).
260
- - Exit code `2` when configured quality gates are exceeded.
261
- - When `--push` is enabled, artifact upload is attempted after scan completion.
285
+ It reports the commit that first reached the constraint — author, date, and the version before and after — or tells you the line was never crossed and shows the latest version in history (so an unadopted fix is obvious). Later flips, such as a downgrade that re-introduced the old version, are listed too.
286
+
287
+ Add `--assert` to turn it into a CI gate: the command exits non-zero when the current version does not satisfy the constraint, so a pipeline step can block a merge until the fix is adopted.
288
+
289
+ ```bash
290
+ vg bisect lodash 4.17.21 --assert # fails the build until lodash is patched to >= 4.17.21
291
+ ```
292
+
293
+ Exit codes: `0` when the query resolves, `2` when `--assert` finds the constraint unsatisfied, `3` when the package has no version history, `5` for an invalid version or range.
262
294
 
263
295
  ---
264
296
 
265
- ### vibgrate baseline
297
+ ### vg baseline
266
298
 
267
299
  Create a drift baseline snapshot for delta comparison.
268
300
 
269
301
  ```bash
270
- vibgrate baseline [path]
302
+ vg baseline [path]
271
303
  ```
272
304
 
273
305
  Runs a full scan and saves the result to `.vibgrate/baseline.json`. Use this as the starting point for tracking drift over time.
274
306
 
275
307
  ---
276
308
 
277
- ### vibgrate report
309
+ ### vg report
278
310
 
279
311
  Generate a human-readable report from a scan artifact.
280
312
 
281
313
  ```bash
282
- vibgrate report [--in <file>] [--format md|text|json]
314
+ vg report [--in <file>] [--format md|text|json]
283
315
  ```
284
316
 
285
317
  | Flag | Default | Description |
@@ -289,62 +321,34 @@ vibgrate report [--in <file>] [--format md|text|json]
289
321
 
290
322
  ---
291
323
 
292
- ### vibgrate sbom
324
+ ### vg sbom
293
325
 
294
326
  Export SBOMs from an existing scan artifact or compare two artifacts.
295
327
 
296
- The `sbom` command family covers supply-chain evidence — SBOM export/delta and
297
- OpenVEX generation.
298
-
299
328
  ```bash
300
- vibgrate sbom export [--in <file>] [--format cyclonedx|spdx] [--out <file>]
301
- vibgrate sbom delta --from <file> --to <file> [--out <file>]
302
- vibgrate sbom vex [--from <file>] [--statement <json>...] [--product <ref>] [--out <file>]
329
+ vg sbom export [--in <file>] [--format cyclonedx|spdx] [--out <file>]
330
+ vg sbom delta --from <file> --to <file> [--out <file>]
331
+ vg sbom vex [--from <file>] [--statement <json>...] [--product <ref>] [--out <file>]
303
332
  ```
304
333
 
305
334
  | Command | Description |
306
335
  |---------|-------------|
307
- | `vibgrate sbom export` | Emit CycloneDX or SPDX JSON from a scan artifact |
308
- | `vibgrate sbom delta` | Compare dependencies between two artifacts (added/removed/changed + drift delta) |
309
- | `vibgrate sbom vex` | Emit a spec-compliant OpenVEX document (exploitability statements) |
336
+ | `vg sbom export` | Emit CycloneDX or SPDX JSON from a scan artifact |
337
+ | `vg sbom delta` | Compare dependencies between two artifacts (added/removed/changed + drift delta) |
338
+ | `vg sbom vex` | Emit a spec-compliant OpenVEX document (exploitability statements) for attestation |
310
339
 
311
340
  Use this to treat SBOMs as operational intelligence instead of static compliance output.
312
341
 
313
- #### vibgrate sbom vex
314
-
315
- Generate a spec-compliant **OpenVEX** document (exploitability statements) for
316
- attestation, consistent with the rest of the `sbom` family. The generator is
317
- input-agnostic — it assembles a complete document from statements you supply, so
318
- it works regardless of which scanner flagged the components. A zero-statement
319
- document is valid and honest: it asserts no known affected components.
320
-
321
- | Flag | Description |
322
- |------|-------------|
323
- | `--from <file>` | Read statements from a JSON file (an array, or an object with a `statements` array) |
324
- | `--statement <json>` | Add a statement as inline JSON. Repeatable |
325
- | `--product <ref>` | Default product applied to statements without their own (e.g. an image digest) |
326
- | `--author <name>` | Document author (default `Vibgrate`) |
327
- | `--timestamp <iso>` / `--id <uri>` | Pin for reproducible output |
328
- | `--out <file>` | Write to a file (default: stdout) |
329
-
330
- ```bash
331
- # Attest exploitability alongside the image
332
- vibgrate sbom vex --product "$IMAGE_REF" \
333
- --statement '{"vulnerability":"CVE-2024-1","status":"not_affected","justification":"vulnerable_code_not_present"}' \
334
- > openvex.json
335
- cosign attest --yes --type openvex --predicate openvex.json "$IMAGE_REF"
336
- ```
337
-
338
- See [`docs/SIGNING-AND-PROVENANCE.md`](../../docs/SIGNING-AND-PROVENANCE.md).
342
+ `vg sbom vex` is input-agnostic: it assembles a complete OpenVEX document from the statements you supply (`--from <file>` and/or repeatable `--statement`), so it works regardless of which scanner flagged the components. A zero-statement document is valid and honest — it asserts no known affected components.
339
343
 
340
344
  ---
341
345
 
342
- ### vibgrate push
346
+ ### vg push
343
347
 
344
348
  Upload scan results to the Vibgrate Cloud API.
345
349
 
346
350
  ```bash
347
- vibgrate push [--dsn <dsn>] [--file <file>] [--region <region>] [--strict]
351
+ vg push [--dsn <dsn>] [--file <file>] [--region <region>] [--strict]
348
352
  ```
349
353
 
350
354
  | Flag | Default | Description |
@@ -358,12 +362,12 @@ Upload is always optional. Best-effort by default — use `--strict` in CI if yo
358
362
 
359
363
  ---
360
364
 
361
- ### vibgrate dsn create
365
+ ### vg dsn create
362
366
 
363
367
  Generate an HMAC-signed DSN token for API authentication.
364
368
 
365
369
  ```bash
366
- vibgrate dsn create --workspace <id|new> [--region <region>] [--ingest <url>] [--write <path>]
370
+ vg dsn create --workspace <id|new> [--region <region>] [--ingest <url>] [--write <path>]
367
371
  ```
368
372
 
369
373
  | Flag | Default | Description |
@@ -378,12 +382,12 @@ with the Vibgrate API. Rate limited to 1 new DSN per 5 minutes per IP address.
378
382
 
379
383
  ---
380
384
 
381
- ### vibgrate update
385
+ ### vg update
382
386
 
383
387
  Check for and install updates.
384
388
 
385
389
  ```bash
386
- vibgrate update [--check] [--pm <manager>]
390
+ vg update [--check] [--pm <manager>]
387
391
  ```
388
392
 
389
393
  | Flag | Description |
@@ -393,27 +397,382 @@ vibgrate update [--check] [--pm <manager>]
393
397
 
394
398
  ---
395
399
 
400
+ ---
401
+
402
+ ## Code Graph Commands
403
+
404
+ Vibgrate includes a full code graph engine — call trees, impact surfaces, semantic search, and AI Context serving. All graph commands read from (or write to) a local graph artifact at `.vibgrate/graph.json`. Build the map once with `vg build`, then query it offline indefinitely.
405
+
406
+ **Global options available on every graph command:**
407
+
408
+ | Flag | Description |
409
+ |------|-------------|
410
+ | `--cwd <dir>` | Working directory (default: current) |
411
+ | `--graph <file>` | Path to graph file (default: `.vibgrate/graph.json`) |
412
+ | `--json` | Machine-readable JSON output |
413
+ | `--quiet` | Suppress non-error output |
414
+ | `--local` | Offline mode — no network calls or downloads |
415
+ | `--deep` | Enable deep derivation (for `vg facts`, `vg build`) |
416
+ | `--no-cache` | Skip and clear cached data |
417
+
418
+ ---
419
+
420
+ ### vg build
421
+
422
+ Build or update the code map incrementally.
423
+
424
+ ```bash
425
+ vg build [paths...]
426
+ ```
427
+
428
+ Maps source code into a graph artifact, enabling all downstream queries (`vg show`, `vg ask`, `vg impact`, etc.).
429
+
430
+ | Flag | Default | Description |
431
+ |------|---------|-------------|
432
+ | `[paths...]` | `.` | Folders or files to map |
433
+ | `--only <langs>` | — | Restrict to languages (e.g. `ts,py,go`) |
434
+ | `--exclude <glob>` | — | Extra ignore glob (repeatable) |
435
+ | `--jobs <n>` | auto | Worker count (`1` = single-threaded) |
436
+ | `--scip <file>` | auto-detect | Ingest a SCIP index for precise resolution |
437
+ | `--no-scip` | — | Ignore any SCIP index |
438
+ | `--no-tsc` | — | Skip the TypeScript resolver (heuristic floor only) |
439
+ | `--no-html` | — | Do not write `graph.html` |
440
+ | `--no-report` | — | Do not write `GRAPH_REPORT.md` |
441
+ | `--no-warm` | — | Do not warm the semantic index after building |
442
+ | `--grammars <dir>` | — | Grammar `.wasm` directory for offline/air-gapped use |
443
+ | `-o, --export <file>` | — | Also write the map to a file (format from extension) |
444
+
445
+ ---
446
+
447
+ ### vg show
448
+
449
+ Explain a single node: what it is, what it calls, what calls it.
450
+
451
+ ```bash
452
+ vg show <name>
453
+ ```
454
+
455
+ | Flag | Description |
456
+ |------|-------------|
457
+ | `<name>` | Qualified name, short name, `file:line`, glob, or id |
458
+ | `--pick <n>` | Pick the nth candidate when ambiguous |
459
+
460
+ Outputs the qualified name, kind, file location, signature, importance score, area, extends relationships, callees, and callers.
461
+
462
+ ---
463
+
464
+ ### vg ask
465
+
466
+ Ask the code map a question using hybrid lexical + structural + semantic search.
467
+
468
+ ```bash
469
+ vg ask "<question>"
470
+ ```
471
+
472
+ A local ONNX embedding model is downloaded once on first use, then cached and fully offline. Degrades gracefully to lexical-only under `--local` or `--no-semantic`.
473
+
474
+ Before answering, `ask` checks whether files changed since the map was last built and, if so, rebuilds it incrementally first (only the changed files re-parse) — so answers always reflect the code as it is now. The check is stat-based and costs almost nothing when nothing changed; `--no-refresh` opts out.
475
+
476
+ | Flag | Default | Description |
477
+ |------|---------|-------------|
478
+ | `<question...>` | — | Your question |
479
+ | `-b, --budget <n>` | `2000` | Approx token budget for returned context |
480
+ | `--no-semantic` | — | Lexical only; skip the local embedding pass |
481
+ | `--no-refresh` | — | Answer from the map as built; skip the auto-rebuild when files changed |
482
+
483
+ ---
484
+
485
+ ### vg impact
486
+
487
+ What breaks if you change it — deterministic structural blast radius.
488
+
489
+ ```bash
490
+ vg impact <name>
491
+ ```
492
+
493
+ Reverse reachability with decay confidence. With `--tests`, returns exactly the tests to run before shipping.
494
+
495
+ | Flag | Default | Description |
496
+ |------|---------|-------------|
497
+ | `<name>` | — | Node to assess |
498
+ | `--depth <n>` | `4` | Max traversal depth |
499
+ | `--tests` | — | Also surface the tests covering the affected set |
500
+ | `--fail-on-untested` | — | Exit 2 if any affected node is untested (CI gate) |
501
+ | `--pick <n>` | — | Pick the nth candidate when ambiguous |
502
+
503
+ ---
504
+
505
+ ### vg path
506
+
507
+ Show how A connects to B — shortest path in the call graph.
508
+
509
+ ```bash
510
+ vg path <a> <b>
511
+ ```
512
+
513
+ | Flag | Description |
514
+ |------|-------------|
515
+ | `<a>` | Source node |
516
+ | `<b>` | Target node |
517
+ | `--pick-a <n>` | Pick the nth candidate for A |
518
+ | `--pick-b <n>` | Pick the nth candidate for B |
519
+
520
+ ---
521
+
522
+ ### vg tree
523
+
524
+ The call tree rooted at a node.
525
+
526
+ ```bash
527
+ vg tree <name>
528
+ ```
529
+
530
+ Callees by default; `--callers` to invert. Depth-bounded and cycle-safe.
531
+
532
+ | Flag | Default | Description |
533
+ |------|---------|-------------|
534
+ | `<name>` | — | Root node |
535
+ | `--callers` | — | Show callers instead of callees |
536
+ | `--depth <n>` | `3` | Max depth |
537
+ | `--pick <n>` | — | Pick the nth candidate when ambiguous |
538
+
539
+ ---
540
+
541
+ ### vg map / vg hubs / vg areas / vg oddities
542
+
543
+ Map-level insights — read-only views over the committed graph.
544
+
545
+ ```bash
546
+ vg map # Overview: areas, hubs, untested hotspots
547
+ vg hubs # Most-depended-on code (centrality outliers)
548
+ vg areas # Natural groupings (communities), each labelled and sized
549
+ vg oddities # Surprising cross-area links (architectural smells)
550
+ ```
551
+
552
+ | Command | Flag | Default | Description |
553
+ |---------|------|---------|-------------|
554
+ | `vg hubs` | `-n, --limit <n>` | `20` | How many hubs to show |
555
+ | `vg areas` | `-n, --limit <n>` | `30` | How many areas to show |
556
+ | `vg oddities` | `-n, --limit <n>` | `20` | How many oddities to show |
557
+
558
+ ---
559
+
560
+ ### vg lib
561
+
562
+ Version-correct library docs — from the hosted catalog or local ingestion.
563
+
564
+ ```bash
565
+ vg lib # List the catalog
566
+ vg lib <name> # Show docs for a library (pinned to your lockfile version)
567
+ vg lib add <source> # Ingest docs from a local source
568
+ vg lib publish <name> # Upload private library docs to the hosted catalog
569
+ vg lib resolve <name> # Resolve name → catalog id + version
570
+ vg lib refresh # Re-ingest all local sources
571
+ ```
572
+
573
+ | Flag | Default | Description |
574
+ |------|---------|-------------|
575
+ | `--name <name>` | — | Library name (for `add`) |
576
+ | `--version <v>` | — | Pin the doc version (for `add`/`publish`) |
577
+ | `-b, --budget <n>` | — | Trim docs to ~N tokens |
578
+ | `--readme <path>` | `./README.md` | README path (for `publish`) |
579
+ | `--dts <path>` | — | TypeScript declaration path (for `publish`) |
580
+ | `--language <lang>` | — | Primary language (for `publish`) |
581
+ | `--region <region>` | `us` | Data-residency region for the hosted catalog |
582
+ | `--ingest <url>` | — | Hosted catalog URL override (wins over `--region`) |
583
+
584
+ ---
585
+
586
+ ### vg serve
587
+
588
+ Start Vibgrate AI Context — a local-first MCP serving your code map, drift, and version-correct docs to your AI assistant (fully offline under `--local`).
589
+
590
+ ```bash
591
+ vg serve
592
+ ```
593
+
594
+ | Flag | Default | Description |
595
+ |------|---------|-------------|
596
+ | `--http` | — | Serve over streamable HTTP instead of stdio |
597
+ | `--port <n>` | `7437` | Port for `--http` |
598
+ | `--host <h>` | `127.0.0.1` | Host for `--http` |
599
+ | `--savings` | — | Record local, counts-only usage savings (opt-in) |
600
+ | `--dedup` | — | Collapse a node's heavy relation lists on repeat reads within a session, to save tokens (opt-in) |
601
+ | `--no-refresh` | — | Serve the map as built; skip the auto-rebuild when files change |
602
+
603
+ Via stdio (default), your AI assistant spawns the server. Via `--http`, it runs as a local HTTP endpoint for browser or shared access.
604
+
605
+ **The map stays fresh while you (or your AI) edit code.** Each tool call runs a cheap stat-only freshness check against the last build; when files really changed, the server rebuilds the map incrementally in-process — only changed files re-parse — and answers from the updated graph. Probes are debounced with a self-tuning cadence (2s floor, scaling with measured probe cost so probing never exceeds a few percent of serve time even on very large repos), rebuilds are single-flight and cross-process locked, and touch-only changes (a `git checkout`, a re-save with identical content) are recognized by content hash and never trigger a rebuild. There is no filesystem watcher and no daemon: freshness is checked exactly when it matters — at query time. The server also hot-reloads `graph.json` whenever it changes on disk, so an external `vg` build is picked up on the next call too.
606
+
607
+ The server exposes read-only tools your assistant can call over the code map and dependency data, including:
608
+
609
+ - `query_graph`, `get_node`, `find_path`, `impact_of`, `tests_for` — navigate and reason about the code map.
610
+ - `check_drift` — offline dependency inventory; pass `attribute: true` to add git "who added this / who set the version" attribution.
611
+ - `list_vulnerabilities`, `vuln_attribution` — known vulnerabilities and their exposure attribution from the last `vg scan --vulns`.
612
+ - `upgrade_impact` — what an upgrade will cost: version distance, how many files import the package, the vulnerabilities it fixes, and — with `changelog: true` — online breaking-change notes between your version and the latest.
613
+ - `resolve_library`, `library_docs` — version-correct, drift-annotated library docs.
614
+
615
+ All tools are read-only. The server is local-first: it always answers from your machine when it can, and its only network touches are the embedder's one-time model fetch, `upgrade_impact`'s `changelog`, and `library_docs`' fall-through to the hosted catalog when the local docs for a library are thin or missing. `--local` is the hard airgap — it disables all three.
616
+
617
+ ---
618
+
619
+ ### vg install
620
+
621
+ Add Vibgrate AI Context to your AI assistant(s) — skill, MCP wiring, and advisory nudge.
622
+
623
+ ```bash
624
+ vg install [tools...]
625
+ vg uninstall <tools...>
626
+ ```
627
+
628
+ Idempotent and repo-local (changes can be committed and shared with your team).
629
+
630
+ **Supported assistants:** `claude`, `cursor`, `windsurf`, `vscode`, `codex`, `gemini`
631
+
632
+ | Flag | Description |
633
+ |------|-------------|
634
+ | `[tools...]` | Assistant ids to install for |
635
+ | `--all` | Install for every supported assistant |
636
+ | `--list` | Show the support matrix and exit |
637
+ | `--no-hook` | Skip the advisory nudge |
638
+
639
+ **`vg uninstall` flags:**
640
+
641
+ | Flag | Description |
642
+ |------|-------------|
643
+ | `<tools...>` | Assistant ids to remove (required) |
644
+ | `--purge` | Also delete the skill file |
645
+
646
+ ---
647
+
648
+ ### vg share
649
+
650
+ Make the code map committable and auto-updating for your team.
651
+
652
+ ```bash
653
+ vg share
654
+ ```
655
+
656
+ Installs a pre-commit hook, deterministic merge driver, and `.gitignore` so the map stays fresh without any manual steps.
657
+
658
+ | Flag | Description |
659
+ |------|-------------|
660
+ | `--undo` | Reverse what `vg share` installed |
661
+ | `--reports` | Also commit `graph.html` / `GRAPH_REPORT.md` (default: gitignored) |
662
+
663
+ ---
664
+
665
+ ### vg status
666
+
667
+ Graph freshness, counts, and staleness — compared against the working tree.
668
+
669
+ ```bash
670
+ vg status
671
+ ```
672
+
673
+ Outputs: map path, generation timestamp, node/edge/area counts, languages, cluster method, resolver rungs used, cache status, and stale file count. When a build has run on this machine, staleness is exact (per-file stat + content hash against the last build's snapshot — edits, adds, and removes); otherwise it falls back to comparing the file set.
674
+
675
+ ---
676
+
677
+ ### vg facts
678
+
679
+ Deterministic open facts for a node (contract, invariant, characterization).
680
+
681
+ ```bash
682
+ vg facts <name>
683
+ ```
684
+
685
+ Epistemic-typed: declared/static → observed/derived. Requires `--deep` for derived facts beyond basic declarations.
686
+
687
+ | Flag | Description |
688
+ |------|-------------|
689
+ | `<name>` | Node to inspect |
690
+ | `--pick <n>` | Pick the nth candidate when ambiguous |
691
+
692
+ ---
693
+
694
+ ### vg tests
695
+
696
+ Which tests cover a node (call/coverage linkage).
697
+
698
+ ```bash
699
+ vg tests <name>
700
+ ```
701
+
702
+ `--missing` flips to show untested nodes nearby. `--run` prints (or `--exec` runs) the minimal command to exercise exactly those tests.
703
+
704
+ | Flag | Description |
705
+ |------|-------------|
706
+ | `<name>` | Node to inspect |
707
+ | `--missing` | Show untested nodes nearby instead |
708
+ | `--run` | Print the command to run exactly these tests |
709
+ | `--exec` | Run that command |
710
+ | `--pick <n>` | Pick the nth candidate when ambiguous |
711
+
712
+ ---
713
+
714
+ ### vg embed
715
+
716
+ Precompute the semantic index so the next `vg ask` is instant.
717
+
718
+ ```bash
719
+ vg embed
720
+ ```
721
+
722
+ Local ONNX model downloaded once into a shared cache (`~/.cache/vibgrate/models`). Per-repo vectors stored in `.vibgrate/cache/`.
723
+
724
+ | Flag | Description |
725
+ |------|-------------|
726
+ | `--where` | Show where the model is cached and its size |
727
+ | `--clear` | Remove the downloaded model from shared cache |
728
+
729
+ ---
730
+
731
+ ### vg export
732
+
733
+ Export the code map in various formats.
734
+
735
+ ```bash
736
+ vg export [file]
737
+ ```
738
+
739
+ Format is inferred from the file extension. Use `-` for stdout.
740
+
741
+ | Extension | Format |
742
+ |-----------|--------|
743
+ | `.json` | JSON |
744
+ | `.ndjson` | Newline-delimited JSON |
745
+ | `.graphml` | GraphML |
746
+ | `.dot` | Graphviz DOT |
747
+ | `.cypher` | Neo4j Cypher |
748
+ | `.md` | Markdown |
749
+ | `.html` | HTML visualization |
750
+ | `.cdx.json` | CycloneDX SBOM / AI-BOM |
751
+ | `.spdx.json` | SPDX |
752
+
753
+ ---
754
+
396
755
  ## Drift Baselines & Fitness Functions
397
756
 
398
757
  Vibgrate stores scan state under `.vibgrate/`:
399
758
 
400
759
  - `.vibgrate/scan_result.json`: latest scan artifact
401
- - `.vibgrate/baseline.json`: explicit baseline snapshot (`vibgrate baseline`)
760
+ - `.vibgrate/baseline.json`: explicit baseline snapshot (`vg baseline`)
402
761
  - `<project>/.vibgrate/project_score.json`: per-project score snapshots
403
762
 
404
763
  Recommended workflow:
405
764
 
406
765
  1. Create baseline once on main branch:
407
766
  ```bash
408
- vibgrate baseline
767
+ vg baseline
409
768
  ```
410
769
  2. In CI, run scan with comparison and gates:
411
770
  ```bash
412
- vibgrate scan --baseline .vibgrate/baseline.json --drift-budget 40 --drift-worsening 5
771
+ vg scan --baseline .vibgrate/baseline.json --drift-budget 40 --drift-worsening 5
413
772
  ```
414
773
  3. When planned upgrades land, refresh baseline:
415
774
  ```bash
416
- vibgrate baseline
775
+ vg baseline
417
776
  ```
418
777
 
419
778
  This makes drift a formal quality gate (fitness function), not just reporting.
@@ -476,7 +835,7 @@ A clean Markdown report suitable for PRs, wikis, or documentation.
476
835
 
477
836
  ### vibgrate.config.ts
478
837
 
479
- Run `vibgrate init` to generate the config file, or create one manually:
838
+ Run `vg init` to generate the config file, or create one manually:
480
839
 
481
840
  ```typescript
482
841
  import type { VibgrateConfig } from "@vibgrate/cli";
@@ -514,18 +873,6 @@ export default config;
514
873
 
515
874
  Also supports `vibgrate.config.js` and `vibgrate.config.json`.
516
875
 
517
- ### Exclude patterns
518
-
519
- `exclude` accepts an array of glob patterns describing paths the scan should skip (relative to the repository root, forward-slash separated). See [exclude glob syntax](#exclude-glob-syntax) for the supported patterns.
520
-
521
- ```typescript
522
- const config: VibgrateConfig = {
523
- exclude: ["legacy/**", "vendor/**", "**/*.generated.ts"],
524
- };
525
- ```
526
-
527
- The same patterns can be supplied per-run on the command line with [`--exclude`](#excluding-paths-from-a-scan). CLI excludes are merged with (not a replacement for) the config `exclude` list, so committed defaults always apply and ad-hoc excludes are additive.
528
-
529
876
  ### Thresholds
530
877
 
531
878
  Control when findings are raised and when the CLI should fail.
@@ -589,12 +936,12 @@ Vibgrate artifacts include dependency graph and package inventory data that can
589
936
  - Phantom dependency evidence (`phantomDependencies` + details)
590
937
  - Inventory metadata that pairs well with internal SBOM pipelines
591
938
 
592
- Vibgrate supports both direct SBOM export (`vibgrate sbom export`) and raw inventory consumption from `scan_result.json`, so teams can choose either built-in output or custom SBOM pipelines.
939
+ Vibgrate supports both direct SBOM export (`vg sbom export`) and raw inventory consumption from `scan_result.json`, so teams can choose either built-in output or custom SBOM pipelines.
593
940
 
594
941
  Example:
595
942
 
596
943
  ```bash
597
- vibgrate sbom export --in .vibgrate/scan_result.json --format spdx --out sbom.spdx.json
944
+ vg sbom export --in .vibgrate/scan_result.json --format spdx --out sbom.spdx.json
598
945
  ```
599
946
 
600
947
  Expected result:
@@ -662,6 +1009,17 @@ Structural security hygiene indicators (not a secret scanner):
662
1009
  - `.env` files tracked outside `.gitignore`
663
1010
  - Audit severity counts (via `npm audit --json`)
664
1011
 
1012
+ ### Security Scanners
1013
+
1014
+ Security scanner orchestration and readiness analysis for local policy and secret-scanning workflows:
1015
+
1016
+ - Scanner engine discovery (installed vs missing)
1017
+ - Version freshness checks to flag stale scanner engines/signatures
1018
+ - Local config discovery for scanner policy files
1019
+ - Cache-backed heuristic secret signals to add value even when binaries are unavailable
1020
+
1021
+ > This scanner does not guarantee full secret detection or rule coverage by itself; it reports toolchain status and lightweight in-repo indicators so teams can decide how to harden CI enforcement.
1022
+
665
1023
  ### Service Dependencies
666
1024
 
667
1025
  Maps external service and platform dependencies by detecting SDK packages:
@@ -694,6 +1052,15 @@ Fast AST-based quality checks to identify upgrade friction hotspots:
694
1052
  - Circular dependencies and dead-code estimate
695
1053
  - "God file" detection for oversized high-complexity modules
696
1054
 
1055
+ ### OWASP Category Mapping
1056
+
1057
+ Maps security findings into OWASP Top 10 categories for security triage inside existing drift reports:
1058
+
1059
+ - Supports `fast` and `cache-input` modes
1060
+ - Categorizes findings with severity and CWE metadata
1061
+ - Emits per-category counts in JSON output
1062
+ - Designed for CI visibility without requiring a separate report format
1063
+
697
1064
  ---
698
1065
 
699
1066
  ## CI Integration
@@ -704,6 +1071,7 @@ Use the maintained templates in this package for copy-paste setup:
704
1071
 
705
1072
  - `examples/github-actions/driftscore-ci.yml` (JSON artifact + drift gate)
706
1073
  - `examples/github-actions/driftscore-sarif.yml` (SARIF upload to code scanning)
1074
+ - `examples/github-actions/vulnerabilities-sarif.yml` (vulnerability gate + SARIF upload)
707
1075
  - `docs/ci/github-actions.md` (integration notes)
708
1076
 
709
1077
  ```yaml
@@ -723,6 +1091,23 @@ steps:
723
1091
  run: npx @vibgrate/cli push --file .vibgrate/scan_result.json
724
1092
  ```
725
1093
 
1094
+ To gate pull requests on **known vulnerabilities** and surface them in the
1095
+ Security tab, the maintained `vibgrate/cli` Action does the scan, gate, and SARIF
1096
+ upload in one step (needs `permissions: security-events: write`):
1097
+
1098
+ ```yaml
1099
+ steps:
1100
+ - uses: actions/checkout@v4
1101
+ with:
1102
+ fetch-depth: 0 # full history → exposure attribution + remediation MTTR
1103
+ - uses: vibgrate/cli@v1
1104
+ with:
1105
+ vulns: true
1106
+ fail-on: error # critical/high block the merge
1107
+ upload-sarif: true
1108
+ category: vibgrate-vulns
1109
+ ```
1110
+
726
1111
  ### Azure DevOps
727
1112
 
728
1113
  ```yaml
@@ -798,7 +1183,7 @@ Vibgrate is built with a privacy-first architecture. Here's what it **never** do
798
1183
 
799
1184
  What it **does** collect:
800
1185
 
801
- - Package names and version numbers (from `package.json`, `.csproj`/`.vbproj`, lockfiles)
1186
+ - Package names and version numbers (from `package.json`, `.csproj`, lockfiles)
802
1187
  - Config structure flags (e.g. `strict: true` from `tsconfig.json`)
803
1188
  - File names and sizes (paths and metadata, never contents)
804
1189
  - Public npm/NuGet registry metadata (latest versions, deprecation flags)
@@ -833,7 +1218,7 @@ import type {
833
1218
 
834
1219
  ## Requirements
835
1220
 
836
- - **Node.js** >= 20.0.0
1221
+ - **Node.js** >= 22.0.0
837
1222
  - Works on macOS, Linux, and Windows
838
1223
 
839
1224
  ---
@@ -846,13 +1231,3 @@ import type {
846
1231
  ---
847
1232
 
848
1233
  Copyright © 2026 Vibgrate. All rights reserved. See [LICENSE](https://vibgrate.com/license) for terms.
849
-
850
- ## HCS Extract Runtime Prerequisites
851
-
852
- When using `vibgrate extract`, language workers run as subprocesses.
853
-
854
- - Swift currently uses the Node worker (text extraction), so no Swift/Xcode install is required for HCS extract at this time.
855
- - Go/Python/Java/.NET may require local runtimes (`go`, `python3`, `java`, `dotnet`) when platform-native workers are not bundled.
856
- - The CLI now emits install hints when these commands are missing on PATH.
857
-
858
- For OS-specific setup and packaging strategy, see [`HCS-RUNTIME-SETUP.md`](./HCS-RUNTIME-SETUP.md).