codeprobe-scanner 1.0.21 → 1.0.22

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeprobe-scanner",
3
- "version": "1.0.21",
3
+ "version": "1.0.22",
4
4
  "description": "Automated vulnerability scanner with exploit verification and video evidence",
5
5
  "type": "module",
6
6
  "bin": {
@@ -166,7 +166,7 @@ async function undoLastChanges(): Promise<void> {
166
166
  console.log(chalk.green("\n✓ Undo complete! Review changes with: git status"));
167
167
  } catch (error) {
168
168
  console.error(chalk.red(`✗ Undo failed: ${error instanceof Error ? error.message : String(error)}`));
169
- process.exit(EXIT_CODES.FAILURE);
169
+ process.exitCode = EXIT_CODES.FAILURE;
170
170
  }
171
171
  }
172
172
 
@@ -251,9 +251,12 @@ export async function scanCommand(args: string[]): Promise<void> {
251
251
  await scanWithFixCommand([repoPath], report, logger);
252
252
  }
253
253
 
254
- // Exit with appropriate code
254
+ // Set exit code based on vulnerabilities found
255
255
  const hasVulnerabilities = report.scan.cves.length > 0;
256
- process.exit(hasVulnerabilities ? EXIT_CODES.VULNERABILITIES_FOUND : EXIT_CODES.SUCCESS);
256
+ const exitCode = hasVulnerabilities ? EXIT_CODES.VULNERABILITIES_FOUND : EXIT_CODES.SUCCESS;
257
+
258
+ // Exit gracefully with appropriate code
259
+ process.exitCode = exitCode;
257
260
  } catch (error) {
258
261
  handleError(error, logger, true);
259
262
  }