@vibgrate/cli 1.0.26 → 1.0.27
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 +16 -1
- package/README.md +6 -2
- package/dist/{baseline-KXUPTMQ2.js → baseline-B5K5M2XJ.js} +2 -2
- package/dist/{chunk-7EEUYKZI.js → chunk-K4ZGFGP2.js} +1 -1
- package/dist/chunk-PROF25OR.js +217290 -0
- package/dist/cli.js +3 -3
- package/dist/index.d.ts +71 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-27LB7QTA.js +0 -5857
package/dist/cli.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-GN3IWKSY.js";
|
|
5
5
|
import {
|
|
6
6
|
baselineCommand
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-K4ZGFGP2.js";
|
|
8
8
|
import {
|
|
9
9
|
VERSION,
|
|
10
10
|
dsnCommand,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
readJsonFile,
|
|
16
16
|
scanCommand,
|
|
17
17
|
writeDefaultConfig
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-PROF25OR.js";
|
|
19
19
|
|
|
20
20
|
// src/cli.ts
|
|
21
21
|
import { Command as Command4 } from "commander";
|
|
@@ -38,7 +38,7 @@ var initCommand = new Command("init").description("Initialize vibgrate in a proj
|
|
|
38
38
|
console.log(chalk.green("\u2714") + ` Created ${chalk.bold("vibgrate.config.ts")}`);
|
|
39
39
|
}
|
|
40
40
|
if (opts.baseline) {
|
|
41
|
-
const { runBaseline } = await import("./baseline-
|
|
41
|
+
const { runBaseline } = await import("./baseline-B5K5M2XJ.js");
|
|
42
42
|
await runBaseline(rootDir);
|
|
43
43
|
}
|
|
44
44
|
console.log("");
|
package/dist/index.d.ts
CHANGED
|
@@ -107,6 +107,10 @@ interface ScanOptions {
|
|
|
107
107
|
interface ScannerToggle {
|
|
108
108
|
enabled: boolean;
|
|
109
109
|
}
|
|
110
|
+
type OwaspScannerMode = 'fast' | 'cache-input';
|
|
111
|
+
interface OwaspScannerConfig extends ScannerToggle {
|
|
112
|
+
mode?: OwaspScannerMode;
|
|
113
|
+
}
|
|
110
114
|
interface ScannersConfig {
|
|
111
115
|
platformMatrix?: ScannerToggle;
|
|
112
116
|
dependencyRisk?: ScannerToggle;
|
|
@@ -117,8 +121,11 @@ interface ScannersConfig {
|
|
|
117
121
|
breakingChangeExposure?: ScannerToggle;
|
|
118
122
|
fileHotspots?: ScannerToggle;
|
|
119
123
|
securityPosture?: ScannerToggle;
|
|
124
|
+
securityScanners?: ScannerToggle;
|
|
120
125
|
serviceDependencies?: ScannerToggle;
|
|
121
126
|
architecture?: ScannerToggle;
|
|
127
|
+
codeQuality?: ScannerToggle;
|
|
128
|
+
owaspCategoryMapping?: OwaspScannerConfig;
|
|
122
129
|
}
|
|
123
130
|
interface VibgrateConfig {
|
|
124
131
|
include?: string[];
|
|
@@ -258,6 +265,32 @@ interface ServiceDependenciesResult {
|
|
|
258
265
|
storage: ServiceDependencyItem[];
|
|
259
266
|
search: ServiceDependencyItem[];
|
|
260
267
|
}
|
|
268
|
+
type SecurityScannerStatus = 'up-to-date' | 'review-needed' | 'unknown' | 'unavailable';
|
|
269
|
+
interface SecurityToolAssessment {
|
|
270
|
+
name: 'semgrep' | 'gitleaks' | 'trufflehog';
|
|
271
|
+
category: 'sast' | 'secrets';
|
|
272
|
+
command: string;
|
|
273
|
+
available: boolean;
|
|
274
|
+
version: string | null;
|
|
275
|
+
minRecommendedVersion: string;
|
|
276
|
+
status: SecurityScannerStatus;
|
|
277
|
+
risks: string[];
|
|
278
|
+
}
|
|
279
|
+
interface SecretHeuristicFinding {
|
|
280
|
+
file: string;
|
|
281
|
+
detector: string;
|
|
282
|
+
sample: string;
|
|
283
|
+
}
|
|
284
|
+
interface SecurityScannersResult {
|
|
285
|
+
semgrep: SecurityToolAssessment;
|
|
286
|
+
secretScanners: SecurityToolAssessment[];
|
|
287
|
+
configFiles: {
|
|
288
|
+
semgrep: boolean;
|
|
289
|
+
gitleaks: boolean;
|
|
290
|
+
trufflehog: boolean;
|
|
291
|
+
};
|
|
292
|
+
heuristicFindings: SecretHeuristicFinding[];
|
|
293
|
+
}
|
|
261
294
|
/** Detected project archetype (fingerprint) */
|
|
262
295
|
type ProjectArchetype = 'nextjs' | 'remix' | 'sveltekit' | 'nuxt' | 'nestjs' | 'express' | 'fastify' | 'hono' | 'koa' | 'serverless' | 'library' | 'cli' | 'monorepo' | 'unknown';
|
|
263
296
|
/** Architectural layer classification */
|
|
@@ -300,6 +333,22 @@ interface ArchitectureResult {
|
|
|
300
333
|
/** Files that could not be classified */
|
|
301
334
|
unclassified: number;
|
|
302
335
|
}
|
|
336
|
+
interface GodFile {
|
|
337
|
+
path: string;
|
|
338
|
+
lines: number;
|
|
339
|
+
functionCount: number;
|
|
340
|
+
averageComplexity: number;
|
|
341
|
+
}
|
|
342
|
+
interface CodeQualityResult {
|
|
343
|
+
filesAnalyzed: number;
|
|
344
|
+
functionsAnalyzed: number;
|
|
345
|
+
avgCyclomaticComplexity: number;
|
|
346
|
+
avgFunctionLength: number;
|
|
347
|
+
maxNestingDepth: number;
|
|
348
|
+
godFiles: GodFile[];
|
|
349
|
+
circularDependencies: number;
|
|
350
|
+
deadCodePercent: number;
|
|
351
|
+
}
|
|
303
352
|
interface ExtendedScanResults {
|
|
304
353
|
platformMatrix?: PlatformMatrixResult;
|
|
305
354
|
dependencyRisk?: DependencyRiskResult;
|
|
@@ -310,8 +359,30 @@ interface ExtendedScanResults {
|
|
|
310
359
|
breakingChangeExposure?: BreakingChangeExposureResult;
|
|
311
360
|
fileHotspots?: FileHotspotsResult;
|
|
312
361
|
securityPosture?: SecurityPostureResult;
|
|
362
|
+
securityScanners?: SecurityScannersResult;
|
|
313
363
|
serviceDependencies?: ServiceDependenciesResult;
|
|
314
364
|
architecture?: ArchitectureResult;
|
|
365
|
+
codeQuality?: CodeQualityResult;
|
|
366
|
+
owaspCategoryMapping?: OwaspCategoryMappingResult;
|
|
367
|
+
}
|
|
368
|
+
interface OwaspFinding {
|
|
369
|
+
ruleId: string;
|
|
370
|
+
path: string;
|
|
371
|
+
line: number;
|
|
372
|
+
endLine?: number;
|
|
373
|
+
message: string;
|
|
374
|
+
severity: 'low' | 'medium' | 'high';
|
|
375
|
+
categories: string[];
|
|
376
|
+
cwe: string | null;
|
|
377
|
+
}
|
|
378
|
+
interface OwaspCategoryMappingResult {
|
|
379
|
+
scanner: 'semgrep';
|
|
380
|
+
available: boolean;
|
|
381
|
+
mode: OwaspScannerMode;
|
|
382
|
+
scannedFiles: number;
|
|
383
|
+
findings: OwaspFinding[];
|
|
384
|
+
categoryCounts: Record<string, number>;
|
|
385
|
+
errors: string[];
|
|
315
386
|
}
|
|
316
387
|
|
|
317
388
|
declare function runScan(rootDir: string, opts: ScanOptions): Promise<ScanArtifact>;
|
package/dist/index.js
CHANGED