arnav-audit 1.0.1 → 1.0.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.
Files changed (2) hide show
  1. package/bin/cli.js +59 -5
  2. package/package.json +1 -1
package/bin/cli.js CHANGED
@@ -57,6 +57,8 @@ const options = {
57
57
  prompts: false,
58
58
  securityOnly: false,
59
59
  leakageOnly: false,
60
+ verbose: false,
61
+ files: false,
60
62
  help: false,
61
63
  version: false,
62
64
  };
@@ -65,6 +67,8 @@ for (let i = 0; i < args.length; i++) {
65
67
  const arg = args[i];
66
68
  if (arg === '--help' || arg === '-h') options.help = true;
67
69
  else if (arg === '--version' || arg === '-v') options.version = true;
70
+ else if (arg === '--verbose') options.verbose = true;
71
+ else if (arg === '--files' || arg === '--list') options.files = true;
68
72
  else if (arg === '--json') options.json = true;
69
73
  else if (arg === '--prompts' || arg === '--fix') options.prompts = true;
70
74
  else if (arg === '--security' || arg === '--security-only') options.securityOnly = true;
@@ -73,7 +77,7 @@ for (let i = 0; i < args.length; i++) {
73
77
  }
74
78
 
75
79
  if (options.version) {
76
- console.log('arnav-audit v1.0.1');
80
+ console.log('arnav-audit v1.0.2');
77
81
  process.exit(0);
78
82
  }
79
83
 
@@ -88,6 +92,8 @@ ${C.bold}TARGETS:${C.reset}
88
92
  [https://url] Live website URL to run headless CDP telemetry & 200 checks
89
93
 
90
94
  ${C.bold}OPTIONS:${C.reset}
95
+ --files, --list List every single scanned file path with inspection status
96
+ --verbose Display detailed scan logs and file-by-file verification
91
97
  --prompts, --fix Generate copy-paste AI fix prompts for Cursor & Claude Code
92
98
  --security-only Scan exclusively for exposed credentials, secrets & XSS vectors
93
99
  --leakage-only Scan exclusively for memory, event listeners & viewport leaks
@@ -97,6 +103,7 @@ ${C.bold}OPTIONS:${C.reset}
97
103
 
98
104
  ${C.bold}EXAMPLES:${C.reset}
99
105
  $ npx arnav-audit .
106
+ $ npx arnav-audit . --files
100
107
  $ npx arnav-audit https://mejor-iota.vercel.app
101
108
  $ npx arnav-audit . --prompts
102
109
  $ npx arnav-audit . --json > audit-report.json
@@ -398,10 +405,20 @@ function runLocalAudit(targetDir) {
398
405
 
399
406
  const files = walkDir(root);
400
407
  const issues = [];
408
+ const scannedFiles = [];
409
+ const extCounts = {};
410
+ const dirCounts = {};
401
411
 
402
412
  for (const filePath of files) {
403
413
  const relPath = path.relative(root, filePath);
404
414
  const ext = path.extname(filePath).toLowerCase();
415
+ scannedFiles.push(relPath);
416
+
417
+ const extKey = ext || '[config]';
418
+ extCounts[extKey] = (extCounts[extKey] || 0) + 1;
419
+
420
+ const topFolder = relPath.split(path.sep)[0] || '.';
421
+ dirCounts[topFolder] = (dirCounts[topFolder] || 0) + 1;
405
422
 
406
423
  let content = '';
407
424
  try {
@@ -485,7 +502,7 @@ function runLocalAudit(targetDir) {
485
502
  }
486
503
  }
487
504
 
488
- return { root, totalFiles: files.length, issues };
505
+ return { root, totalFiles: files.length, scannedFiles, extCounts, dirCounts, issues };
489
506
  }
490
507
 
491
508
  // -------------------------------------------------------------
@@ -587,6 +604,7 @@ async function main() {
587
604
  console.log(JSON.stringify({
588
605
  target: audit.root,
589
606
  totalFiles: audit.totalFiles,
607
+ scannedFiles: audit.scannedFiles,
590
608
  score,
591
609
  grade,
592
610
  counts: {
@@ -601,18 +619,54 @@ async function main() {
601
619
  return;
602
620
  }
603
621
 
622
+ // Print all scanned files if --files or --verbose requested
623
+ if (options.files || options.verbose) {
624
+ console.log(`${C.bold}VERIFIED CODEBASE FILES (${audit.totalFiles} files inspected):${C.reset}`);
625
+ audit.scannedFiles.forEach((file, idx) => {
626
+ const fileIssues = audit.issues.filter(i => i.file === file);
627
+ const numStr = String(idx + 1).padStart(3, ' ');
628
+ if (fileIssues.length === 0) {
629
+ console.log(` ${C.gray}[${numStr}/${audit.totalFiles}]${C.reset} ${C.emerald}✓${C.reset} ${file}`);
630
+ } else {
631
+ console.log(` ${C.gray}[${numStr}/${audit.totalFiles}]${C.reset} ${C.rose}✗${C.reset} ${file} ${C.rose}(${fileIssues.length} issues)${C.reset}`);
632
+ }
633
+ });
634
+ console.log('');
635
+ }
636
+
604
637
  // Formatted Terminal Dashboard
605
638
  console.log(`${C.dim}————————————————————————————————————————————————————————————————————${C.reset}`);
606
- console.log(` ${C.bold}AUDIT REPORT OVERVIEW${C.reset} • Scanned ${C.bold}${audit.totalFiles}${C.reset} files`);
639
+ console.log(` ${C.bold}AUDIT REPORT OVERVIEW${C.reset} • Scanned ${C.bold}${audit.totalFiles}${C.reset} files across entire codebase`);
607
640
  console.log(`${C.dim}————————————————————————————————————————————————————————————————————${C.reset}`);
608
641
 
609
642
  const gradeColor = grade.startsWith('A') ? C.emerald : grade === 'B' ? C.cyan : grade === 'C' ? C.amber : C.rose;
610
643
  console.log(` Overall Score: ${gradeColor}${C.bold}${score}/100${C.reset} (Grade ${gradeColor}${C.bold}${grade}${C.reset})`);
611
644
  console.log(` Findings: ${C.rose}${critical.length} Critical${C.reset} | ${C.amber}${major.length} Major${C.reset} | ${C.cyan}${minor.length} Minor${C.reset} | ${C.gray}${suggestions.length} Suggestions${C.reset}\n`);
612
645
 
646
+ console.log(` ${C.bold}Full Codebase Coverage Breakdown:${C.reset}`);
647
+ const sortedExts = Object.entries(audit.extCounts).sort((a, b) => b[1] - a[1]);
648
+ sortedExts.forEach(([ext, count]) => {
649
+ let name = 'Source / Script';
650
+ if (ext === '.py') name = 'Python (FastAPI, Worker, Checks, Tests)';
651
+ else if (ext === '.ts') name = 'TypeScript (Backend, Core, API routes)';
652
+ else if (ext === '.tsx') name = 'React / Next.js Components';
653
+ else if (ext === '.js') name = 'JavaScript Modules & Configs';
654
+ else if (ext === '.json') name = 'JSON Manifests & Data schemas';
655
+ else if (ext === '.yml' || ext === '.yaml') name = 'GitHub CI & Docker Compose';
656
+ else if (ext === '.css' || ext === '.scss') name = 'Vanilla & Tailwind Styles';
657
+ else if (ext === '.html') name = 'HTML Templates & Fixtures';
658
+ else if (ext === '.md') name = 'Documentation & Blueprints';
659
+ else if (ext === '[config]') name = 'Dockerfiles, .env, .gitignore';
660
+ console.log(` • ${C.cyan}${name.padEnd(42, ' ')}${C.reset} ${C.bold}${count}${C.reset} files (${ext})`);
661
+ });
662
+ console.log('');
663
+
613
664
  if (audit.issues.length === 0) {
614
- console.log(` ${C.emerald}✓ Zero internal security, leakage, or interface defects detected!${C.reset}\n`);
615
- console.log(` Your codebase meets enterprise production standards.`);
665
+ console.log(` ${C.emerald}✓ Zero internal security, leakage, or interface defects detected!${C.reset}`);
666
+ console.log(` Every file in the codebase was verified. Meets enterprise standards.\n`);
667
+ if (!options.files) {
668
+ console.log(` ${C.dim}Tip: Run with ${C.white}--files${C.dim} to display each individual file path in the terminal.${C.reset}`);
669
+ }
616
670
  console.log(`${C.dim}————————————————————————————————————————————————————————————————————${C.reset}\n`);
617
671
  return;
618
672
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arnav-audit",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Comprehensive internal security, memory leakage, and invisible UI/UX interface auditor by Arnav.",
5
5
  "bin": {
6
6
  "arnav-audit": "bin/cli.js"