coverme-scanner 1.0.21 → 1.0.23

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.
@@ -11,6 +11,8 @@ $ARGUMENTS
11
11
  3. **DO NOT ASK ABOUT FILE CHANGES** - Automatically update/overwrite scan.json
12
12
  4. **DO NOT ASK TO OPEN REPORT** - Just open it automatically at the end
13
13
  5. **COMPLETE EVERYTHING IN ONE GO** - All 5 phases without interruption
14
+ 6. **RUN AGENTS IN BACKGROUND** - Use `run_in_background: true` for all Task tool calls
15
+ 7. **RUN BASH IN BACKGROUND** - Use `run_in_background: true` for long Bash commands
14
16
 
15
17
  Execute ALL phases automatically. Do NOT stop until the HTML report is open.
16
18
 
@@ -18,7 +20,9 @@ Execute ALL phases automatically. Do NOT stop until the HTML report is open.
18
20
 
19
21
  ## Phase 1: Discovery (10 parallel agents)
20
22
 
21
- Launch ALL 10 agents IN PARALLEL using the Task tool with subagent_type="Explore":
23
+ Launch ALL 10 agents IN PARALLEL using the Task tool with `run_in_background: true`:
24
+
25
+ **IMPORTANT**: Set `run_in_background: true` on ALL Task tool calls to run agents in parallel without blocking.
22
26
 
23
27
  ### Agent 1: Security Scanner (Core)
24
28
  ```
@@ -425,7 +429,9 @@ Output JSON: [{id: "TEST-XXX", title, severity, category: "testing", file, line,
425
429
 
426
430
  ## Phase 2: Cross-Validation (3 parallel validators)
427
431
 
428
- After ALL Phase 1 agents complete, launch 3 validators IN PARALLEL:
432
+ Wait for all Phase 1 background agents to complete using `AgentOutputTool`.
433
+
434
+ Then launch 3 validators IN PARALLEL with `run_in_background: true`:
429
435
 
430
436
  ### Validator A: False Positive Hunter
431
437
  ```
