@vibecheckai/cli 2.5.1 → 2.5.2
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/README.md +88 -88
- package/dist/autopatch/verified-autopatch.js +10 -10
- package/dist/bundles/index.js +3 -3
- package/dist/bundles/vibecheck-core.js +25799 -0
- package/dist/bundles/vibecheck-security.js +208687 -0
- package/dist/bundles/vibecheck-ship.js +2318 -0
- package/dist/commands/baseline.js +1 -1
- package/dist/commands/cache.js +4 -4
- package/dist/commands/checkpoint.d.ts +1 -1
- package/dist/commands/checkpoint.js +1 -1
- package/dist/commands/doctor.d.ts +1 -1
- package/dist/commands/doctor.js +12 -12
- package/dist/commands/evidence.js +4 -4
- package/dist/commands/evidence.js.map +1 -1
- package/dist/commands/explain.d.ts +1 -1
- package/dist/commands/explain.js +4 -4
- package/dist/commands/fix-consolidated.d.ts +1 -1
- package/dist/commands/fix-consolidated.js +3 -3
- package/dist/commands/init.d.ts +1 -1
- package/dist/commands/init.js +7 -7
- package/dist/commands/launcher.d.ts +1 -1
- package/dist/commands/launcher.js +9 -9
- package/dist/commands/on.d.ts +1 -1
- package/dist/commands/on.js +2 -2
- package/dist/commands/replay.d.ts +1 -1
- package/dist/commands/replay.js +5 -5
- package/dist/commands/scan-consolidated.d.ts +1 -1
- package/dist/commands/scan-consolidated.js +10 -10
- package/dist/commands/scan-secrets.js +5 -5
- package/dist/commands/scan-vulnerabilities-enhanced.d.ts +1 -1
- package/dist/commands/scan-vulnerabilities-enhanced.js +1 -1
- package/dist/commands/scan-vulnerabilities-osv.d.ts +1 -1
- package/dist/commands/scan-vulnerabilities-osv.js +6 -6
- package/dist/commands/scan-vulnerabilities-osv.js.map +1 -1
- package/dist/commands/secrets-allowlist.js +5 -5
- package/dist/commands/secrets-allowlist.js.map +1 -1
- package/dist/commands/ship-consolidated.d.ts +1 -1
- package/dist/commands/ship-consolidated.js +198 -198
- package/dist/commands/stats.d.ts +1 -1
- package/dist/commands/stats.js +5 -5
- package/dist/commands/upgrade.d.ts +1 -1
- package/dist/commands/upgrade.js +2 -2
- package/dist/commands/upgrade.js.map +1 -1
- package/dist/fix/backup.js +1 -1
- package/dist/formatters/sarif-enhanced.js +3 -3
- package/dist/formatters/sarif-enhanced.js.map +1 -1
- package/dist/formatters/sarif-v2.js +17 -17
- package/dist/formatters/sarif-v2.js.map +1 -1
- package/dist/formatters/sarif.js +8 -8
- package/dist/formatters/sarif.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +87 -87
- package/dist/index.js.map +1 -1
- package/dist/init/ci-generator.js +29 -29
- package/dist/init/hooks-installer.js +19 -19
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/telemetry.js +2 -2
- package/dist/reality/reality-runner.d.ts +1 -1
- package/dist/reality/reality-runner.js +3 -3
- package/dist/reality/receipt-generator.js +4 -4
- package/dist/runtime/client.js +5 -5
- package/dist/runtime/client.js.map +1 -1
- package/dist/runtime/creds.js +4 -4
- package/dist/runtime/creds.js.map +1 -1
- package/dist/runtime/json-output.js +1 -1
- package/dist/scan/reality-sniff.js +1 -1
- package/dist/truth-pack/index.js +1 -1
- package/dist/ui/frame.js +1 -1
- package/dist/ui.js +1 -1
- package/package.json +9 -11
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* vibecheck CLI
|
|
5
5
|
*
|
|
6
6
|
* Command-line interface for local security scanning
|
|
7
7
|
*/
|
|
@@ -48,7 +48,7 @@ const fs_1 = require("fs");
|
|
|
48
48
|
const path_2 = require("path");
|
|
49
49
|
// Use package.json version instead of hardcoding
|
|
50
50
|
const { version: CLI_VERSION = '0.0.0' } = require('../package.json');
|
|
51
|
-
const
|
|
51
|
+
const vibecheck_security_1 = require('./bundles/vibecheck-security');
|
|
52
52
|
const creds_1 = require("./runtime/creds");
|
|
53
53
|
const client_1 = require("./runtime/client");
|
|
54
54
|
const exit_codes_1 = require("./runtime/exit-codes");
|
|
@@ -73,7 +73,7 @@ const init_2 = require("./init");
|
|
|
73
73
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
74
74
|
// Detect Unicode support
|
|
75
75
|
const hasUnicode = () => {
|
|
76
|
-
if (process.env.
|
|
76
|
+
if (process.env.VIBECHECK_NO_UNICODE === '1')
|
|
77
77
|
return false;
|
|
78
78
|
if (process.platform === 'win32') {
|
|
79
79
|
return (process.env.CI ||
|
|
@@ -490,7 +490,7 @@ async function delay(ms) {
|
|
|
490
490
|
return new Promise(resolve => setTimeout(resolve, ms));
|
|
491
491
|
}
|
|
492
492
|
// Config file path for storing API key
|
|
493
|
-
const CONFIG_DIR = (0, path_2.join)(process.env.HOME || process.env.USERPROFILE || '.', '.
|
|
493
|
+
const CONFIG_DIR = (0, path_2.join)(process.env.HOME || process.env.USERPROFILE || '.', '.vibecheck');
|
|
494
494
|
const CONFIG_FILE = (0, path_2.join)(CONFIG_DIR, 'credentials.json');
|
|
495
495
|
function loadConfig() {
|
|
496
496
|
try {
|
|
@@ -511,7 +511,7 @@ function saveConfig(config) {
|
|
|
511
511
|
}
|
|
512
512
|
// Interactive menu helpers
|
|
513
513
|
function isInteractiveAllowed(argv) {
|
|
514
|
-
if (process.env.
|
|
514
|
+
if (process.env.VIBECHECK_NO_INTERACTIVE === '1')
|
|
515
515
|
return false;
|
|
516
516
|
if (argv.includes('--no-interactive'))
|
|
517
517
|
return false;
|
|
@@ -525,7 +525,7 @@ function nowStamp() {
|
|
|
525
525
|
return `${d.getFullYear()}${pad(d.getMonth() + 1)}${pad(d.getDate())}-${pad(d.getHours())}${pad(d.getMinutes())}${pad(d.getSeconds())}`;
|
|
526
526
|
}
|
|
527
527
|
function defaultReportPath(projectPath, kind, ext) {
|
|
528
|
-
const dir = (0, path_2.join)(projectPath, '.
|
|
528
|
+
const dir = (0, path_2.join)(projectPath, '.vibecheck', 'reports');
|
|
529
529
|
if (!(0, fs_1.existsSync)(dir))
|
|
530
530
|
(0, fs_1.mkdirSync)(dir, { recursive: true });
|
|
531
531
|
return (0, path_2.join)(dir, `${kind}-${nowStamp()}.${ext}`);
|
|
@@ -543,8 +543,8 @@ async function requireAuthAsync(requiredTier) {
|
|
|
543
543
|
cachedAuthState = state;
|
|
544
544
|
if (!state.apiKey && !state.accessToken) {
|
|
545
545
|
console.error(`\n${c.critical('ERROR')} Authentication required\n`);
|
|
546
|
-
console.log(` ${c.dim('Run')} ${c.bold('
|
|
547
|
-
console.log(` ${c.dim('Get your API key from')} ${c.info('https://
|
|
546
|
+
console.log(` ${c.dim('Run')} ${c.bold('vibecheck auth --key YOUR_API_KEY')} ${c.dim('to authenticate')}`);
|
|
547
|
+
console.log(` ${c.dim('Get your API key from')} ${c.info('https://vibecheckai.dev/api-key')}\n`);
|
|
548
548
|
(0, exit_codes_1.exitWith)(exit_codes_1.ExitCode.AUTH_FAILURE);
|
|
549
549
|
}
|
|
550
550
|
// Check if cached entitlements are still valid
|
|
@@ -586,7 +586,7 @@ function checkTierAccess(state, requiredTier) {
|
|
|
586
586
|
if (currentLevel < requiredLevel) {
|
|
587
587
|
console.error(`\n${c.critical('UPGRADE REQUIRED')} This feature requires ${c.bold(requiredTier.toUpperCase())} tier\n`);
|
|
588
588
|
console.log(` ${c.dim('Current tier:')} ${c.info(state.tier || 'free')}`);
|
|
589
|
-
console.log(` ${c.dim('Upgrade at')} ${c.info('https://
|
|
589
|
+
console.log(` ${c.dim('Upgrade at')} ${c.info('https://vibecheckai.dev/pricing')}\n`);
|
|
590
590
|
(0, exit_codes_1.exitWith)(exit_codes_1.ExitCode.AUTH_FAILURE);
|
|
591
591
|
}
|
|
592
592
|
return state;
|
|
@@ -596,8 +596,8 @@ function requireAuth(tier) {
|
|
|
596
596
|
const config = loadConfig();
|
|
597
597
|
if (!config.apiKey) {
|
|
598
598
|
console.error(`\n${c.critical('ERROR')} Authentication required\n`);
|
|
599
|
-
console.log(` ${c.dim('Run')} ${c.bold('
|
|
600
|
-
console.log(` ${c.dim('Get your API key from')} ${c.info('https://
|
|
599
|
+
console.log(` ${c.dim('Run')} ${c.bold('vibecheck auth --key YOUR_API_KEY')} ${c.dim('to authenticate')}`);
|
|
600
|
+
console.log(` ${c.dim('Get your API key from')} ${c.info('https://vibecheckai.dev/api-key')}\n`);
|
|
601
601
|
(0, exit_codes_1.exitWith)(exit_codes_1.ExitCode.AUTH_FAILURE);
|
|
602
602
|
}
|
|
603
603
|
if (tier) {
|
|
@@ -607,21 +607,21 @@ function requireAuth(tier) {
|
|
|
607
607
|
if (currentLevel < requiredLevel) {
|
|
608
608
|
console.error(`\n${c.critical('UPGRADE REQUIRED')} This feature requires ${c.bold(tier.toUpperCase())} tier\n`);
|
|
609
609
|
console.log(` ${c.dim('Current tier:')} ${c.info(config.tier || 'free')}`);
|
|
610
|
-
console.log(` ${c.dim('Upgrade at')} ${c.info('https://
|
|
610
|
+
console.log(` ${c.dim('Upgrade at')} ${c.info('https://vibecheckai.dev/pricing')}\n`);
|
|
611
611
|
(0, exit_codes_1.exitWith)(exit_codes_1.ExitCode.AUTH_FAILURE);
|
|
612
612
|
}
|
|
613
613
|
}
|
|
614
614
|
return config;
|
|
615
615
|
}
|
|
616
616
|
program
|
|
617
|
-
.name('
|
|
618
|
-
.description('
|
|
617
|
+
.name('vibecheck')
|
|
618
|
+
.description('vibecheck AI - Security scanning for your codebase')
|
|
619
619
|
.version(CLI_VERSION);
|
|
620
620
|
// Login command
|
|
621
621
|
program
|
|
622
622
|
.command('login')
|
|
623
|
-
.description('Login with your
|
|
624
|
-
.option('-k, --key <apiKey>', 'Your API key from
|
|
623
|
+
.description('Login with your vibecheck API key')
|
|
624
|
+
.option('-k, --key <apiKey>', 'Your API key from vibecheckai.dev')
|
|
625
625
|
.action(async (options) => {
|
|
626
626
|
printLogo();
|
|
627
627
|
// Use existing auth logic
|
|
@@ -667,8 +667,8 @@ program
|
|
|
667
667
|
// Auth command (keep for backward compatibility)
|
|
668
668
|
program
|
|
669
669
|
.command('auth')
|
|
670
|
-
.description('Authenticate with your
|
|
671
|
-
.option('-k, --key <apiKey>', 'Your API key from
|
|
670
|
+
.description('Authenticate with your vibecheck API key')
|
|
671
|
+
.option('-k, --key <apiKey>', 'Your API key from vibecheckai.dev')
|
|
672
672
|
.option('--logout', 'Remove stored credentials')
|
|
673
673
|
.option('--status', 'Check authentication status')
|
|
674
674
|
.option('--refresh', 'Force revalidation of cached entitlements')
|
|
@@ -735,7 +735,7 @@ program
|
|
|
735
735
|
const hours = (0, auth_utils_1.hoursUntilExpiry)(state.expiresAt);
|
|
736
736
|
console.log('');
|
|
737
737
|
console.log(` ${styles.brightYellow}${icons.warning}${styles.reset} ${styles.bold}Entitlements expiring in ${hours}h${styles.reset}`);
|
|
738
|
-
console.log(` ${styles.dim}Run${styles.reset} ${styles.brightCyan}
|
|
738
|
+
console.log(` ${styles.dim}Run${styles.reset} ${styles.brightCyan}vibecheck auth --refresh${styles.reset} ${styles.dim}to revalidate${styles.reset}`);
|
|
739
739
|
}
|
|
740
740
|
}
|
|
741
741
|
else {
|
|
@@ -743,10 +743,10 @@ program
|
|
|
743
743
|
`${styles.brightRed}${styles.bold}${icons.error} NOT AUTHENTICATED${styles.reset}`,
|
|
744
744
|
'',
|
|
745
745
|
`${styles.dim}To authenticate, run:${styles.reset}`,
|
|
746
|
-
`${styles.brightCyan}
|
|
746
|
+
`${styles.brightCyan}vibecheck auth --key YOUR_API_KEY${styles.reset}`,
|
|
747
747
|
'',
|
|
748
748
|
`${styles.dim}Get your API key from:${styles.reset}`,
|
|
749
|
-
`${styles.brightBlue}https://
|
|
749
|
+
`${styles.brightBlue}https://vibecheckai.dev/api-key${styles.reset}`,
|
|
750
750
|
];
|
|
751
751
|
const framed = frameLines(statusLines, { padding: 2 });
|
|
752
752
|
console.log(framed.join('\n'));
|
|
@@ -763,7 +763,7 @@ program
|
|
|
763
763
|
`${styles.brightRed}${styles.bold}${icons.error} NO CREDENTIALS FOUND${styles.reset}`,
|
|
764
764
|
'',
|
|
765
765
|
`${styles.dim}Authenticate first with:${styles.reset}`,
|
|
766
|
-
`${styles.brightCyan}
|
|
766
|
+
`${styles.brightCyan}vibecheck auth --key YOUR_API_KEY${styles.reset}`,
|
|
767
767
|
];
|
|
768
768
|
console.log(frameLines(errorLines, { padding: 2 }).join('\n'));
|
|
769
769
|
console.log('');
|
|
@@ -820,10 +820,10 @@ program
|
|
|
820
820
|
`${styles.brightCyan}${styles.bold}${icons.auth} AUTHENTICATION${styles.reset}`,
|
|
821
821
|
'',
|
|
822
822
|
`${styles.dim}To authenticate, run:${styles.reset}`,
|
|
823
|
-
`${styles.bold}
|
|
823
|
+
`${styles.bold}vibecheck auth --key YOUR_API_KEY${styles.reset}`,
|
|
824
824
|
'',
|
|
825
825
|
`${styles.dim}Get your API key from:${styles.reset}`,
|
|
826
|
-
`${styles.brightBlue}https://
|
|
826
|
+
`${styles.brightBlue}https://vibecheckai.dev/api-key${styles.reset}`,
|
|
827
827
|
'',
|
|
828
828
|
`${styles.dim}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${styles.reset}`,
|
|
829
829
|
'',
|
|
@@ -859,7 +859,7 @@ program
|
|
|
859
859
|
}
|
|
860
860
|
// Real API validation
|
|
861
861
|
console.log('');
|
|
862
|
-
const s = spinner('Validating API key with
|
|
862
|
+
const s = spinner('Validating API key with vibecheck API...');
|
|
863
863
|
const result = await (0, client_1.validateApiKey)({ apiKey: options.key });
|
|
864
864
|
if (!result.ok) {
|
|
865
865
|
s.stop(false, 'Validation failed');
|
|
@@ -875,7 +875,7 @@ program
|
|
|
875
875
|
` ${styles.dim}${icons.bullet}${styles.reset} Network connectivity issues`,
|
|
876
876
|
'',
|
|
877
877
|
`${styles.dim}Get a new API key from:${styles.reset}`,
|
|
878
|
-
`${styles.brightBlue}https://
|
|
878
|
+
`${styles.brightBlue}https://vibecheckai.dev/api-key${styles.reset}`,
|
|
879
879
|
];
|
|
880
880
|
console.log(frameLines(errorLines, { padding: 2 }).join('\n'));
|
|
881
881
|
console.log('');
|
|
@@ -1200,7 +1200,7 @@ program
|
|
|
1200
1200
|
});
|
|
1201
1201
|
try {
|
|
1202
1202
|
// Import the code smell predictor from core package
|
|
1203
|
-
const { codeSmellPredictor } = require('./bundles/
|
|
1203
|
+
const { codeSmellPredictor } = require('./bundles/vibecheck-core');
|
|
1204
1204
|
const report = await codeSmellPredictor.predict(projectPath);
|
|
1205
1205
|
// Filter by severity
|
|
1206
1206
|
let filteredSmells = report.smells;
|
|
@@ -1459,7 +1459,7 @@ program
|
|
|
1459
1459
|
failedFixes: applyResult.failedFixes,
|
|
1460
1460
|
errors: applyResult.errors,
|
|
1461
1461
|
verification: verifyResult,
|
|
1462
|
-
rollbackCommand: `
|
|
1462
|
+
rollbackCommand: `vibecheck fix rollback --run ${runId}`,
|
|
1463
1463
|
}, null, 2));
|
|
1464
1464
|
}
|
|
1465
1465
|
else {
|
|
@@ -1489,7 +1489,7 @@ program
|
|
|
1489
1489
|
console.log('');
|
|
1490
1490
|
}
|
|
1491
1491
|
console.log(` ${styles.dim}Backup ID:${styles.reset} ${styles.bold}${runId}${styles.reset}`);
|
|
1492
|
-
console.log(` ${styles.dim}To rollback:${styles.reset} ${styles.bold}
|
|
1492
|
+
console.log(` ${styles.dim}To rollback:${styles.reset} ${styles.bold}vibecheck fix rollback --run ${runId}${styles.reset}`);
|
|
1493
1493
|
console.log('');
|
|
1494
1494
|
}
|
|
1495
1495
|
}
|
|
@@ -1555,7 +1555,7 @@ program
|
|
|
1555
1555
|
console.log(` ${styles.dim}Size:${styles.reset} ${sizeKB} KB`);
|
|
1556
1556
|
console.log('');
|
|
1557
1557
|
}
|
|
1558
|
-
console.log(` ${styles.dim}To rollback:${styles.reset} ${styles.bold}
|
|
1558
|
+
console.log(` ${styles.dim}To rollback:${styles.reset} ${styles.bold}vibecheck fix rollback --run <runId>${styles.reset}`);
|
|
1559
1559
|
console.log('');
|
|
1560
1560
|
}
|
|
1561
1561
|
}
|
|
@@ -1587,8 +1587,8 @@ program
|
|
|
1587
1587
|
else {
|
|
1588
1588
|
console.log('');
|
|
1589
1589
|
console.log(` ${styles.brightRed}${icons.error}${styles.reset} ${styles.bold}Run ID required${styles.reset}`);
|
|
1590
|
-
console.log(` ${styles.dim}Use:${styles.reset} ${styles.bold}
|
|
1591
|
-
console.log(` ${styles.dim}List backups:${styles.reset} ${styles.bold}
|
|
1590
|
+
console.log(` ${styles.dim}Use:${styles.reset} ${styles.bold}vibecheck fix rollback --run <runId>${styles.reset}`);
|
|
1591
|
+
console.log(` ${styles.dim}List backups:${styles.reset} ${styles.bold}vibecheck fix rollback --list${styles.reset}`);
|
|
1592
1592
|
console.log('');
|
|
1593
1593
|
}
|
|
1594
1594
|
(0, exit_codes_1.exitWith)(exit_codes_1.ExitCode.USER_ERROR, 'Run ID required');
|
|
@@ -1692,8 +1692,8 @@ program
|
|
|
1692
1692
|
});
|
|
1693
1693
|
try {
|
|
1694
1694
|
// Import ship functionality
|
|
1695
|
-
const { shipBadgeGenerator } = require('./bundles/
|
|
1696
|
-
const { importGraphScanner } = require('./bundles/
|
|
1695
|
+
const { shipBadgeGenerator } = require('./bundles/vibecheck-ship');
|
|
1696
|
+
const { importGraphScanner } = require('./bundles/vibecheck-ship');
|
|
1697
1697
|
// Run ship check
|
|
1698
1698
|
const shipResult = await shipBadgeGenerator.generateShipBadge({
|
|
1699
1699
|
projectPath,
|
|
@@ -1829,7 +1829,7 @@ program
|
|
|
1829
1829
|
});
|
|
1830
1830
|
try {
|
|
1831
1831
|
// Import pro ship scanner
|
|
1832
|
-
const { ProShipScanner } = require('./bundles/
|
|
1832
|
+
const { ProShipScanner } = require('./bundles/vibecheck-ship');
|
|
1833
1833
|
const proShipScanner = new ProShipScanner();
|
|
1834
1834
|
const scanConfig = {
|
|
1835
1835
|
projectPath,
|
|
@@ -1964,7 +1964,7 @@ program
|
|
|
1964
1964
|
console.log('');
|
|
1965
1965
|
try {
|
|
1966
1966
|
// Import reality functionality
|
|
1967
|
-
const { realityScanner } = require('./bundles/
|
|
1967
|
+
const { realityScanner } = require('./bundles/vibecheck-ship');
|
|
1968
1968
|
const { checkPlaywrightDependencies, runPlaywrightTests, runPlaywrightCodegen, createArtifactDirectory, copyTestToArtifacts, formatDuration } = require('./reality/reality-runner');
|
|
1969
1969
|
const { runStaticScan, formatStaticScanResults, generateButtonSweepTest, } = require('./reality/no-dead-buttons');
|
|
1970
1970
|
const { spawn } = require('child_process');
|
|
@@ -2044,7 +2044,7 @@ program
|
|
|
2044
2044
|
console.log(` ${styles.dim}Artifacts:${styles.reset} ${truncatePath(artifacts.artifactDir)}`);
|
|
2045
2045
|
console.log('');
|
|
2046
2046
|
console.log(` ${styles.bold}To run the recorded test:${styles.reset}`);
|
|
2047
|
-
console.log(` ${styles.brightCyan}
|
|
2047
|
+
console.log(` ${styles.brightCyan}vibecheck reality --run --flow ${options.flow}${styles.reset}`);
|
|
2048
2048
|
console.log('');
|
|
2049
2049
|
process.exit(0);
|
|
2050
2050
|
}
|
|
@@ -2096,7 +2096,7 @@ program
|
|
|
2096
2096
|
requireDataActionId: false,
|
|
2097
2097
|
};
|
|
2098
2098
|
const buttonSweepTest = generateButtonSweepTest(buttonSweepConfig);
|
|
2099
|
-
const buttonSweepOutputDir = (0, path_2.join)(process.cwd(), '.
|
|
2099
|
+
const buttonSweepOutputDir = (0, path_2.join)(process.cwd(), '.vibecheck', 'reality-tests');
|
|
2100
2100
|
if (!(0, fs_1.existsSync)(buttonSweepOutputDir)) {
|
|
2101
2101
|
(0, fs_1.mkdirSync)(buttonSweepOutputDir, { recursive: true });
|
|
2102
2102
|
}
|
|
@@ -2151,7 +2151,7 @@ program
|
|
|
2151
2151
|
}
|
|
2152
2152
|
}
|
|
2153
2153
|
// Generate Playwright test for reality mode
|
|
2154
|
-
const outputDir = (0, path_2.join)(process.cwd(), '.
|
|
2154
|
+
const outputDir = (0, path_2.join)(process.cwd(), '.vibecheck', 'reality-tests');
|
|
2155
2155
|
if (!(0, fs_1.existsSync)(outputDir)) {
|
|
2156
2156
|
(0, fs_1.mkdirSync)(outputDir, { recursive: true });
|
|
2157
2157
|
}
|
|
@@ -2339,7 +2339,7 @@ program
|
|
|
2339
2339
|
console.log(` ${styles.bold}HOW TO RUN${styles.reset}`);
|
|
2340
2340
|
printDivider();
|
|
2341
2341
|
console.log(` ${styles.dim}Option 1: Use --run flag (recommended):${styles.reset}`);
|
|
2342
|
-
console.log(` ${styles.brightCyan}
|
|
2342
|
+
console.log(` ${styles.brightCyan}vibecheck reality --run -f ${options.flow}${styles.reset}`);
|
|
2343
2343
|
console.log('');
|
|
2344
2344
|
console.log(` ${styles.dim}Option 2: Run manually:${styles.reset}`);
|
|
2345
2345
|
console.log(` ${styles.brightCyan}cd ${outputDir}${styles.reset}`);
|
|
@@ -2348,7 +2348,7 @@ program
|
|
|
2348
2348
|
console.log(` ${styles.bold}WHERE ARTIFACTS ARE SAVED${styles.reset}`);
|
|
2349
2349
|
printDivider();
|
|
2350
2350
|
console.log(` ${styles.dim}When using --run, artifacts are stored under:${styles.reset}`);
|
|
2351
|
-
console.log(` ${styles.brightCyan}.
|
|
2351
|
+
console.log(` ${styles.brightCyan}.vibecheck/reality/<runId>/${styles.reset}`);
|
|
2352
2352
|
console.log('');
|
|
2353
2353
|
console.log(` ${styles.dim}Contents:${styles.reset}`);
|
|
2354
2354
|
console.log(` ${styles.bullet} ${styles.bold}reality-*.test.ts${styles.reset} - Generated test file`);
|
|
@@ -2425,7 +2425,7 @@ program
|
|
|
2425
2425
|
let graphBuilder;
|
|
2426
2426
|
if (options.receipt) {
|
|
2427
2427
|
// Load graph from receipt
|
|
2428
|
-
const receiptPath = join(projectPath, '.
|
|
2428
|
+
const receiptPath = join(projectPath, '.vibecheck', 'receipts', options.receipt, 'reality-graph.json');
|
|
2429
2429
|
if (!existsSync(receiptPath)) {
|
|
2430
2430
|
console.log(` ${styles.brightRed}${icons.error}${styles.reset} Receipt graph not found`);
|
|
2431
2431
|
process.exit(1);
|
|
@@ -2486,7 +2486,7 @@ program
|
|
|
2486
2486
|
}
|
|
2487
2487
|
// Export graph
|
|
2488
2488
|
if (options.export) {
|
|
2489
|
-
const outputPath = join(projectPath, '.
|
|
2489
|
+
const outputPath = join(projectPath, '.vibecheck', 'reality-graph.json');
|
|
2490
2490
|
writeFileSync(outputPath, graphBuilder.export());
|
|
2491
2491
|
console.log(` ${styles.brightGreen}✓${styles.reset} Graph exported to ${outputPath}`);
|
|
2492
2492
|
console.log('');
|
|
@@ -2522,7 +2522,7 @@ program
|
|
|
2522
2522
|
console.log(` ${styles.brightRed}${icons.error}${styles.reset} Missing required options: --file, --line, --patch`);
|
|
2523
2523
|
console.log('');
|
|
2524
2524
|
console.log(` ${styles.bold}Usage:${styles.reset}`);
|
|
2525
|
-
console.log(`
|
|
2525
|
+
console.log(` vibecheck autopatch:verify --file src/app.ts --line 42 --patch "const apiUrl = process.env.API_URL;"`);
|
|
2526
2526
|
console.log('');
|
|
2527
2527
|
process.exit(1);
|
|
2528
2528
|
}
|
|
@@ -2572,7 +2572,7 @@ program
|
|
|
2572
2572
|
}
|
|
2573
2573
|
else {
|
|
2574
2574
|
console.log(` ${styles.bold}To merge this fix:${styles.reset}`);
|
|
2575
|
-
console.log(` ${styles.brightCyan}
|
|
2575
|
+
console.log(` ${styles.brightCyan}vibecheck autopatch:merge --fix-id ${fix.id}${styles.reset}`);
|
|
2576
2576
|
console.log('');
|
|
2577
2577
|
}
|
|
2578
2578
|
}
|
|
@@ -2637,7 +2637,7 @@ program
|
|
|
2637
2637
|
program
|
|
2638
2638
|
.command('receipt:verify')
|
|
2639
2639
|
.description('Verify Proof-of-Execution Receipt')
|
|
2640
|
-
.option('-p, --path <path>', 'Receipt path or directory', '.
|
|
2640
|
+
.option('-p, --path <path>', 'Receipt path or directory', '.vibecheck/receipts')
|
|
2641
2641
|
.option('--org-public-key <key>', 'Organization public key for verification (PEM format)')
|
|
2642
2642
|
.action(async (options) => {
|
|
2643
2643
|
printLogo();
|
|
@@ -2739,7 +2739,7 @@ program
|
|
|
2739
2739
|
'Autopilot requires Pro tier or higher.',
|
|
2740
2740
|
'',
|
|
2741
2741
|
`${styles.dim}Current tier:${styles.reset} ${config.tier || 'free'}`,
|
|
2742
|
-
`${styles.dim}Upgrade at:${styles.reset} ${styles.brightBlue}https://
|
|
2742
|
+
`${styles.dim}Upgrade at:${styles.reset} ${styles.brightBlue}https://vibecheckai.dev/pricing${styles.reset}`,
|
|
2743
2743
|
];
|
|
2744
2744
|
console.log(frameLines(errorLines, { padding: 2 }).join('\n'));
|
|
2745
2745
|
console.log('');
|
|
@@ -2755,7 +2755,7 @@ program
|
|
|
2755
2755
|
'',
|
|
2756
2756
|
'Rollback mode requires --run <runId>',
|
|
2757
2757
|
'',
|
|
2758
|
-
`${styles.dim}Example:${styles.reset}
|
|
2758
|
+
`${styles.dim}Example:${styles.reset} vibecheck autopilot rollback --run abc123def456`,
|
|
2759
2759
|
];
|
|
2760
2760
|
console.log(frameLines(errorLines, { padding: 2 }).join('\n'));
|
|
2761
2761
|
console.log('');
|
|
@@ -2777,7 +2777,7 @@ program
|
|
|
2777
2777
|
const s = spinner(`Running autopilot ${autopilotMode}...`);
|
|
2778
2778
|
try {
|
|
2779
2779
|
// Dynamic import to avoid bundling issues
|
|
2780
|
-
const { runAutopilot } = await Promise.resolve().then(() => __importStar(require('./bundles/
|
|
2780
|
+
const { runAutopilot } = await Promise.resolve().then(() => __importStar(require('./bundles/vibecheck-core')));
|
|
2781
2781
|
const projectName = (0, path_1.basename)(projectPath);
|
|
2782
2782
|
const result = await runAutopilot({
|
|
2783
2783
|
projectPath,
|
|
@@ -2822,7 +2822,7 @@ program
|
|
|
2822
2822
|
console.log(` ${styles.dim}Files:${styles.reset} ${pack.impactedFiles.slice(0, 3).join(', ')}${pack.impactedFiles.length > 3 ? '...' : ''}`);
|
|
2823
2823
|
console.log('');
|
|
2824
2824
|
}
|
|
2825
|
-
console.log(` ${styles.dim}Run${styles.reset} ${styles.bold}
|
|
2825
|
+
console.log(` ${styles.dim}Run${styles.reset} ${styles.bold}vibecheck autopilot apply${styles.reset} ${styles.dim}to apply these fixes${styles.reset}`);
|
|
2826
2826
|
console.log('');
|
|
2827
2827
|
}
|
|
2828
2828
|
else if (result.mode === 'rollback') {
|
|
@@ -2872,7 +2872,7 @@ program
|
|
|
2872
2872
|
console.log(` ${styles.dim}Total duration:${styles.reset} ${result.duration}ms`);
|
|
2873
2873
|
if (result.runId) {
|
|
2874
2874
|
console.log('');
|
|
2875
|
-
console.log(` ${styles.dim}To rollback:${styles.reset} ${styles.bold}
|
|
2875
|
+
console.log(` ${styles.dim}To rollback:${styles.reset} ${styles.bold}vibecheck autopilot rollback --run ${result.runId}${styles.reset}`);
|
|
2876
2876
|
}
|
|
2877
2877
|
console.log('');
|
|
2878
2878
|
}
|
|
@@ -2888,7 +2888,7 @@ program
|
|
|
2888
2888
|
// Init command
|
|
2889
2889
|
program
|
|
2890
2890
|
.command('init')
|
|
2891
|
-
.description('Initialize
|
|
2891
|
+
.description('Initialize vibecheck in a project with framework detection and templates')
|
|
2892
2892
|
.option('-p, --path <path>', 'Project path', '.')
|
|
2893
2893
|
.option('-t, --template <template>', 'Template: startup, enterprise, or oss')
|
|
2894
2894
|
.option('--ci', 'Set up CI/CD integration', false)
|
|
@@ -2901,7 +2901,7 @@ program
|
|
|
2901
2901
|
const projectPath = (0, path_1.resolve)(options.path);
|
|
2902
2902
|
const projectName = (0, path_1.basename)(projectPath);
|
|
2903
2903
|
const headerLines = [
|
|
2904
|
-
`${styles.brightCyan}${styles.bold}${icons.ship} INITIALIZING
|
|
2904
|
+
`${styles.brightCyan}${styles.bold}${icons.ship} INITIALIZING vibecheck${styles.reset}`,
|
|
2905
2905
|
'',
|
|
2906
2906
|
`${styles.dim}Project:${styles.reset} ${styles.bold}${projectName}${styles.reset}`,
|
|
2907
2907
|
`${styles.dim}Path:${styles.reset} ${truncatePath(projectPath)}`,
|
|
@@ -2977,7 +2977,7 @@ function countFiles(dir) {
|
|
|
2977
2977
|
}
|
|
2978
2978
|
async function generateFindings(projectPath) {
|
|
2979
2979
|
const findings = [];
|
|
2980
|
-
const guardian = new
|
|
2980
|
+
const guardian = new vibecheck_security_1.SecretsGuardian();
|
|
2981
2981
|
// File extensions to scan for secrets
|
|
2982
2982
|
const scanExtensions = ['.ts', '.js', '.tsx', '.jsx', '.json', '.env', '.yaml', '.yml', '.toml', '.py', '.rb'];
|
|
2983
2983
|
// Recursively get files to scan
|
|
@@ -3074,7 +3074,7 @@ async function generateFindings(projectPath) {
|
|
|
3074
3074
|
}
|
|
3075
3075
|
async function scanSecrets(projectPath, options) {
|
|
3076
3076
|
const s = spinner('Scanning for hardcoded secrets...');
|
|
3077
|
-
const guardian = new
|
|
3077
|
+
const guardian = new vibecheck_security_1.SecretsGuardian();
|
|
3078
3078
|
// Use enterprise-grade scanProject instead of custom file walking
|
|
3079
3079
|
// Handles: ignores, binary files, size caps, concurrency, dedupe
|
|
3080
3080
|
const report = await guardian.scanProject(projectPath, 'cli-scan', {
|
|
@@ -3250,7 +3250,7 @@ async function scanCompliance(projectPath, options) {
|
|
|
3250
3250
|
}
|
|
3251
3251
|
async function generateSBOM(projectPath, options) {
|
|
3252
3252
|
const s = spinner('Generating Software Bill of Materials...');
|
|
3253
|
-
const sbomGenerator = new
|
|
3253
|
+
const sbomGenerator = new vibecheck_security_1.SBOMGenerator();
|
|
3254
3254
|
try {
|
|
3255
3255
|
const sbom = await sbomGenerator.generate(projectPath, {
|
|
3256
3256
|
format: options.format || 'cyclonedx',
|
|
@@ -3313,7 +3313,7 @@ async function generateSBOM(projectPath, options) {
|
|
|
3313
3313
|
licenseSummary: [],
|
|
3314
3314
|
metadata: {
|
|
3315
3315
|
timestamp: new Date().toISOString(),
|
|
3316
|
-
tools: [{ vendor: '
|
|
3316
|
+
tools: [{ vendor: 'vibecheck', name: 'CLI', version: '1.0.0' }],
|
|
3317
3317
|
},
|
|
3318
3318
|
};
|
|
3319
3319
|
}
|
|
@@ -3326,7 +3326,7 @@ async function generateSBOM(projectPath, options) {
|
|
|
3326
3326
|
}
|
|
3327
3327
|
async function generateContainerSBOM(imageName, options) {
|
|
3328
3328
|
const s = spinner('Generating container SBOM...');
|
|
3329
|
-
const sbomGenerator = new
|
|
3329
|
+
const sbomGenerator = new vibecheck_security_1.SBOMGenerator();
|
|
3330
3330
|
try {
|
|
3331
3331
|
const sbom = await sbomGenerator.generateContainerSBOM(imageName, {
|
|
3332
3332
|
format: options.format || 'cyclonedx',
|
|
@@ -3614,7 +3614,7 @@ function outputResultsEnterprise(results, options) {
|
|
|
3614
3614
|
}
|
|
3615
3615
|
}
|
|
3616
3616
|
async function initProject(projectPath, options) {
|
|
3617
|
-
const configDir = (0, path_2.join)(projectPath, '.
|
|
3617
|
+
const configDir = (0, path_2.join)(projectPath, '.vibecheck');
|
|
3618
3618
|
const isTTY = process.stdin.isTTY && process.stdout.isTTY && options.interactive !== false;
|
|
3619
3619
|
// Step 1: Framework Detection
|
|
3620
3620
|
const s1 = spinner('Detecting project framework...');
|
|
@@ -3751,29 +3751,29 @@ async function initProject(projectPath, options) {
|
|
|
3751
3751
|
const recommendedCmds = frameworkResult.recommendedScans.map(scan => {
|
|
3752
3752
|
switch (scan) {
|
|
3753
3753
|
case 'secrets':
|
|
3754
|
-
return ` ${styles.cyan}${icons.bullet}${styles.reset} ${styles.bold}
|
|
3754
|
+
return ` ${styles.cyan}${icons.bullet}${styles.reset} ${styles.bold}vibecheck scan:secrets${styles.reset} - Detect hardcoded credentials`;
|
|
3755
3755
|
case 'vuln':
|
|
3756
|
-
return ` ${styles.cyan}${icons.bullet}${styles.reset} ${styles.bold}
|
|
3756
|
+
return ` ${styles.cyan}${icons.bullet}${styles.reset} ${styles.bold}vibecheck scan:vulnerabilities${styles.reset} - Check for CVEs`;
|
|
3757
3757
|
case 'ship':
|
|
3758
|
-
return ` ${styles.cyan}${icons.bullet}${styles.reset} ${styles.bold}
|
|
3758
|
+
return ` ${styles.cyan}${icons.bullet}${styles.reset} ${styles.bold}vibecheck ship${styles.reset} - Pre-deployment readiness check`;
|
|
3759
3759
|
case 'reality':
|
|
3760
|
-
return ` ${styles.cyan}${icons.bullet}${styles.reset} ${styles.bold}
|
|
3760
|
+
return ` ${styles.cyan}${icons.bullet}${styles.reset} ${styles.bold}vibecheck reality${styles.reset} - Browser testing for auth flows`;
|
|
3761
3761
|
case 'compliance':
|
|
3762
|
-
return ` ${styles.cyan}${icons.bullet}${styles.reset} ${styles.bold}
|
|
3762
|
+
return ` ${styles.cyan}${icons.bullet}${styles.reset} ${styles.bold}vibecheck scan:compliance${styles.reset} - SOC2/GDPR compliance checks`;
|
|
3763
3763
|
default:
|
|
3764
|
-
return ` ${styles.cyan}${icons.bullet}${styles.reset} ${styles.bold}
|
|
3764
|
+
return ` ${styles.cyan}${icons.bullet}${styles.reset} ${styles.bold}vibecheck ${scan}${styles.reset}`;
|
|
3765
3765
|
}
|
|
3766
3766
|
});
|
|
3767
3767
|
successLines.push(...recommendedCmds);
|
|
3768
3768
|
successLines.push('');
|
|
3769
|
-
successLines.push(`${styles.dim}Documentation:${styles.reset} ${styles.brightBlue}https://
|
|
3769
|
+
successLines.push(`${styles.dim}Documentation:${styles.reset} ${styles.brightBlue}https://vibecheckai.dev/docs${styles.reset}`);
|
|
3770
3770
|
const framedSuccess = frameLines(successLines, { padding: 2 });
|
|
3771
3771
|
console.log(framedSuccess.join('\n'));
|
|
3772
3772
|
console.log('');
|
|
3773
3773
|
// Show CI workflow path if created
|
|
3774
3774
|
if (options.ci && ciResult.workflowPath) {
|
|
3775
3775
|
console.log(` ${styles.dim}CI Workflow:${styles.reset} ${truncatePath(ciResult.workflowPath)}`);
|
|
3776
|
-
console.log(` ${styles.dim}Add${styles.reset} ${styles.brightCyan}
|
|
3776
|
+
console.log(` ${styles.dim}Add${styles.reset} ${styles.brightCyan}VIBECHECK_API_KEY${styles.reset} ${styles.dim}to your repository secrets${styles.reset}`);
|
|
3777
3777
|
console.log('');
|
|
3778
3778
|
}
|
|
3779
3779
|
// Show hooks info if installed
|
|
@@ -3957,7 +3957,7 @@ function outputComplianceResults(results, options) {
|
|
|
3957
3957
|
console.log('');
|
|
3958
3958
|
}
|
|
3959
3959
|
}
|
|
3960
|
-
console.log(` ${styles.dim}Run${styles.reset} ${styles.bold}
|
|
3960
|
+
console.log(` ${styles.dim}Run${styles.reset} ${styles.bold}vibecheck scan:compliance --framework gdpr${styles.reset} ${styles.dim}for other frameworks.${styles.reset}\n`);
|
|
3961
3961
|
}
|
|
3962
3962
|
/**
|
|
3963
3963
|
* Install Playwright dependencies automatically
|
|
@@ -4070,7 +4070,7 @@ async function runInteractiveMenu() {
|
|
|
4070
4070
|
continue;
|
|
4071
4071
|
}
|
|
4072
4072
|
// login
|
|
4073
|
-
const key = await promptPassword('Enter
|
|
4073
|
+
const key = await promptPassword('Enter vibecheck API key');
|
|
4074
4074
|
if (!key.startsWith('gr_') || key.length < 20) {
|
|
4075
4075
|
console.log(`\n${c.high('✗')} Invalid API key format`);
|
|
4076
4076
|
console.log(` ${c.dim('API keys should start with')} ${c.info('gr_')}\n`);
|
|
@@ -4097,7 +4097,7 @@ async function runInteractiveMenu() {
|
|
|
4097
4097
|
const projectPath = cfg.lastProjectPath || '.';
|
|
4098
4098
|
const { TruthPackGenerator } = await Promise.resolve().then(() => __importStar(require('./truth-pack')));
|
|
4099
4099
|
const generator = new TruthPackGenerator(projectPath);
|
|
4100
|
-
console.log(`\n${c.bold('🔧 INITIALIZING
|
|
4100
|
+
console.log(`\n${c.bold('🔧 INITIALIZING vibecheck')}\n`);
|
|
4101
4101
|
try {
|
|
4102
4102
|
const truthPack = await generator.generate();
|
|
4103
4103
|
console.log(` ${c.success('✓')} Truth Pack generated successfully!`);
|
|
@@ -4115,7 +4115,7 @@ async function runInteractiveMenu() {
|
|
|
4115
4115
|
const generator = new TruthPackGenerator(projectPath);
|
|
4116
4116
|
if (!generator.isFresh(168)) {
|
|
4117
4117
|
console.log(`\n${c.high('✗')} Truth Pack is stale or missing`);
|
|
4118
|
-
console.log(` ${c.dim('Run')} ${c.bold('
|
|
4118
|
+
console.log(` ${c.dim('Run')} ${c.bold('vibecheck init')} ${c.dim('first')}\n`);
|
|
4119
4119
|
continue;
|
|
4120
4120
|
}
|
|
4121
4121
|
console.log(`\n${c.bold('🚀 STARTING CONTEXT MODE')}\n`);
|
|
@@ -4127,7 +4127,7 @@ async function runInteractiveMenu() {
|
|
|
4127
4127
|
}
|
|
4128
4128
|
if (action === 'stats') {
|
|
4129
4129
|
const projectPath = cfg.lastProjectPath || '.';
|
|
4130
|
-
const statsFile = (0, path_2.join)(projectPath, '.
|
|
4130
|
+
const statsFile = (0, path_2.join)(projectPath, '.vibecheck', 'stats.json');
|
|
4131
4131
|
let stats;
|
|
4132
4132
|
if ((0, fs_1.existsSync)(statsFile)) {
|
|
4133
4133
|
try {
|
|
@@ -4140,12 +4140,12 @@ async function runInteractiveMenu() {
|
|
|
4140
4140
|
else {
|
|
4141
4141
|
stats = { hallucinationsBlocked: { last24h: 0, last7d: 0, total: 0 } };
|
|
4142
4142
|
}
|
|
4143
|
-
console.log(`\n${c.bold('📊
|
|
4143
|
+
console.log(`\n${c.bold('📊 vibecheck STATS')}\n`);
|
|
4144
4144
|
console.log(` ${c.bold('Hallucinations Blocked:')}`);
|
|
4145
4145
|
console.log(` Last 24h: ${c.bold(stats.hallucinationsBlocked?.last24h || 0)}`);
|
|
4146
4146
|
console.log(` Last 7d: ${c.bold(stats.hallucinationsBlocked?.last7d || 0)}`);
|
|
4147
4147
|
console.log(` Total: ${c.bold(stats.hallucinationsBlocked?.total || 0)}\n`);
|
|
4148
|
-
console.log(` ${c.bold('Next best action:')} ${c.info('
|
|
4148
|
+
console.log(` ${c.bold('Next best action:')} ${c.info('vibecheck ship')} to run ship check\n`);
|
|
4149
4149
|
continue;
|
|
4150
4150
|
}
|
|
4151
4151
|
if (action === 'checkpoint') {
|
|
@@ -4164,14 +4164,14 @@ async function runInteractiveMenu() {
|
|
|
4164
4164
|
console.log(` ${c.cyan('•')} Premium HTML reports`);
|
|
4165
4165
|
console.log(` ${c.cyan('•')} Proof artifacts\n`);
|
|
4166
4166
|
console.log(` ${c.bold('Price:')} $29/month\n`);
|
|
4167
|
-
console.log(` ${c.info('Upgrade now:')} ${c.bold('https://
|
|
4167
|
+
console.log(` ${c.info('Upgrade now:')} ${c.bold('https://vibecheckai.dev/upgrade')}\n`);
|
|
4168
4168
|
continue;
|
|
4169
4169
|
}
|
|
4170
4170
|
if (action === 'doctor') {
|
|
4171
4171
|
const projectPath = cfg.lastProjectPath || '.';
|
|
4172
4172
|
const { TruthPackGenerator } = await Promise.resolve().then(() => __importStar(require('./truth-pack')));
|
|
4173
4173
|
const generator = new TruthPackGenerator(projectPath);
|
|
4174
|
-
console.log(`\n${c.bold('🔧
|
|
4174
|
+
console.log(`\n${c.bold('🔧 vibecheck DOCTOR')}\n`);
|
|
4175
4175
|
const issues = [];
|
|
4176
4176
|
if (!generator.isFresh()) {
|
|
4177
4177
|
issues.push('Truth Pack is missing or stale');
|
|
@@ -4184,7 +4184,7 @@ async function runInteractiveMenu() {
|
|
|
4184
4184
|
issues.forEach(issue => {
|
|
4185
4185
|
console.log(` ${c.dim('•')} ${issue}`);
|
|
4186
4186
|
});
|
|
4187
|
-
console.log(`\n ${c.bold('Fix:')} Run ${c.info('
|
|
4187
|
+
console.log(`\n ${c.bold('Fix:')} Run ${c.info('vibecheck init')} to regenerate Truth Pack\n`);
|
|
4188
4188
|
}
|
|
4189
4189
|
continue;
|
|
4190
4190
|
}
|
|
@@ -4201,7 +4201,7 @@ async function runInteractiveMenu() {
|
|
|
4201
4201
|
]);
|
|
4202
4202
|
const writeOut = await promptConfirm('Write report file?', true);
|
|
4203
4203
|
const output = writeOut ? defaultReportPath(projectPath, 'secrets', 'json') : undefined;
|
|
4204
|
-
console.log(`\n${c.dim('Command:')} ${c.bold(`
|
|
4204
|
+
console.log(`\n${c.dim('Command:')} ${c.bold(`vibecheck scan:secrets -p "${projectPath}" -f ${format}${output ? ` -o "${output}"` : ''}`)}\n`);
|
|
4205
4205
|
printLogo();
|
|
4206
4206
|
console.log(`\n${c.bold('🔐 SECRET DETECTION SCAN')}\n`);
|
|
4207
4207
|
const results = await scanSecrets(projectPath, { format, output });
|
|
@@ -4220,7 +4220,7 @@ async function runInteractiveMenu() {
|
|
|
4220
4220
|
]);
|
|
4221
4221
|
const writeOut = await promptConfirm('Write report file?', true);
|
|
4222
4222
|
const output = writeOut ? defaultReportPath(projectPath, 'vulns', 'json') : undefined;
|
|
4223
|
-
console.log(`\n${c.dim('Command:')} ${c.bold(`
|
|
4223
|
+
console.log(`\n${c.dim('Command:')} ${c.bold(`vibecheck scan:vulnerabilities -p "${projectPath}" -f ${format}${output ? ` -o "${output}"` : ''}`)}\n`);
|
|
4224
4224
|
printLogo();
|
|
4225
4225
|
console.log(`\n${c.bold('🛡️ VULNERABILITY SCAN')}\n`);
|
|
4226
4226
|
const results = await scanVulnerabilities(projectPath, { format, output });
|
|
@@ -4246,7 +4246,7 @@ async function runInteractiveMenu() {
|
|
|
4246
4246
|
{ name: 'json', value: 'json' },
|
|
4247
4247
|
]);
|
|
4248
4248
|
saveConfig({ ...loadConfig(), lastFramework: framework, lastFormat: format });
|
|
4249
|
-
console.log(`\n${c.dim('Command:')} ${c.bold(`
|
|
4249
|
+
console.log(`\n${c.dim('Command:')} ${c.bold(`vibecheck scan:compliance -p "${projectPath}" --framework ${framework} -f ${format}`)}\n`);
|
|
4250
4250
|
printLogo();
|
|
4251
4251
|
console.log(`\n${c.bold('📋 COMPLIANCE SCAN')}\n`);
|
|
4252
4252
|
const results = await scanCompliance(projectPath, { framework, format });
|
|
@@ -4262,7 +4262,7 @@ async function runInteractiveMenu() {
|
|
|
4262
4262
|
]);
|
|
4263
4263
|
const includeDev = await promptConfirm('Include dev dependencies?', false);
|
|
4264
4264
|
const output = defaultReportPath(projectPath, 'sbom', 'json');
|
|
4265
|
-
console.log(`\n${c.dim('Command:')} ${c.bold(`
|
|
4265
|
+
console.log(`\n${c.dim('Command:')} ${c.bold(`vibecheck sbom:generate -p "${projectPath}" -f ${format} -o "${output}"${includeDev ? ' --include-dev' : ''}`)}\n`);
|
|
4266
4266
|
printLogo();
|
|
4267
4267
|
console.log(`\n${c.bold('📦 SBOM GENERATION')}\n`);
|
|
4268
4268
|
const sbom = await generateSBOM(projectPath, { format, includeDev, output });
|
|
@@ -4283,7 +4283,7 @@ async function runInteractiveMenu() {
|
|
|
4283
4283
|
{ name: 'Generate and run', value: 'run' },
|
|
4284
4284
|
{ name: 'Record user actions', value: 'record' },
|
|
4285
4285
|
]);
|
|
4286
|
-
console.log(`\n${c.dim('Command:')} ${c.bold(`
|
|
4286
|
+
console.log(`\n${c.dim('Command:')} ${c.bold(`vibecheck reality --url "${url}" --flow ${flow}${mode === 'run' ? ' --run' : mode === 'record' ? ' --record' : ''}`)}\n`);
|
|
4287
4287
|
printLogo();
|
|
4288
4288
|
console.log(`\n${c.bold('🌐 REALITY MODE')}\n`);
|
|
4289
4289
|
// Check dependencies and install if needed
|
|
@@ -4319,7 +4319,7 @@ async function runInteractiveMenu() {
|
|
|
4319
4319
|
args.push('--run');
|
|
4320
4320
|
if (mode === 'record')
|
|
4321
4321
|
args.push('--record');
|
|
4322
|
-
const realityProc = spawn('
|
|
4322
|
+
const realityProc = spawn('vibecheck', args, {
|
|
4323
4323
|
stdio: 'inherit',
|
|
4324
4324
|
shell: process.platform === 'win32',
|
|
4325
4325
|
cwd: projectPath
|
|
@@ -4339,14 +4339,14 @@ async function runInteractiveMenu() {
|
|
|
4339
4339
|
const baseline = await promptConfirm('Use baseline file?', false);
|
|
4340
4340
|
const output = await promptConfirm('Generate ship report?', true);
|
|
4341
4341
|
const outputPath = output ? defaultReportPath(projectPath, 'ship', 'json') : undefined;
|
|
4342
|
-
console.log(`\n${c.dim('Command:')} ${c.bold(`
|
|
4342
|
+
console.log(`\n${c.dim('Command:')} ${c.bold(`vibecheck ship -p "${projectPath}"${baseline ? ' --baseline .vibecheck/baseline.json' : ''}${outputPath ? ` --output "${outputPath}"` : ''}`)}\n`);
|
|
4343
4343
|
printLogo();
|
|
4344
4344
|
console.log(`\n${c.bold('🚀 SHIP CHECK')}\n`);
|
|
4345
4345
|
// Import ship functionality
|
|
4346
|
-
const { runShipCheck } = require('./bundles/
|
|
4346
|
+
const { runShipCheck } = require('./bundles/vibecheck-ship');
|
|
4347
4347
|
try {
|
|
4348
4348
|
const shipResult = await runShipCheck(projectPath, {
|
|
4349
|
-
baseline: baseline ? '.
|
|
4349
|
+
baseline: baseline ? '.vibecheck/baseline.json' : undefined,
|
|
4350
4350
|
output: outputPath
|
|
4351
4351
|
});
|
|
4352
4352
|
if (shipResult.verdict === 'ship') {
|
|
@@ -4373,7 +4373,7 @@ async function runInteractiveMenu() {
|
|
|
4373
4373
|
]);
|
|
4374
4374
|
const setupCI = await promptConfirm('Setup CI/CD integration?', false);
|
|
4375
4375
|
const setupHooks = await promptConfirm('Install git hooks?', false);
|
|
4376
|
-
console.log(`\n${c.dim('Command:')} ${c.bold(`
|
|
4376
|
+
console.log(`\n${c.dim('Command:')} ${c.bold(`vibecheck init -p "${projectPath}" --template ${template}${setupCI ? ' --ci' : ''}${setupHooks ? ' --hooks' : ''}`)}\n`);
|
|
4377
4377
|
printLogo();
|
|
4378
4378
|
console.log(`\n${c.bold('🔧 INITIALIZING PROJECT')}\n`);
|
|
4379
4379
|
try {
|