@vibgrate/cli 1.0.46 → 1.0.47
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.
- package/DOCS.md +95 -10
- package/README.md +68 -3
- package/dist/{baseline-AWRL3ITR.js → baseline-K7V6GAP3.js} +2 -2
- package/dist/{chunk-SKROLJET.js → chunk-NASGRGXK.js} +1 -1
- package/dist/{chunk-HEILEAVO.js → chunk-UVFIFNYG.js} +542 -196
- package/dist/cli.js +3 -3
- package/dist/index.d.ts +37 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/DOCS.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Vibgrate CLI — Full Documentation
|
|
2
2
|
|
|
3
|
-
> Continuous Drift Intelligence for Node, .NET, Python, and Java
|
|
3
|
+
> Continuous Drift Intelligence for Node, .NET, Python, and Java (all supported in the CLI today)
|
|
4
4
|
|
|
5
5
|
For a quick overview, see the [README](./README.md). This document covers everything in detail.
|
|
6
6
|
|
|
@@ -93,6 +93,48 @@ In practice, one-off scans tell you where you are today; CI keeps you from drift
|
|
|
93
93
|
|
|
94
94
|
---
|
|
95
95
|
|
|
96
|
+
## Feature coverage and practical usage guide
|
|
97
|
+
|
|
98
|
+
This section summarizes what the CLI supports today and how to use each capability effectively.
|
|
99
|
+
|
|
100
|
+
### Supported project ecosystems
|
|
101
|
+
|
|
102
|
+
Vibgrate currently discovers and evaluates projects in:
|
|
103
|
+
|
|
104
|
+
- **Node.js / TypeScript** (`package.json`, lockfiles)
|
|
105
|
+
- **.NET** (`.sln`, `.csproj`)
|
|
106
|
+
- **Python** (`requirements.txt`, `pyproject.toml`-style manifests)
|
|
107
|
+
- **Java** (`pom.xml`, Gradle-style manifests)
|
|
108
|
+
|
|
109
|
+
### End-to-end workflow (recommended)
|
|
110
|
+
|
|
111
|
+
1. Run an initial scan.
|
|
112
|
+
2. Save a baseline on your main branch.
|
|
113
|
+
3. Enforce drift gates in CI.
|
|
114
|
+
4. Export/report artifacts for stakeholders.
|
|
115
|
+
|
|
116
|
+
Example:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
# Step 1: first scan
|
|
120
|
+
vibgrate scan .
|
|
121
|
+
|
|
122
|
+
# Step 2: baseline
|
|
123
|
+
vibgrate baseline .
|
|
124
|
+
|
|
125
|
+
# Step 3: policy in CI
|
|
126
|
+
vibgrate scan . --baseline .vibgrate/baseline.json --drift-budget 40 --drift-worsening 5 --fail-on error
|
|
127
|
+
|
|
128
|
+
# Step 4: produce report
|
|
129
|
+
vibgrate report --in .vibgrate/scan_result.json --format md
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Expected results:
|
|
133
|
+
|
|
134
|
+
- Teams get a stable score trend instead of one-time snapshots.
|
|
135
|
+
- CI fails early when drift budgets are exceeded (exit code `2`).
|
|
136
|
+
- Markdown/JSON/SARIF outputs are ready for engineering and governance workflows.
|
|
137
|
+
|
|
96
138
|
## Commands Reference
|
|
97
139
|
|
|
98
140
|
### vibgrate init
|
|
@@ -120,7 +162,7 @@ Creates:
|
|
|
120
162
|
The primary command. Scans your project for upgrade drift.
|
|
121
163
|
|
|
122
164
|
```bash
|
|
123
|
-
vibgrate scan [path] [--format text|json|sarif] [--out <file>] [--fail-on warn|error] [--baseline <file>] [--drift-budget <score>] [--drift-worsening <percent>] [--changed-only] [--concurrency <n>]
|
|
165
|
+
vibgrate scan [path] [--format text|json|sarif] [--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>]
|
|
124
166
|
```
|
|
125
167
|
|
|
126
168
|
| Flag | Default | Description |
|
|
@@ -133,8 +175,42 @@ vibgrate scan [path] [--format text|json|sarif] [--out <file>] [--fail-on warn|e
|
|
|
133
175
|
| `--concurrency <n>` | `8` | Max concurrent npm registry calls |
|
|
134
176
|
| `--drift-budget <score>` | — | Fitness gate: fail if drift score is above this budget |
|
|
135
177
|
| `--drift-worsening <percent>` | — | Fitness gate: fail if drift worsens by more than % vs baseline |
|
|
178
|
+
| `--push` | — | Upload scan artifact to dashboard after a successful scan |
|
|
179
|
+
| `--dsn <dsn>` | `VIBGRATE_DSN` env | DSN used for `--push` authentication |
|
|
180
|
+
| `--region <region>` | — | Override data residency (`us`, `eu`) during push |
|
|
181
|
+
| `--strict` | — | Fail scan command if push fails |
|
|
182
|
+
| `--install-tools` | — | Auto-install missing local security tools via Homebrew |
|
|
183
|
+
| `--ui-purpose` | — | Enable optional UI-purpose evidence extraction |
|
|
184
|
+
| `--offline` | — | Disable network calls and disable upload/push behavior |
|
|
185
|
+
| `--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
|
+
| `--no-local-artifacts` | — | Do not write `.vibgrate/*.json` scan artifacts to disk |
|
|
187
|
+
| `--max-privacy` | — | Hardened privacy mode with minimal scanners and no local artifacts |
|
|
136
188
|
|
|
137
|
-
|
|
189
|
+
By default, the scan writes `.vibgrate/scan_result.json`. Use `--no-local-artifacts` or `--max-privacy` to suppress local JSON artifact files.
|
|
190
|
+
|
|
191
|
+
For offline drift scoring, pass `--package-manifest <file>` with a downloaded manifest bundle such as `https://github.com/vibgrate/manifests/latest-packages.zip`.
|
|
192
|
+
|
|
193
|
+
Examples:
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
# Standard text scan
|
|
197
|
+
vibgrate scan .
|
|
198
|
+
|
|
199
|
+
# JSON output for automation
|
|
200
|
+
vibgrate scan . --format json --out scan.json
|
|
201
|
+
|
|
202
|
+
# CI gate with baseline regression protection
|
|
203
|
+
vibgrate scan . --baseline .vibgrate/baseline.json --drift-budget 40 --drift-worsening 5 --fail-on error
|
|
204
|
+
|
|
205
|
+
# Upload result in the same command
|
|
206
|
+
vibgrate scan . --push --strict
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
Expected results:
|
|
210
|
+
|
|
211
|
+
- Clear score/risk output in terminal (or JSON/SARIF when selected).
|
|
212
|
+
- Exit code `2` when configured quality gates are exceeded.
|
|
213
|
+
- When `--push` is enabled, artifact upload is attempted after scan completion.
|
|
138
214
|
|
|
139
215
|
---
|
|
140
216
|
|
|
@@ -418,7 +494,17 @@ Vibgrate artifacts include dependency graph and package inventory data that can
|
|
|
418
494
|
- Phantom dependency evidence (`phantomDependencies` + details)
|
|
419
495
|
- Inventory metadata that pairs well with internal SBOM pipelines
|
|
420
496
|
|
|
421
|
-
|
|
497
|
+
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.
|
|
498
|
+
|
|
499
|
+
Example:
|
|
500
|
+
|
|
501
|
+
```bash
|
|
502
|
+
vibgrate sbom export --in .vibgrate/scan_result.json --format spdx --out sbom.spdx.json
|
|
503
|
+
```
|
|
504
|
+
|
|
505
|
+
Expected result:
|
|
506
|
+
|
|
507
|
+
- A standards-based SBOM file (`spdx` or `cyclonedx`) is written for downstream governance tooling.
|
|
422
508
|
|
|
423
509
|
### Tooling Inventory
|
|
424
510
|
|
|
@@ -483,12 +569,11 @@ Structural security hygiene indicators (not a secret scanner):
|
|
|
483
569
|
|
|
484
570
|
### Security Scanners
|
|
485
571
|
|
|
486
|
-
Security scanner orchestration and readiness analysis
|
|
572
|
+
Security scanner orchestration and readiness analysis for local policy and secret-scanning workflows:
|
|
487
573
|
|
|
488
|
-
-
|
|
489
|
-
-
|
|
490
|
-
-
|
|
491
|
-
- Config discovery (`.semgrep.yml`, `.gitleaks.toml`, `.trufflehog.yml`)
|
|
574
|
+
- Scanner engine discovery (installed vs missing)
|
|
575
|
+
- Version freshness checks to flag stale scanner engines/signatures
|
|
576
|
+
- Local config discovery for scanner policy files
|
|
492
577
|
- Cache-backed heuristic secret signals to add value even when binaries are unavailable
|
|
493
578
|
|
|
494
579
|
> 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.
|
|
@@ -527,7 +612,7 @@ Fast AST-based quality checks to identify upgrade friction hotspots:
|
|
|
527
612
|
|
|
528
613
|
### OWASP Category Mapping
|
|
529
614
|
|
|
530
|
-
Maps
|
|
615
|
+
Maps security findings into OWASP Top 10 categories for security triage inside existing drift reports:
|
|
531
616
|
|
|
532
617
|
- Supports `fast` and `cache-input` modes
|
|
533
618
|
- Categorizes findings with severity and CWE metadata
|
package/README.md
CHANGED
|
@@ -22,6 +22,8 @@ In one command, you get:
|
|
|
22
22
|
- Dependency age distribution + EOL proximity
|
|
23
23
|
- Priority actions for what to fix next
|
|
24
24
|
|
|
25
|
+
Supported ecosystems today: **Node.js/TypeScript, .NET, Python, and Java**.
|
|
26
|
+
|
|
25
27
|
---
|
|
26
28
|
|
|
27
29
|
## Why teams adopt Vibgrate
|
|
@@ -110,11 +112,11 @@ Beyond core drift scoring, Vibgrate can also detect:
|
|
|
110
112
|
- Full tooling inventory and build/deploy surface
|
|
111
113
|
- TypeScript modernity and breaking-change exposure
|
|
112
114
|
- File hotspots and structural security posture
|
|
113
|
-
- Security scanner readiness
|
|
115
|
+
- Security scanner readiness and local policy coverage checks
|
|
114
116
|
- Service dependency mapping (cloud, db, auth, messaging, etc.)
|
|
115
117
|
- Architecture layer mapping
|
|
116
118
|
- Code-quality metrics (complexity, nesting, cycles, god files)
|
|
117
|
-
- OWASP category mapping from
|
|
119
|
+
- OWASP category mapping from security findings
|
|
118
120
|
|
|
119
121
|
### 3) SBOM Export & Delta
|
|
120
122
|
|
|
@@ -153,10 +155,28 @@ This turns drift scoring into a quality gate instead of passive reporting.
|
|
|
153
155
|
|
|
154
156
|
---
|
|
155
157
|
|
|
158
|
+
|
|
159
|
+
## Privacy & offline-first workflows
|
|
160
|
+
|
|
161
|
+
Vibgrate now supports explicit privacy controls:
|
|
162
|
+
|
|
163
|
+
- `--no-local-artifacts` prevents writing `.vibgrate/*.json` files to disk.
|
|
164
|
+
- `--max-privacy` enables a hardened profile (suppresses local artifact writes and disables high-context scanners such as UI-purpose evidence and architecture/code-quality enrichment).
|
|
165
|
+
- `--offline` disables live registry/network lookups and never uploads scan results.
|
|
166
|
+
- `--package-manifest <file>` accepts a local JSON or ZIP package-version manifest so drift can still be calculated offline. Download the latest bundle at `https://github.com/vibgrate/manifests/latest-packages.zip`.
|
|
167
|
+
|
|
168
|
+
Example:
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
vibgrate scan . --offline --package-manifest ./package-versions.zip --max-privacy --format json --out scan.json
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
When offline mode runs without a package manifest, package freshness is marked as unknown and drift scoring is necessarily partial.
|
|
175
|
+
|
|
156
176
|
## Core commands
|
|
157
177
|
|
|
158
178
|
```bash
|
|
159
|
-
vibgrate scan [path] [--format text|json|sarif] [--out <file>] [--fail-on warn|error]
|
|
179
|
+
vibgrate scan [path] [--format text|json|sarif] [--out <file>] [--fail-on warn|error] [--offline] [--package-manifest <file>] [--no-local-artifacts] [--max-privacy]
|
|
160
180
|
vibgrate baseline [path]
|
|
161
181
|
vibgrate report [--in <artifact.json>] [--format md|text|json]
|
|
162
182
|
vibgrate push [--dsn <dsn>] [--file <artifact.json>] [--strict]
|
|
@@ -164,6 +184,51 @@ vibgrate init [path] [--baseline] [--yes]
|
|
|
164
184
|
vibgrate dsn create --workspace <id> [--region us|eu] [--write <path>]
|
|
165
185
|
```
|
|
166
186
|
|
|
187
|
+
### Command examples with expected results
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
# 1) Scan current repo (text output)
|
|
191
|
+
npx @vibgrate/cli scan .
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Expected result:
|
|
195
|
+
|
|
196
|
+
- Prints overall score + risk level
|
|
197
|
+
- Shows detected projects (Node/.NET/Python/Java)
|
|
198
|
+
- Writes `.vibgrate/scan_result.json` unless disabled
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
# 2) Scan with CI gating
|
|
202
|
+
npx @vibgrate/cli scan . --fail-on error --drift-budget 40
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
Expected result:
|
|
206
|
+
|
|
207
|
+
- Exit code `0` when no error-level finding and score is within budget
|
|
208
|
+
- Exit code `2` when the configured gate is exceeded
|
|
209
|
+
|
|
210
|
+
```bash
|
|
211
|
+
# 3) Offline scan using local package-version bundle
|
|
212
|
+
npx @vibgrate/cli scan . --offline --package-manifest ./latest-packages.zip --format json --out scan.json
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
Expected result:
|
|
216
|
+
|
|
217
|
+
- No registry/network lookup
|
|
218
|
+
- JSON artifact in `scan.json`
|
|
219
|
+
- Package freshness may be marked unknown if manifest lacks entries
|
|
220
|
+
|
|
221
|
+
```bash
|
|
222
|
+
# 4) Export SBOM and compare two runs
|
|
223
|
+
npx @vibgrate/cli sbom export --format cyclonedx --out sbom.cdx.json
|
|
224
|
+
npx @vibgrate/cli sbom delta --from .vibgrate/baseline.json --to .vibgrate/scan_result.json --out sbom-delta.txt
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
Expected result:
|
|
228
|
+
|
|
229
|
+
- CycloneDX (or SPDX) JSON export file
|
|
230
|
+
- Human-readable delta report with added/removed/changed dependencies
|
|
231
|
+
|
|
167
232
|
Common usage:
|
|
168
233
|
|
|
169
234
|
```bash
|