@vibgrate/cli 0.1.1 → 0.1.3
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 +554 -0
- package/LICENSE +45 -0
- package/README.md +244 -0
- package/dist/{baseline-AENFLFQT.js → baseline-D5UDXOEJ.js} +2 -2
- package/dist/{chunk-OHAVLM6P.js → chunk-3X3ZMVHI.js} +1 -1
- package/dist/chunk-VXEZ7APL.js +3697 -0
- package/dist/cli.js +3 -3
- package/dist/index.d.ts +126 -0
- package/dist/index.js +1 -1
- package/package.json +5 -3
- package/dist/chunk-DLRBJYO6.js +0 -1077
package/DOCS.md
ADDED
|
@@ -0,0 +1,554 @@
|
|
|
1
|
+
# Vibgrate CLI — Full Documentation
|
|
2
|
+
|
|
3
|
+
> Continuous Upgrade Drift Intelligence for Node & .NET
|
|
4
|
+
|
|
5
|
+
For a quick overview, see the [README](./README.md). This document covers everything in detail.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Table of Contents
|
|
10
|
+
|
|
11
|
+
- [How It Works](#how-it-works)
|
|
12
|
+
- [Commands Reference](#commands-reference)
|
|
13
|
+
- [vibgrate init](#vibgrate-init)
|
|
14
|
+
- [vibgrate scan](#vibgrate-scan)
|
|
15
|
+
- [vibgrate baseline](#vibgrate-baseline)
|
|
16
|
+
- [vibgrate report](#vibgrate-report)
|
|
17
|
+
- [vibgrate push](#vibgrate-push)
|
|
18
|
+
- [vibgrate dsn create](#vibgrate-dsn-create)
|
|
19
|
+
- [vibgrate update](#vibgrate-update)
|
|
20
|
+
- [Upgrade Drift Score](#upgrade-drift-score)
|
|
21
|
+
- [How the Score Is Calculated](#how-the-score-is-calculated)
|
|
22
|
+
- [Risk Levels](#risk-levels)
|
|
23
|
+
- [Score Components](#score-components)
|
|
24
|
+
- [Output Formats](#output-formats)
|
|
25
|
+
- [Text](#text)
|
|
26
|
+
- [JSON Artifact](#json-artifact)
|
|
27
|
+
- [SARIF](#sarif)
|
|
28
|
+
- [Markdown](#markdown)
|
|
29
|
+
- [Configuration](#configuration)
|
|
30
|
+
- [vibgrate.config.ts](#vibgrateconfigts)
|
|
31
|
+
- [Thresholds](#thresholds)
|
|
32
|
+
- [Scanner Toggles](#scanner-toggles)
|
|
33
|
+
- [Extended Scanners](#extended-scanners)
|
|
34
|
+
- [Platform Matrix](#platform-matrix)
|
|
35
|
+
- [Dependency Risk](#dependency-risk)
|
|
36
|
+
- [Dependency Graph & Duplication](#dependency-graph--duplication)
|
|
37
|
+
- [Tooling Inventory](#tooling-inventory)
|
|
38
|
+
- [Build & Deploy Surface Area](#build--deploy-surface-area)
|
|
39
|
+
- [TypeScript Modernity](#typescript-modernity)
|
|
40
|
+
- [Breaking Change Exposure](#breaking-change-exposure)
|
|
41
|
+
- [File Hotspots](#file-hotspots)
|
|
42
|
+
- [Security Posture](#security-posture)
|
|
43
|
+
- [Service Dependencies](#service-dependencies)
|
|
44
|
+
- [CI Integration](#ci-integration)
|
|
45
|
+
- [GitHub Actions](#github-actions)
|
|
46
|
+
- [Azure DevOps](#azure-devops)
|
|
47
|
+
- [GitLab CI](#gitlab-ci)
|
|
48
|
+
- [Generic Pipelines](#generic-pipelines)
|
|
49
|
+
- [Dashboard Upload](#dashboard-upload)
|
|
50
|
+
- [DSN Tokens](#dsn-tokens)
|
|
51
|
+
- [Data Residency](#data-residency)
|
|
52
|
+
- [Privacy & Security](#privacy--security)
|
|
53
|
+
- [Exit Codes](#exit-codes)
|
|
54
|
+
- [Programmatic API](#programmatic-api)
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## How It Works
|
|
59
|
+
|
|
60
|
+
Vibgrate recursively scans your repository for `package.json` (Node/TypeScript) and `.sln`/`.csproj` (.NET) files. For each project it discovers, it:
|
|
61
|
+
|
|
62
|
+
1. **Detects** the runtime version, target framework, and all dependencies
|
|
63
|
+
2. **Queries** the npm/NuGet registry for latest stable versions (with built-in caching and concurrency control)
|
|
64
|
+
3. **Computes** how far behind each component is — major version lag, EOL proximity, dependency age distribution
|
|
65
|
+
4. **Generates** a deterministic Upgrade Drift Score (0–100)
|
|
66
|
+
5. **Produces** findings, a full JSON artifact, and optional SARIF output
|
|
67
|
+
|
|
68
|
+
No source code is read. No secrets are scanned. The CLI works entirely offline — dashboard upload is optional.
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Commands Reference
|
|
73
|
+
|
|
74
|
+
### vibgrate init
|
|
75
|
+
|
|
76
|
+
Initialise Vibgrate in a project.
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
vibgrate init [path] [--baseline] [--yes]
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
| Flag | Description |
|
|
83
|
+
|------|-------------|
|
|
84
|
+
| `--baseline` | Create an initial drift baseline after init |
|
|
85
|
+
| `--yes` | Skip confirmation prompts |
|
|
86
|
+
|
|
87
|
+
Creates:
|
|
88
|
+
- `.vibgrate/` directory
|
|
89
|
+
- `vibgrate.config.ts` with sensible defaults
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
### vibgrate scan
|
|
94
|
+
|
|
95
|
+
The primary command. Scans your project for upgrade drift.
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
vibgrate scan [path] [--format text|json|sarif] [--out <file>] [--fail-on warn|error] [--baseline <file>] [--changed-only] [--concurrency <n>]
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
| Flag | Default | Description |
|
|
102
|
+
|------|---------|-------------|
|
|
103
|
+
| `--format` | `text` | Output format: `text`, `json`, or `sarif` |
|
|
104
|
+
| `--out <file>` | — | Write output to a file |
|
|
105
|
+
| `--fail-on <level>` | — | Exit with code 2 if findings at this level exist |
|
|
106
|
+
| `--baseline <file>` | — | Compare against a previous baseline |
|
|
107
|
+
| `--changed-only` | — | Only scan changed files |
|
|
108
|
+
| `--concurrency <n>` | `8` | Max concurrent npm registry calls |
|
|
109
|
+
|
|
110
|
+
The scan always writes the full artifact to `.vibgrate/scan_result.json`.
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
### vibgrate baseline
|
|
115
|
+
|
|
116
|
+
Create a drift baseline snapshot for delta comparison.
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
vibgrate baseline [path]
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Runs a full scan and saves the result to `.vibgrate/baseline.json`. Use this as the starting point for tracking drift over time.
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
### vibgrate report
|
|
127
|
+
|
|
128
|
+
Generate a human-readable report from a scan artifact.
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
vibgrate report [--in <file>] [--format md|text|json]
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
| Flag | Default | Description |
|
|
135
|
+
|------|---------|-------------|
|
|
136
|
+
| `--in` | `.vibgrate/scan_result.json` | Input artifact file |
|
|
137
|
+
| `--format` | `text` | Output format: `md`, `text`, or `json` |
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
### vibgrate push
|
|
142
|
+
|
|
143
|
+
Upload scan results to the Vibgrate dashboard API.
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
vibgrate push [--dsn <dsn>] [--file <file>] [--region <region>] [--strict]
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
| Flag | Default | Description |
|
|
150
|
+
|------|---------|-------------|
|
|
151
|
+
| `--dsn` | `VIBGRATE_DSN` env | DSN token for authentication |
|
|
152
|
+
| `--file` | `.vibgrate/scan_result.json` | Scan artifact to upload |
|
|
153
|
+
| `--region` | — | Override data residency region (`us`, `eu`) |
|
|
154
|
+
| `--strict` | — | Fail hard on upload errors |
|
|
155
|
+
|
|
156
|
+
Upload is always optional. Best-effort by default — use `--strict` in CI if you want the pipeline to fail on upload errors.
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
### vibgrate dsn create
|
|
161
|
+
|
|
162
|
+
Generate an HMAC-signed DSN token for API authentication.
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
vibgrate dsn create --workspace <id> [--region <region>] [--ingest <url>] [--write <path>]
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
| Flag | Default | Description |
|
|
169
|
+
|------|---------|-------------|
|
|
170
|
+
| `--workspace` | *required* | Your workspace ID |
|
|
171
|
+
| `--region` | `us` | Data residency region (`us`, `eu`) |
|
|
172
|
+
| `--ingest` | — | Custom ingest API URL (overrides `--region`) |
|
|
173
|
+
| `--write` | — | Write DSN to a file (add to `.gitignore`!) |
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
### vibgrate update
|
|
178
|
+
|
|
179
|
+
Check for and install updates.
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
vibgrate update [--check] [--pm <manager>]
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
| Flag | Description |
|
|
186
|
+
|------|-------------|
|
|
187
|
+
| `--check` | Only check for updates, don't install |
|
|
188
|
+
| `--pm` | Force a package manager (`npm`, `pnpm`, `yarn`, `bun`) |
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
## Upgrade Drift Score
|
|
193
|
+
|
|
194
|
+
### How the Score Is Calculated
|
|
195
|
+
|
|
196
|
+
The Upgrade Drift Score is a deterministic, versioned metric (0–100) that represents how far behind your codebase is relative to the current stable ecosystem baseline.
|
|
197
|
+
|
|
198
|
+
**Higher score = healthier upgrade posture.**
|
|
199
|
+
|
|
200
|
+
### Risk Levels
|
|
201
|
+
|
|
202
|
+
| Score | Risk Level |
|
|
203
|
+
|-------|------------|
|
|
204
|
+
| 70–100 | **Low** — You're in good shape |
|
|
205
|
+
| 40–69 | **Moderate** — Some attention needed |
|
|
206
|
+
| 0–39 | **High** — Significant upgrade debt |
|
|
207
|
+
|
|
208
|
+
### Score Components
|
|
209
|
+
|
|
210
|
+
The overall score is a weighted combination of four components:
|
|
211
|
+
|
|
212
|
+
| Component | What It Measures |
|
|
213
|
+
|-----------|-----------------|
|
|
214
|
+
| **Runtime** | Node.js or .NET runtime major version lag |
|
|
215
|
+
| **Frameworks** | Major version distance for core frameworks (React, Next, NestJS, ASP.NET, etc.) |
|
|
216
|
+
| **Dependencies** | Age distribution across all dependencies (current vs 1 major behind vs 2+ behind) |
|
|
217
|
+
| **EOL Risk** | Proximity to end-of-life for runtimes and frameworks |
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
## Output Formats
|
|
222
|
+
|
|
223
|
+
### Text
|
|
224
|
+
|
|
225
|
+
The default output. A coloured, human-readable report showing:
|
|
226
|
+
- Overall drift score and risk level
|
|
227
|
+
- Score component breakdown with visual bars
|
|
228
|
+
- Per-project details: runtime lag, framework versions, dependency distribution
|
|
229
|
+
- Findings with severity icons
|
|
230
|
+
|
|
231
|
+
### JSON Artifact
|
|
232
|
+
|
|
233
|
+
The full scan artifact in JSON format. Contains all raw data, scores, findings, and VCS metadata. Stable schema (`schemaVersion: "1.0"`). This is the same artifact saved to `.vibgrate/scan_result.json`.
|
|
234
|
+
|
|
235
|
+
### SARIF
|
|
236
|
+
|
|
237
|
+
[Static Analysis Results Interchange Format](https://sarifweb.azurewebsites.net/) — compatible with GitHub Code Scanning and Azure DevOps. Contains findings only (not all metrics). Ideal for integrating drift findings directly into your PR review workflow.
|
|
238
|
+
|
|
239
|
+
### Markdown
|
|
240
|
+
|
|
241
|
+
A clean Markdown report suitable for PRs, wikis, or documentation.
|
|
242
|
+
|
|
243
|
+
---
|
|
244
|
+
|
|
245
|
+
## Configuration
|
|
246
|
+
|
|
247
|
+
### vibgrate.config.ts
|
|
248
|
+
|
|
249
|
+
Run `vibgrate init` to generate the config file, or create one manually:
|
|
250
|
+
|
|
251
|
+
```typescript
|
|
252
|
+
import type { VibgrateConfig } from '@vibgrate/cli';
|
|
253
|
+
|
|
254
|
+
const config: VibgrateConfig = {
|
|
255
|
+
exclude: ['legacy/**'],
|
|
256
|
+
thresholds: {
|
|
257
|
+
failOnError: {
|
|
258
|
+
eolDays: 180,
|
|
259
|
+
frameworkMajorLag: 3,
|
|
260
|
+
dependencyTwoPlusPercent: 50,
|
|
261
|
+
},
|
|
262
|
+
warn: {
|
|
263
|
+
frameworkMajorLag: 2,
|
|
264
|
+
dependencyTwoPlusPercent: 30,
|
|
265
|
+
},
|
|
266
|
+
},
|
|
267
|
+
scanners: {
|
|
268
|
+
platformMatrix: { enabled: true },
|
|
269
|
+
dependencyRisk: { enabled: true },
|
|
270
|
+
dependencyGraph: { enabled: true },
|
|
271
|
+
toolingInventory: { enabled: true },
|
|
272
|
+
buildDeploy: { enabled: true },
|
|
273
|
+
tsModernity: { enabled: true },
|
|
274
|
+
breakingChangeExposure: { enabled: true },
|
|
275
|
+
fileHotspots: { enabled: true },
|
|
276
|
+
securityPosture: { enabled: true },
|
|
277
|
+
serviceDependencies: { enabled: true },
|
|
278
|
+
},
|
|
279
|
+
};
|
|
280
|
+
|
|
281
|
+
export default config;
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
Also supports `vibgrate.config.js` and `vibgrate.config.json`.
|
|
285
|
+
|
|
286
|
+
### Thresholds
|
|
287
|
+
|
|
288
|
+
Control when findings are raised and when the CLI should fail.
|
|
289
|
+
|
|
290
|
+
| Threshold | Default | Triggers |
|
|
291
|
+
|-----------|---------|----------|
|
|
292
|
+
| `failOnError.eolDays` | 180 | Error finding when runtime EOL is within N days |
|
|
293
|
+
| `failOnError.frameworkMajorLag` | 3 | Error finding when any framework is N+ majors behind |
|
|
294
|
+
| `failOnError.dependencyTwoPlusPercent` | 50 | Error finding when N+% of dependencies are 2+ majors behind |
|
|
295
|
+
| `warn.frameworkMajorLag` | 2 | Warning finding when any framework is N+ majors behind |
|
|
296
|
+
| `warn.dependencyTwoPlusPercent` | 30 | Warning finding when N+% of dependencies are 2+ majors behind |
|
|
297
|
+
|
|
298
|
+
### Scanner Toggles
|
|
299
|
+
|
|
300
|
+
Each extended scanner can be individually disabled. Set `scanners: false` to disable all extended scanners (the core drift scan always runs).
|
|
301
|
+
|
|
302
|
+
---
|
|
303
|
+
|
|
304
|
+
## Extended Scanners
|
|
305
|
+
|
|
306
|
+
Beyond the core drift score, Vibgrate runs a suite of extended scanners that collect high-value migration intelligence. All scanners:
|
|
307
|
+
|
|
308
|
+
- Are **read-only** — they never write files or execute project code
|
|
309
|
+
- Run **in parallel** — failures in one scanner never affect the others
|
|
310
|
+
- Can be **individually toggled** in the config
|
|
311
|
+
- Collect **zero sensitive data** — no source code, no secrets, no PII
|
|
312
|
+
|
|
313
|
+
### Platform Matrix
|
|
314
|
+
|
|
315
|
+
Collects platform and architecture signals that predict where builds will break when moving CI runners, containers, or CPU architectures.
|
|
316
|
+
|
|
317
|
+
- `engines.node` and `engines.npm`/`engines.pnpm` ranges
|
|
318
|
+
- `.nvmrc` / `.node-version` files
|
|
319
|
+
- .NET `TargetFramework` and SDK versions
|
|
320
|
+
- Native module risk packages (`sharp`, `bcrypt`, `node-gyp`, etc.)
|
|
321
|
+
- OS-assumption scripts in `package.json`
|
|
322
|
+
- Dockerfile base images (FROM lines only)
|
|
323
|
+
|
|
324
|
+
### Dependency Risk
|
|
325
|
+
|
|
326
|
+
Extends dependency analysis with risk classification signals:
|
|
327
|
+
|
|
328
|
+
- Deprecated packages (npm `deprecated` field)
|
|
329
|
+
- Native module detection
|
|
330
|
+
- Platform-specific package flags
|
|
331
|
+
|
|
332
|
+
### Dependency Graph & Duplication
|
|
333
|
+
|
|
334
|
+
Parses lockfiles (pnpm, npm, yarn, .NET) to build a workspace-wide dependency graph:
|
|
335
|
+
|
|
336
|
+
- Total unique vs. installed dependency counts
|
|
337
|
+
- Duplicated packages (multiple versions of the same package)
|
|
338
|
+
- Phantom dependencies (used but not declared)
|
|
339
|
+
|
|
340
|
+
### Tooling Inventory
|
|
341
|
+
|
|
342
|
+
Maps the full technology stack across your workspace by detecting package names in dependencies:
|
|
343
|
+
|
|
344
|
+
| Category | Examples |
|
|
345
|
+
|----------|---------|
|
|
346
|
+
| Frontend | React, Vue, Angular, Svelte, Solid |
|
|
347
|
+
| Meta-frameworks | Next.js, Nuxt, Astro, Remix |
|
|
348
|
+
| Bundlers | Vite, webpack, esbuild, Rollup |
|
|
349
|
+
| Backend | Express, Fastify, NestJS, Hono |
|
|
350
|
+
| ORM / DB | Prisma, Drizzle, TypeORM, EF Core |
|
|
351
|
+
| Testing | Vitest, Jest, Playwright, xUnit |
|
|
352
|
+
| Observability | Sentry, OpenTelemetry, Pino, Winston |
|
|
353
|
+
|
|
354
|
+
### Build & Deploy Surface Area
|
|
355
|
+
|
|
356
|
+
Detects CI/CD, containerisation, and infrastructure-as-code:
|
|
357
|
+
|
|
358
|
+
- CI systems (GitHub Actions, GitLab CI, Azure DevOps, Jenkins, CircleCI)
|
|
359
|
+
- Docker and Docker Compose
|
|
360
|
+
- IaC (Terraform, Bicep, CloudFormation, Pulumi)
|
|
361
|
+
- Release tooling (Changesets, semantic-release, GitVersion)
|
|
362
|
+
- Package managers and monorepo tools
|
|
363
|
+
|
|
364
|
+
### TypeScript Modernity
|
|
365
|
+
|
|
366
|
+
Reads `tsconfig.json` compiler options to assess strictness and modernity:
|
|
367
|
+
|
|
368
|
+
- TypeScript version
|
|
369
|
+
- `strict`, `noImplicitAny`, `strictNullChecks` flags
|
|
370
|
+
- Module system (`module`, `moduleResolution`, `target`)
|
|
371
|
+
- ESM vs CJS classification
|
|
372
|
+
- `exports` field presence
|
|
373
|
+
|
|
374
|
+
### Breaking Change Exposure
|
|
375
|
+
|
|
376
|
+
Flags packages and patterns known to cause upgrade pain:
|
|
377
|
+
|
|
378
|
+
- Deprecated packages (e.g. `request`, `node-sass`, `tslint`, `moment`)
|
|
379
|
+
- Legacy Node API polyfills no longer needed on Node 18+ (e.g. `node-fetch`, `abort-controller`)
|
|
380
|
+
- Peer dependency conflicts
|
|
381
|
+
- Exposure score (0–100)
|
|
382
|
+
|
|
383
|
+
### File Hotspots
|
|
384
|
+
|
|
385
|
+
Lightweight complexity analysis using filesystem metadata only (never reads file contents):
|
|
386
|
+
|
|
387
|
+
- File counts by extension
|
|
388
|
+
- Largest files by size (path + bytes)
|
|
389
|
+
- Directory depth distribution
|
|
390
|
+
- Most-used packages across the workspace
|
|
391
|
+
|
|
392
|
+
### Security Posture
|
|
393
|
+
|
|
394
|
+
Structural security hygiene indicators (not a secret scanner):
|
|
395
|
+
|
|
396
|
+
- Lockfile presence and consistency
|
|
397
|
+
- `.gitignore` coverage for `.env` files and `node_modules`
|
|
398
|
+
- `.env` files tracked outside `.gitignore`
|
|
399
|
+
- Audit severity counts (via `npm audit --json`)
|
|
400
|
+
|
|
401
|
+
### Service Dependencies
|
|
402
|
+
|
|
403
|
+
Maps external service and platform dependencies by detecting SDK packages:
|
|
404
|
+
|
|
405
|
+
| Category | Examples |
|
|
406
|
+
|----------|---------|
|
|
407
|
+
| Payment | Stripe, Braintree, PayPal |
|
|
408
|
+
| Auth | Auth0, Clerk, Firebase, Passport |
|
|
409
|
+
| Cloud SDKs | AWS, Azure, Google Cloud |
|
|
410
|
+
| Databases | PostgreSQL, MongoDB, Redis |
|
|
411
|
+
| Messaging | SQS, SNS, Kafka, BullMQ |
|
|
412
|
+
| Observability | Sentry, DataDog, New Relic |
|
|
413
|
+
|
|
414
|
+
---
|
|
415
|
+
|
|
416
|
+
## CI Integration
|
|
417
|
+
|
|
418
|
+
### GitHub Actions
|
|
419
|
+
|
|
420
|
+
```yaml
|
|
421
|
+
steps:
|
|
422
|
+
- name: Vibgrate Scan
|
|
423
|
+
run: npx @vibgrate/cli scan . --format sarif --out vibgrate.sarif --fail-on error
|
|
424
|
+
|
|
425
|
+
- name: Upload SARIF
|
|
426
|
+
uses: github/codeql-action/upload-sarif@v3
|
|
427
|
+
with:
|
|
428
|
+
sarif_file: vibgrate.sarif
|
|
429
|
+
|
|
430
|
+
# Optional: push metrics to dashboard
|
|
431
|
+
- name: Push Vibgrate Metrics
|
|
432
|
+
env:
|
|
433
|
+
VIBGRATE_DSN: ${{ secrets.VIBGRATE_DSN }}
|
|
434
|
+
run: npx @vibgrate/cli push --file .vibgrate/scan_result.json
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
### Azure DevOps
|
|
438
|
+
|
|
439
|
+
```yaml
|
|
440
|
+
steps:
|
|
441
|
+
- script: npx @vibgrate/cli scan . --format sarif --out vibgrate.sarif --fail-on error
|
|
442
|
+
displayName: Vibgrate Scan
|
|
443
|
+
|
|
444
|
+
- task: PublishBuildArtifacts@1
|
|
445
|
+
inputs:
|
|
446
|
+
PathtoPublish: vibgrate.sarif
|
|
447
|
+
ArtifactName: VibgrateSARIF
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
### GitLab CI
|
|
451
|
+
|
|
452
|
+
```yaml
|
|
453
|
+
vibgrate:
|
|
454
|
+
script:
|
|
455
|
+
- npx @vibgrate/cli scan . --format sarif --out vibgrate.sarif --fail-on error
|
|
456
|
+
artifacts:
|
|
457
|
+
reports:
|
|
458
|
+
sast: vibgrate.sarif
|
|
459
|
+
```
|
|
460
|
+
|
|
461
|
+
### Generic Pipelines
|
|
462
|
+
|
|
463
|
+
Vibgrate works in any CI environment. The CLI:
|
|
464
|
+
|
|
465
|
+
- Requires no login or authentication
|
|
466
|
+
- Returns meaningful exit codes (see below)
|
|
467
|
+
- Produces standard SARIF output
|
|
468
|
+
- Works entirely offline (push is opt-in)
|
|
469
|
+
|
|
470
|
+
---
|
|
471
|
+
|
|
472
|
+
## Dashboard Upload
|
|
473
|
+
|
|
474
|
+
### DSN Tokens
|
|
475
|
+
|
|
476
|
+
Vibgrate uses HMAC-signed DSN tokens for authenticated uploads. The DSN format:
|
|
477
|
+
|
|
478
|
+
```
|
|
479
|
+
vibgrate+https://<key_id>:<secret>@<ingest_host>/<workspace_id>
|
|
480
|
+
```
|
|
481
|
+
|
|
482
|
+
Set `VIBGRATE_DSN` as a secret in your CI environment. Uploads are always optional — the CLI provides full value locally without any server connection.
|
|
483
|
+
|
|
484
|
+
### Data Residency
|
|
485
|
+
|
|
486
|
+
Vibgrate supports region-specific ingest endpoints:
|
|
487
|
+
|
|
488
|
+
| Region | Endpoint |
|
|
489
|
+
|--------|----------|
|
|
490
|
+
| US (default) | `us.ingest.vibgrate.com` |
|
|
491
|
+
| EU | `eu.ingest.vibgrate.com` |
|
|
492
|
+
|
|
493
|
+
Use `--region eu` on `push` or `dsn create` to route data to the EU endpoint.
|
|
494
|
+
|
|
495
|
+
---
|
|
496
|
+
|
|
497
|
+
## Privacy & Security
|
|
498
|
+
|
|
499
|
+
Vibgrate is built with a privacy-first architecture. Here's what it **never** does:
|
|
500
|
+
|
|
501
|
+
| Category | Hard guarantee |
|
|
502
|
+
|----------|---------------|
|
|
503
|
+
| Source code | Never read beyond config/manifest files |
|
|
504
|
+
| Secrets | Never scanned for, never extracted |
|
|
505
|
+
| Environment values | Never read — only `.env` file existence is flagged |
|
|
506
|
+
| Git identity data | Never accessed — `git log` is never invoked |
|
|
507
|
+
| File contents | Only structured config fields are extracted |
|
|
508
|
+
| Network endpoints | Never parsed from config files |
|
|
509
|
+
|
|
510
|
+
What it **does** collect:
|
|
511
|
+
|
|
512
|
+
- Package names and version numbers (from `package.json`, `.csproj`, lockfiles)
|
|
513
|
+
- Config structure flags (e.g. `strict: true` from `tsconfig.json`)
|
|
514
|
+
- File names and sizes (paths and metadata, never contents)
|
|
515
|
+
- Public npm/NuGet registry metadata (latest versions, deprecation flags)
|
|
516
|
+
- CI/Docker/IaC file presence and structural counts
|
|
517
|
+
|
|
518
|
+
---
|
|
519
|
+
|
|
520
|
+
## Exit Codes
|
|
521
|
+
|
|
522
|
+
| Code | Meaning |
|
|
523
|
+
|------|---------|
|
|
524
|
+
| `0` | Success |
|
|
525
|
+
| `1` | Runtime error |
|
|
526
|
+
| `2` | `--fail-on` threshold exceeded |
|
|
527
|
+
|
|
528
|
+
---
|
|
529
|
+
|
|
530
|
+
## Programmatic API
|
|
531
|
+
|
|
532
|
+
The package exports its core types for programmatic use:
|
|
533
|
+
|
|
534
|
+
```typescript
|
|
535
|
+
import type { VibgrateConfig, ScanArtifact, DriftScore, Finding } from '@vibgrate/cli';
|
|
536
|
+
```
|
|
537
|
+
|
|
538
|
+
---
|
|
539
|
+
|
|
540
|
+
## Requirements
|
|
541
|
+
|
|
542
|
+
- **Node.js** >= 20.0.0
|
|
543
|
+
- Works on macOS, Linux, and Windows
|
|
544
|
+
|
|
545
|
+
---
|
|
546
|
+
|
|
547
|
+
## Links
|
|
548
|
+
|
|
549
|
+
- [Website](https://vibgrate.com)
|
|
550
|
+
- [npm](https://www.npmjs.com/package/@vibgrate/cli)
|
|
551
|
+
|
|
552
|
+
---
|
|
553
|
+
|
|
554
|
+
Copyright © 2026 Vibgrate. All rights reserved. See [LICENSE](./LICENSE) for terms.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
Vibgrate Proprietary License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Vibgrate. All rights reserved.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person or organisation
|
|
6
|
+
obtaining a copy of this software in compiled/distributed form (the "Software"),
|
|
7
|
+
to use the Software for internal business and personal purposes, subject to the
|
|
8
|
+
following conditions:
|
|
9
|
+
|
|
10
|
+
1. PERMITTED USE
|
|
11
|
+
You may install, run, and use the Software as provided via the npm registry
|
|
12
|
+
for the purpose of analysing upgrade drift in your own projects.
|
|
13
|
+
|
|
14
|
+
2. NO MODIFICATION
|
|
15
|
+
You may not modify, adapt, translate, reverse-engineer, decompile,
|
|
16
|
+
disassemble, or create derivative works based on the Software.
|
|
17
|
+
|
|
18
|
+
3. NO REDISTRIBUTION
|
|
19
|
+
You may not redistribute, sublicense, sell, lease, or otherwise transfer
|
|
20
|
+
the Software or any copy thereof to any third party, except as part of
|
|
21
|
+
your own project's development toolchain (e.g. listed as a dependency in
|
|
22
|
+
package.json).
|
|
23
|
+
|
|
24
|
+
4. NO SOURCE CODE ACCESS
|
|
25
|
+
The source code of this Software is proprietary and confidential. Access
|
|
26
|
+
to source code, if provided separately, does not grant any additional
|
|
27
|
+
rights beyond those stated in this license.
|
|
28
|
+
|
|
29
|
+
5. NO WARRANTY
|
|
30
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
31
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
32
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
33
|
+
|
|
34
|
+
6. LIMITATION OF LIABILITY
|
|
35
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
36
|
+
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
37
|
+
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
38
|
+
USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
39
|
+
|
|
40
|
+
7. TERMINATION
|
|
41
|
+
This license is effective until terminated. It will terminate automatically
|
|
42
|
+
if you fail to comply with any of its terms. Upon termination, you must
|
|
43
|
+
destroy all copies of the Software in your possession.
|
|
44
|
+
|
|
45
|
+
For licensing enquiries: ops@vibgrate.com
|