@maverick006/vibeguard 1.0.12 → 1.0.14
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/dist/formatter.js +6 -5
- package/dist/index.js +2 -1
- package/package.json +32 -32
- package/src/formatter.ts +6 -5
- package/src/index.ts +2 -1
package/dist/formatter.js
CHANGED
|
@@ -410,14 +410,15 @@ function renderDashboard(options) {
|
|
|
410
410
|
}
|
|
411
411
|
function renderCIOutput(options) {
|
|
412
412
|
const lines = [];
|
|
413
|
+
const breakdown = options.deterministicScore.breakdown || calculateScore(options.findings);
|
|
413
414
|
lines.push('VibeGuard Security Policy');
|
|
414
415
|
lines.push('');
|
|
415
416
|
lines.push(`Score: ${options.deterministicScore.score}/100 (${options.deterministicScore.grade})`);
|
|
416
417
|
lines.push(`Findings: ${options.findings.length}`);
|
|
417
|
-
lines.push(`Critical: ${
|
|
418
|
-
lines.push(`High: ${
|
|
419
|
-
lines.push(`Medium: ${
|
|
420
|
-
lines.push(`Low: ${
|
|
418
|
+
lines.push(`Critical: ${breakdown.critical}`);
|
|
419
|
+
lines.push(`High: ${breakdown.high}`);
|
|
420
|
+
lines.push(`Medium: ${breakdown.medium}`);
|
|
421
|
+
lines.push(`Low: ${breakdown.low}`);
|
|
421
422
|
lines.push('');
|
|
422
423
|
lines.push(`Policy: ${options.policyPassed ? 'PASS' : 'FAIL'}`);
|
|
423
424
|
lines.push(`Threshold: ${options.failThreshold.toUpperCase()}`);
|
|
@@ -441,7 +442,7 @@ function generateJsonOutput(options) {
|
|
|
441
442
|
domains: options.coverageData
|
|
442
443
|
},
|
|
443
444
|
deductions: options.deterministicScore.deductions,
|
|
444
|
-
breakdown: options.deterministicScore.breakdown,
|
|
445
|
+
breakdown: options.deterministicScore.breakdown || calculateScore(options.findings),
|
|
445
446
|
explanation: options.deterministicScore.explanation,
|
|
446
447
|
findings: options.findings.map(f => ({
|
|
447
448
|
id: f.id,
|
package/dist/index.js
CHANGED
|
@@ -175,7 +175,8 @@ program
|
|
|
175
175
|
}
|
|
176
176
|
// Policy verification
|
|
177
177
|
const failThreshold = (options.failOn || 'high').toLowerCase();
|
|
178
|
-
const
|
|
178
|
+
const policyBreakdown = deterministicScore.breakdown || stats;
|
|
179
|
+
const policyEvaluation = (0, formatter_1.evaluatePolicy)(failThreshold, policyBreakdown, findings.length);
|
|
179
180
|
const policyPassed = policyEvaluation.passed;
|
|
180
181
|
const thresholdBreached = !policyPassed;
|
|
181
182
|
// Cloud synchronization tracking
|
package/package.json
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@maverick006/vibeguard",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "VibeGuard CLI",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"bin": {
|
|
7
|
-
"vibeguard": "./dist/index.js"
|
|
8
|
-
},
|
|
9
|
-
"scripts": {
|
|
10
|
-
"build": "tsc",
|
|
11
|
-
"dev": "ts-node src/index.ts",
|
|
12
|
-
"start": "node dist/index.js",
|
|
13
|
-
"test": "jest"
|
|
14
|
-
},
|
|
15
|
-
"dependencies": {
|
|
16
|
-
"@maverick006/ai-engine": "*",
|
|
17
|
-
"@maverick006/security-engine": "*",
|
|
18
|
-
"@maverick006/scanner-npm-audit": "*",
|
|
19
|
-
"@maverick006/types": "*",
|
|
20
|
-
"chalk": "^4.1.2",
|
|
21
|
-
"commander": "^11.1.0",
|
|
22
|
-
"dotenv": "^17.4.2",
|
|
23
|
-
"ora": "^5.4.1"
|
|
24
|
-
},
|
|
25
|
-
"devDependencies": {
|
|
26
|
-
"@types/node": "^20.0.0",
|
|
27
|
-
"typescript": "^5.0.0",
|
|
28
|
-
"jest": "^29.5.0",
|
|
29
|
-
"@types/jest": "^29.5.0",
|
|
30
|
-
"ts-jest": "^29.1.0"
|
|
31
|
-
}
|
|
32
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@maverick006/vibeguard",
|
|
3
|
+
"version": "1.0.14",
|
|
4
|
+
"description": "VibeGuard CLI",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"vibeguard": "./dist/index.js"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"build": "tsc",
|
|
11
|
+
"dev": "ts-node src/index.ts",
|
|
12
|
+
"start": "node dist/index.js",
|
|
13
|
+
"test": "jest"
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@maverick006/ai-engine": "*",
|
|
17
|
+
"@maverick006/security-engine": "*",
|
|
18
|
+
"@maverick006/scanner-npm-audit": "*",
|
|
19
|
+
"@maverick006/types": "*",
|
|
20
|
+
"chalk": "^4.1.2",
|
|
21
|
+
"commander": "^11.1.0",
|
|
22
|
+
"dotenv": "^17.4.2",
|
|
23
|
+
"ora": "^5.4.1"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@types/node": "^20.0.0",
|
|
27
|
+
"typescript": "^5.0.0",
|
|
28
|
+
"jest": "^29.5.0",
|
|
29
|
+
"@types/jest": "^29.5.0",
|
|
30
|
+
"ts-jest": "^29.1.0"
|
|
31
|
+
}
|
|
32
|
+
}
|
package/src/formatter.ts
CHANGED
|
@@ -482,14 +482,15 @@ export function renderCIOutput(options: {
|
|
|
482
482
|
verbose?: boolean;
|
|
483
483
|
}): string[] {
|
|
484
484
|
const lines: string[] = [];
|
|
485
|
+
const breakdown = options.deterministicScore.breakdown || calculateScore(options.findings);
|
|
485
486
|
lines.push('VibeGuard Security Policy');
|
|
486
487
|
lines.push('');
|
|
487
488
|
lines.push(`Score: ${options.deterministicScore.score}/100 (${options.deterministicScore.grade})`);
|
|
488
489
|
lines.push(`Findings: ${options.findings.length}`);
|
|
489
|
-
lines.push(`Critical: ${
|
|
490
|
-
lines.push(`High: ${
|
|
491
|
-
lines.push(`Medium: ${
|
|
492
|
-
lines.push(`Low: ${
|
|
490
|
+
lines.push(`Critical: ${breakdown.critical}`);
|
|
491
|
+
lines.push(`High: ${breakdown.high}`);
|
|
492
|
+
lines.push(`Medium: ${breakdown.medium}`);
|
|
493
|
+
lines.push(`Low: ${breakdown.low}`);
|
|
493
494
|
lines.push('');
|
|
494
495
|
lines.push(`Policy: ${options.policyPassed ? 'PASS' : 'FAIL'}`);
|
|
495
496
|
lines.push(`Threshold: ${options.failThreshold.toUpperCase()}`);
|
|
@@ -526,7 +527,7 @@ export function generateJsonOutput(options: {
|
|
|
526
527
|
domains: options.coverageData
|
|
527
528
|
},
|
|
528
529
|
deductions: options.deterministicScore.deductions,
|
|
529
|
-
breakdown: options.deterministicScore.breakdown,
|
|
530
|
+
breakdown: options.deterministicScore.breakdown || calculateScore(options.findings),
|
|
530
531
|
explanation: options.deterministicScore.explanation,
|
|
531
532
|
findings: options.findings.map(f => ({
|
|
532
533
|
id: f.id,
|
package/src/index.ts
CHANGED
|
@@ -199,7 +199,8 @@ program
|
|
|
199
199
|
|
|
200
200
|
// Policy verification
|
|
201
201
|
const failThreshold = (options.failOn || 'high').toLowerCase();
|
|
202
|
-
const
|
|
202
|
+
const policyBreakdown = deterministicScore.breakdown || stats;
|
|
203
|
+
const policyEvaluation = evaluatePolicy(failThreshold, policyBreakdown, findings.length);
|
|
203
204
|
const policyPassed = policyEvaluation.passed;
|
|
204
205
|
const thresholdBreached = !policyPassed;
|
|
205
206
|
|