@@ -469,6 +475,8 @@ Output: { missedIssues: [{id, title, severity, file, line, description, recommen
469
475
 
470
476
  ## Phase 3: Build Consensus
471
477
 
478
+ Wait for all Phase 2 background validators to complete using `AgentOutputTool`.
479
+
472
480
  Combine all results:
473
481
  1. Calculate confidence: (confirmations / validators) * 100
474
482
  2. Remove findings with confidence < 50%
@@ -1 +1 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/cli/init.ts"],"names":[],"mappings":"AAIA,UAAU,WAAW;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAyfD,wBAAsB,IAAI,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CA0E9D"}
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/cli/init.ts"],"names":[],"mappings":"AAIA,UAAU,WAAW;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAihBD,wBAAsB,IAAI,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CA+H9D"}
package/dist/cli/init.js CHANGED
@@ -43,13 +43,25 @@ The most comprehensive AI-powered code scanner. 10 specialized agents + 3 valida
43
43
 
44
44
  $ARGUMENTS
45
45
 
46
- ## IMPORTANT: Execute ALL phases automatically. Do NOT stop until the HTML report is open.
46
+ ## CRITICAL INSTRUCTIONS - READ FIRST!
47
+
48
+ 1. **DO NOT ASK ANY QUESTIONS** - Run the entire scan autonomously from start to finish
49
+ 2. **DO NOT STOP FOR CONFIRMATION** - Just keep going through all phases
50
+ 3. **DO NOT ASK ABOUT FILE CHANGES** - Automatically update/overwrite scan.json
51
+ 4. **DO NOT ASK TO OPEN REPORT** - Just open it automatically at the end
52
+ 5. **COMPLETE EVERYTHING IN ONE GO** - All 5 phases without interruption
53
+ 6. **RUN AGENTS IN BACKGROUND** - Use \`run_in_background: true\` for all Task tool calls
54
+ 7. **RUN BASH IN BACKGROUND** - Use \`run_in_background: true\` for long Bash commands
55
+
56
+ Execute ALL phases automatically. Do NOT stop until the HTML report is open.
47
57
 
48
58
  ---
49
59
 
50
60
  ## Phase 1: Discovery (10 parallel agents)
51
61
 
52
- Launch ALL 10 agents IN PARALLEL using the Task tool with subagent_type="Explore":
62
+ Launch ALL 10 agents IN PARALLEL using the Task tool with \`run_in_background: true\`:
63
+
64
+ **IMPORTANT**: Set \`run_in_background: true\` on ALL Task tool calls to run agents in parallel without blocking.
53
65
 
54
66
  ### Agent 1: Security Scanner (Core)
55
67
  \`\`\`
@@ -456,7 +468,9 @@ Output JSON: [{id: "TEST-XXX", title, severity, category: "testing", file, line,
456
468
 
457
469
  ## Phase 2: Cross-Validation (3 parallel validators)
458
470
 
459
- After ALL Phase 1 agents complete, launch 3 validators IN PARALLEL:
471
+ Wait for all Phase 1 background agents to complete using \`AgentOutputTool\`.
472
+
473
+ Then launch 3 validators IN PARALLEL with \`run_in_background: true\`:
460
474
 
461
475
  ### Validator A: False Positive Hunter
462
476
  \`\`\`
@@ -500,6 +514,8 @@ Output: { missedIssues: [{id, title, severity, file, line, description, recommen
500
514
 
501
515
  ## Phase 3: Build Consensus
502
516
 
517
+ Wait for all Phase 2 background validators to complete using \`AgentOutputTool\`.
518
+
503
519
  Combine all results:
504
520
  1. Calculate confidence: (confirmations / validators) * 100
505
521
  2. Remove findings with confidence < 50%
@@ -510,7 +526,9 @@ Combine all results:
510
526
 
511
527
  ## Phase 4: Generate Report
512
528
 
513
- Update the existing \`.coverme/scan.json\` file with the scan results. The file already exists with the correct structure - just fill in the values:
529
+ **DO NOT ASK - JUST OVERWRITE THE FILE!**
530
+
531
+ Update \`.coverme/scan.json\` with the scan results. Overwrite any existing content without asking:
514
532
 
515
533
  - **projectName**: from package.json or folder name
516
534
  - **scanDate**: today's date
@@ -519,25 +537,31 @@ Update the existing \`.coverme/scan.json\` file with the scan results. The file
519
537
  - **scanDuration**: time taken in ms
520
538
  - **agentCount**: 7
521
539
 
522
- Use the Edit tool to update \`.coverme/scan.json\` with the results.
540
+ Use the Write tool to overwrite \`.coverme/scan.json\` with the results. Do not ask for confirmation.
523
541
 
524
542
  ---
525
543
 
526
544
  ## Phase 5: Generate HTML Report
527
545
 
528
- Generate the HTML report and open it:
546
+ **DO NOT ASK - JUST RUN THE COMMANDS!**
547
+
548
+ Generate the HTML report and open it automatically:
529
549
  \`\`\`bash
530
550
  TIMESTAMP=$(date +%Y-%m-%d_%H-%M-%S)
531
- npx --yes coverme-scanner@latest report .coverme/scan.json -f html -o ".coverme/report_$TIMESTAMP.html"
551
+ npx coverme-scanner report .coverme/scan.json -f html -o ".coverme/report_$TIMESTAMP.html"
532
552
  cp .coverme/scan.json ".coverme/scan_$TIMESTAMP.json"
533
553
  open ".coverme/report_$TIMESTAMP.html"
534
554
  \`\`\`
535
555
 
556
+ Run these commands without asking for permission.
557
+
536
558
  ---
537
559
 
538
560
  ## DONE
539
561
 
540
- Tell the user: "Scan complete! Report saved to .coverme/ and opened in browser. Found X issues across Y categories. All scan history is in .coverme/ folder."
562
+ Tell the user: "Scan complete! Report saved to .coverme/ and opened in browser."
563
+
564
+ **REMINDER: You should have completed all 5 phases without asking ANY questions or stopping for confirmation.**
541
565
  `;
542
566
  async function init(options) {
543
567
  const targetDir = options.global
@@ -587,6 +611,55 @@ async function init(options) {
587
611
  fs.writeFileSync(gitignorePath, covermeIgnore.trim() + '\n');
588
612
  console.log(`Created .gitignore with .coverme/`);
589
613
  }
614
+ // Create .claude/settings.local.json with permissions for coverme
615
+ const settingsDir = path.join(process.cwd(), '.claude');
616
+ if (!fs.existsSync(settingsDir)) {
617
+ fs.mkdirSync(settingsDir, { recursive: true });
618
+ }
619
+ const settingsPath = path.join(settingsDir, 'settings.local.json');
620
+ const covermePermissions = {
621
+ permissions: {
622
+ allow: [
623
+ "Bash(mkdir:*)",
624
+ "Bash(ls:*)",
625
+ "Bash(cat:*)",
626
+ "Bash(cp:*)",
627
+ "Bash(date:*)",
628
+ "Bash(npx coverme*:*)",
629
+ "Bash(npx coverme-scanner*:*)",
630
+ "Bash(open:*)",
631
+ "Bash(git ls-files:*)",
632
+ "Bash(git log:*)",
633
+ "Bash(grep:*)",
634
+ "Read(.coverme/*)",
635
+ "Write(.coverme/*)",
636
+ "Edit(.coverme/*)"
637
+ ]
638
+ }
639
+ };
640
+ // Merge with existing settings if present
641
+ let existingSettings = {};
642
+ if (fs.existsSync(settingsPath)) {
643
+ try {
644
+ existingSettings = JSON.parse(fs.readFileSync(settingsPath, 'utf-8'));
645
+ }
646
+ catch (e) {
647
+ // Ignore parse errors, will overwrite
648
+ }
649
+ }
650
+ // Merge permissions
651
+ const mergedSettings = {
652
+ ...existingSettings,
653
+ permissions: {
654
+ ...existingSettings.permissions,
655
+ allow: [
656
+ ...(existingSettings.permissions?.allow || []),
657
+ ...covermePermissions.permissions.allow
658
+ ].filter((v, i, a) => a.indexOf(v) === i) // dedupe
659
+ }
660
+ };
661
+ fs.writeFileSync(settingsPath, JSON.stringify(mergedSettings, null, 2));
662
+ console.log(`Created/updated: ${settingsPath} with coverme permissions`);
590
663
  console.log(`
591
664
  ================================================================================
592
665
  COVERME INSTALLED
@@ -1 +1 @@
1
- {"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/cli/init.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+fA,oBA0EC;AAzkBD,uCAAyB;AACzB,2CAA6B;AAC7B,uCAAyB;AAMzB,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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  "description": "AI-powered code scanner with multi-agent verification for Claude Code. One command scans everything.",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
package/src/cli/init.ts CHANGED
@@ -12,13 +12,25 @@ The most comprehensive AI-powered code scanner. 10 specialized agents + 3 valida
12
12
 
13
13
  $ARGUMENTS
14
14
 
15
- ## IMPORTANT: Execute ALL phases automatically. Do NOT stop until the HTML report is open.
15
+ ## CRITICAL INSTRUCTIONS - READ FIRST!
16
+
17
+ 1. **DO NOT ASK ANY QUESTIONS** - Run the entire scan autonomously from start to finish
18
+ 2. **DO NOT STOP FOR CONFIRMATION** - Just keep going through all phases
19
+ 3. **DO NOT ASK ABOUT FILE CHANGES** - Automatically update/overwrite scan.json
20
+ 4. **DO NOT ASK TO OPEN REPORT** - Just open it automatically at the end
21
+ 5. **COMPLETE EVERYTHING IN ONE GO** - All 5 phases without interruption
22
+ 6. **RUN AGENTS IN BACKGROUND** - Use \`run_in_background: true\` for all Task tool calls
23
+ 7. **RUN BASH IN BACKGROUND** - Use \`run_in_background: true\` for long Bash commands
24
+
25
+ Execute ALL phases automatically. Do NOT stop until the HTML report is open.
16
26
 
17
27
  ---
18
28
 
19
29
  ## Phase 1: Discovery (10 parallel agents)
20
30
 
21
- Launch ALL 10 agents IN PARALLEL using the Task tool with subagent_type="Explore":
31
+ Launch ALL 10 agents IN PARALLEL using the Task tool with \`run_in_background: true\`:
32
+
33
+ **IMPORTANT**: Set \`run_in_background: true\` on ALL Task tool calls to run agents in parallel without blocking.
22
34
 
23
35
  ### Agent 1: Security Scanner (Core)
24
36
  \`\`\`
@@ -425,7 +437,9 @@ Output JSON: [{id: "TEST-XXX", title, severity, category: "testing", file, line,
425
437
 
426
438
  ## Phase 2: Cross-Validation (3 parallel validators)
427
439
 
428
- After ALL Phase 1 agents complete, launch 3 validators IN PARALLEL:
440
+ Wait for all Phase 1 background agents to complete using \`AgentOutputTool\`.
441
+
442
+ Then launch 3 validators IN PARALLEL with \`run_in_background: true\`:
429
443
 
430
444
  ### Validator A: False Positive Hunter
431
445
  \`\`\`
@@ -469,6 +483,8 @@ Output: { missedIssues: [{id, title, severity, file, line, description, recommen
469
483
 
470
484
  ## Phase 3: Build Consensus
471
485
 
486
+ Wait for all Phase 2 background validators to complete using \`AgentOutputTool\`.
487
+
472
488
  Combine all results:
473
489
  1. Calculate confidence: (confirmations / validators) * 100
474
490
  2. Remove findings with confidence < 50%
@@ -479,7 +495,9 @@ Combine all results:
479
495
 
480
496
  ## Phase 4: Generate Report
481
497
 
482
- Update the existing \`.coverme/scan.json\` file with the scan results. The file already exists with the correct structure - just fill in the values:
498
+ **DO NOT ASK - JUST OVERWRITE THE FILE!**
499
+
500
+ Update \`.coverme/scan.json\` with the scan results. Overwrite any existing content without asking:
483
501
 
484
502
  - **projectName**: from package.json or folder name
485
503
  - **scanDate**: today's date
@@ -488,25 +506,31 @@ Update the existing \`.coverme/scan.json\` file with the scan results. The file
488
506
  - **scanDuration**: time taken in ms
489
507
  - **agentCount**: 7
490
508
 
491
- Use the Edit tool to update \`.coverme/scan.json\` with the results.
509
+ Use the Write tool to overwrite \`.coverme/scan.json\` with the results. Do not ask for confirmation.
492
510
 
493
511
  ---
494
512
 
495
513
  ## Phase 5: Generate HTML Report
496
514
 
497
- Generate the HTML report and open it:
515
+ **DO NOT ASK - JUST RUN THE COMMANDS!**
516
+
517
+ Generate the HTML report and open it automatically:
498
518
  \`\`\`bash
499
519
  TIMESTAMP=$(date +%Y-%m-%d_%H-%M-%S)
500
- npx --yes coverme-scanner@latest report .coverme/scan.json -f html -o ".coverme/report_$TIMESTAMP.html"
520
+ npx coverme-scanner report .coverme/scan.json -f html -o ".coverme/report_$TIMESTAMP.html"
501
521
  cp .coverme/scan.json ".coverme/scan_$TIMESTAMP.json"
502
522
  open ".coverme/report_$TIMESTAMP.html"
503
523
  \`\`\`
504
524
 
525
+ Run these commands without asking for permission.
526
+
505
527
  ---
506
528
 
507
529
  ## DONE
508
530
 
509
- Tell the user: "Scan complete! Report saved to .coverme/ and opened in browser. Found X issues across Y categories. All scan history is in .coverme/ folder."
531
+ Tell the user: "Scan complete! Report saved to .coverme/ and opened in browser."
532
+
533
+ **REMINDER: You should have completed all 5 phases without asking ANY questions or stopping for confirmation.**
510
534
  `;
511
535
 
512
536
  export async function init(options: InitOptions): Promise<void> {
@@ -564,6 +588,59 @@ export async function init(options: InitOptions): Promise<void> {
564
588
  console.log(`Created .gitignore with .coverme/`);
565
589
  }
566
590
 
591
+ // Create .claude/settings.local.json with permissions for coverme
592
+ const settingsDir = path.join(process.cwd(), '.claude');
593
+ if (!fs.existsSync(settingsDir)) {
594
+ fs.mkdirSync(settingsDir, { recursive: true });
595
+ }
596
+
597
+ const settingsPath = path.join(settingsDir, 'settings.local.json');
598
+ const covermePermissions = {
599
+ permissions: {
600
+ allow: [
601
+ "Bash(mkdir:*)",
602
+ "Bash(ls:*)",
603
+ "Bash(cat:*)",
604
+ "Bash(cp:*)",
605
+ "Bash(date:*)",
606
+ "Bash(npx coverme*:*)",
607
+ "Bash(npx coverme-scanner*:*)",
608
+ "Bash(open:*)",
609
+ "Bash(git ls-files:*)",
610
+ "Bash(git log:*)",
611
+ "Bash(grep:*)",
612
+ "Read(.coverme/*)",
613
+ "Write(.coverme/*)",
614
+ "Edit(.coverme/*)"
615
+ ]
616
+ }
617
+ };
618
+
619
+ // Merge with existing settings if present
620
+ let existingSettings: any = {};
621
+ if (fs.existsSync(settingsPath)) {
622
+ try {
623
+ existingSettings = JSON.parse(fs.readFileSync(settingsPath, 'utf-8'));
624
+ } catch (e) {
625
+ // Ignore parse errors, will overwrite
626
+ }
627
+ }
628
+
629
+ // Merge permissions
630
+ const mergedSettings = {
631
+ ...existingSettings,
632
+ permissions: {
633
+ ...existingSettings.permissions,
634
+ allow: [
635
+ ...(existingSettings.permissions?.allow || []),
636
+ ...covermePermissions.permissions.allow
637
+ ].filter((v, i, a) => a.indexOf(v) === i) // dedupe
638
+ }
639
+ };
640
+
641
+ fs.writeFileSync(settingsPath, JSON.stringify(mergedSettings, null, 2));
642
+ console.log(`Created/updated: ${settingsPath} with coverme permissions`);
643
+
567
644
  console.log(`
568
645
  ================================================================================
569
646
  COVERME INSTALLED