coverme-scanner 1.3.0 → 1.3.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 CHANGED
@@ -10,7 +10,7 @@
10
10
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](https://opensource.org/licenses/MIT)
11
11
  [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
12
12
 
13
- <img src="https://raw.githubusercontent.com/vibecode/coverme-scanner/main/assets/demo.gif" alt="CoverMe Demo" width="600">
13
+ <img src="https://unpkg.com/coverme-scanner/assets/coverme-cli.png" alt="CoverMe CLI" width="700">
14
14
 
15
15
  [Quick Start](#quick-start) | [Features](#features) | [Agents](#-21-specialized-agents) | [Reports](#-beautiful-reports) | [Custom Agents](#-custom-agents)
16
16
 
Binary file
package/dist/cli/index.js CHANGED
@@ -32,11 +32,41 @@ program
32
32
  program
33
33
  .command('report')
34
34
  .description('Generate PDF/HTML report from scan JSON')
35
- .argument('<json-file>', 'Path to scan results JSON file')
35
+ .argument('[json-file]', 'Path to scan results JSON file (auto-detects if not provided)')
36
36
  .option('-o, --output <path>', 'Output file path')
37
37
  .option('-f, --format <format>', 'Output format: pdf, html', 'pdf')
38
38
  .action(async (jsonFile, options) => {
39
- await (0, index_js_1.generateReport)(jsonFile, options.output, options.format || 'pdf');
39
+ let targetFile = jsonFile;
40
+ // Auto-detect scan.json if not provided
41
+ if (!targetFile) {
42
+ const covermeDir = (0, path_1.join)(process.cwd(), '.coverme');
43
+ // First try scan.json
44
+ const defaultScan = (0, path_1.join)(covermeDir, 'scan.json');
45
+ if ((0, fs_1.existsSync)(defaultScan)) {
46
+ targetFile = defaultScan;
47
+ console.log(`Auto-detected: ${targetFile}`);
48
+ }
49
+ else {
50
+ // Look for most recent scan_*.json file
51
+ if ((0, fs_1.existsSync)(covermeDir)) {
52
+ const files = require('fs').readdirSync(covermeDir)
53
+ .filter((f) => f.startsWith('scan_') && f.endsWith('.json'))
54
+ .sort()
55
+ .reverse();
56
+ if (files.length > 0) {
57
+ targetFile = (0, path_1.join)(covermeDir, files[0]);
58
+ console.log(`Auto-detected: ${targetFile}`);
59
+ }
60
+ }
61
+ }
62
+ if (!targetFile) {
63
+ console.error('No scan results found.');
64
+ console.error('Run /coverme first, or specify a JSON file:');
65
+ console.error(' coverme report path/to/scan.json');
66
+ process.exit(1);
67
+ }
68
+ }
69
+ await (0, index_js_1.generateReport)(targetFile, options.output, options.format || 'pdf');
40
70
  });
41
71
  // Agent management commands
42
72
  const agentCmd = program
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";;;AAEA,yCAAoC;AACpC,uCAAiC;AACjC,uCAAiC;AACjC,iDAAoD;AACpD,2BAAsF;AACtF,+BAA4B;AAE5B,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,IAAA,iBAAY,EAAC,IAAA,WAAI,EAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC;AAE3F,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,SAAS,CAAC;KACf,WAAW,CAAC,uEAAuE,CAAC;KACpF,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AAExB,OAAO;KACJ,OAAO,CAAC,MAAM,CAAC;KACf,WAAW,CAAC,wDAAwD,CAAC;KACrE,MAAM,CAAC,cAAc,EAAE,yCAAyC,CAAC;KACjE,MAAM,CAAC,cAAI,CAAC,CAAC;AAEhB,OAAO;KACJ,OAAO,CAAC,MAAM,CAAC;KACf,WAAW,CAAC,gDAAgD,CAAC;KAC7D,QAAQ,CAAC,QAAQ,EAAE,cAAc,EAAE,GAAG,CAAC;KACvC,MAAM,CAAC,uBAAuB,EAAE,oCAAoC,EAAE,KAAK,CAA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OAAO,CAAC,KAAK,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,8 +1,13 @@
1
1
  {
2
2
  "name": "coverme-scanner",
3
- "version": "1.3.0",
3
+ "version": "1.3.2",
4
4
  "description": "AI-powered code scanner with multi-agent verification for Claude Code. One command scans everything.",
5
5
  "main": "dist/index.js",
6
+ "files": [
7
+ "dist",
8
+ "assets",
9
+ "README.md"
10
+ ],
6
11
  "bin": {
7
12
  "coverme": "./dist/cli/index.js",
8
13
  "vibecode-tracker": "./dist/cli/index.js"
@@ -1,577 +0,0 @@
1
- # CoverMe - Ultimate AI Security Scanner
2
-
3
- The most comprehensive AI-powered code scanner. 15 specialized agents + 3 validators + deep analysis.
4
-
5
- $ARGUMENTS
6
-
7
- ## CRITICAL INSTRUCTIONS - READ FIRST!
8
-
9
- 1. **DO NOT ASK ANY QUESTIONS** - Run the entire scan autonomously from start to finish
10
- 2. **DO NOT STOP FOR CONFIRMATION** - Just keep going through all phases
11
- 3. **DO NOT ASK ABOUT FILE CHANGES** - Automatically update/overwrite scan.json
12
- 4. **DO NOT ASK TO OPEN REPORT** - Just open it automatically at the end
13
- 5. **COMPLETE EVERYTHING IN ONE GO** - All 6 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
16
-
17
- Execute ALL phases automatically. Do NOT stop until the HTML report is open.
18
-
19
- ---
20
-
21
- ## Phase 0: Project Discovery & Load Custom Agents
22
-
23
- ### Step 1: Understand the Project
24
- Before scanning, understand what you're scanning. Run these commands:
25
- ```bash
26
- # Get project info
27
- cat package.json 2>/dev/null | head -20
28
- cat README.md 2>/dev/null | head -50
29
- ls -la
30
- ```
31
-
32
- Create a mental model of:
33
- - **Project type**: Backend API, Frontend SPA, Full-stack, CLI tool, Library, etc.
34
- - **Tech stack**: Node.js, Python, React, Next.js, etc.
35
- - **Main purpose**: What does this project do? (1-2 sentences)
36
- - **Architecture**: Monolith, microservices, serverless, etc.
37
-
38
- This context will be included in the final report.
39
-
40
- ### Step 2: Load Custom Agents (if exists)
41
- Check if `.coverme/agents.json` exists:
42
- ```bash
43
- cat .coverme/agents.json 2>/dev/null || echo "NO_CUSTOM_AGENTS"
44
- ```
45
-
46
- If the file exists, it will look like this:
47
- ```json
48
- {
49
- "agents": [
50
- { "name": "John", "task": "Check .env files for secrets" },
51
- { "name": "Sarah", "task": "Find regex patterns vulnerable to ReDoS" }
52
- ]
53
- }
54
- ```
55
-
56
- For EACH custom agent, launch it in Phase 1 alongside the built-in agents. The agent should:
57
- 1. Do what the `task` says
58
- 2. Output findings with ID prefix based on the agent name (e.g., JOHN-001, SARAH-001)
59
-
60
- ---
61
-
62
- ## Phase 1: Discovery (10+ parallel agents)
63
-
64
- Launch ALL built-in agents + custom discovery agents IN PARALLEL using the Task tool with `run_in_background: true`:
65
-
66
- **IMPORTANT**: Set `run_in_background: true` on ALL Task tool calls to run agents in parallel without blocking.
67
-
68
- ### Custom Agents (from .coverme/agents.json)
69
- If custom agents were loaded in Phase 0, launch each one as a Task with their specific task.
70
-
71
- Example: If agents.json has `{"name": "John", "task": "Check .env files"}`, launch:
72
- ```
73
- Task: "John: Check .env files for secrets and sensitive configuration. Output findings as JSON with id prefix JOHN-XXX"
74
- ```
75
-
76
- ### Agent 1: Security Scanner (Core)
77
- ```
78
- Scan for OWASP Top 10 and common vulnerabilities:
79
-
80
- INJECTION:
81
- - SQL injection (string concatenation in queries, raw queries)
82
- - NoSQL injection (MongoDB $where, $regex with user input)
83
- - Command injection (exec, spawn, system with user input)
84
- - LDAP injection, XPath injection
85
- - Template injection (SSTI in Jinja2, EJS, Handlebars)
86
- - Header injection (CRLF in headers)
87
- - Log injection (unescaped user input in logs)
88
-
89
- XSS:
90
- - Reflected XSS (user input in response without encoding)
91
- - Stored XSS (database content rendered without escaping)
92
- - DOM XSS (innerHTML, document.write, eval with user data)
93
- - dangerouslySetInnerHTML in React without sanitization
94
-
95
- AUTHENTICATION:
96
- - Hardcoded credentials (check git ls-files first!)
97
- - Weak password policies (no complexity, short length)
98
- - Missing rate limiting on login/register
99
- - Session fixation (session ID not rotated after login)
100
- - JWT issues (none algorithm, weak secret, no expiry)
101
- - Missing MFA on sensitive operations
102
-
103
- AUTHORIZATION:
104
- - IDOR (direct object references without ownership check)
105
- - Missing authorization checks on endpoints
106
- - Privilege escalation paths
107
- - Horizontal access (user A accessing user B's data)
108
- - Vertical access (user accessing admin functions)
109
-
110
- CRYPTOGRAPHY:
111
- - MD5/SHA1 for passwords (use bcrypt/argon2)
112
- - Math.random() for security (use crypto.randomBytes)
113
- - Hardcoded encryption keys/IVs
114
- - ECB mode usage
115
- - Missing HTTPS enforcement
116
-
117
- Output JSON: [{id: "SEC-XXX", title, severity, category: "security", file, line, code, description, recommendation, confidence}]
118
- ```
119
-
120
- ### Agent 2: Auth & Session Scanner
121
- ```
122
- Deep dive into authentication and session management:
123
-
124
- SSO/OAUTH:
125
- - Open redirect in return_url/redirect_uri (CRITICAL!)
126
- - State parameter missing or predictable
127
- - PKCE not implemented for public clients
128
- - Token stored in localStorage (XSS vulnerable)
129
- - Refresh token rotation missing
130
- - ID token validation incomplete
131
-
132
- SESSION:
133
- - Session ID in URL
134
- - Session not invalidated on logout
135
- - Session timeout too long (>24h)
136
- - Same session across devices without tracking
137
- - Session data not encrypted
138
-
139
- COOKIES:
140
- - Missing Secure flag
141
- - Missing HttpOnly flag
142
- - Missing SameSite attribute
143
- - Overly broad domain/path
144
- - Sensitive data in cookies
145
-
146
- PASSWORD RESET:
147
- - Predictable reset tokens
148
- - Token not expiring
149
- - No rate limiting on reset requests
150
- - User enumeration via reset flow
151
- - Reset link not single-use
152
-
153
- Output JSON: [{id: "AUTH-XXX", title, severity, category: "security", file, line, code, description, recommendation, confidence}]
154
- ```
155
-
156
- ### Agent 3: API Security Scanner
157
- ```
158
- Scan API endpoints for security issues:
159
-
160
- INPUT VALIDATION:
161
- - Missing input validation on request body
162
- - Type coercion attacks (string vs number)
163
- - Array/object pollution
164
- - Prototype pollution
165
- - Mass assignment vulnerabilities
166
- - GraphQL introspection enabled in production
167
- - GraphQL depth/complexity limits missing
168
-
169
- RATE LIMITING:
170
- - No rate limiting on expensive operations
171
- - Rate limit bypass via headers (X-Forwarded-For)
172
- - Missing rate limiting on auth endpoints
173
- - No account lockout after failed attempts
174
-
175
- API DESIGN:
176
- - Verbose error messages leaking internals
177
- - Stack traces in production
178
- - Version information exposed
179
- - Debug endpoints accessible
180
- - CORS misconfiguration (wildcard origin with credentials)
181
- - Missing security headers (CSP, HSTS, X-Frame-Options)
182
-
183
- WEBHOOKS:
184
- - Webhook signature not verified
185
- - SSRF via webhook URLs
186
- - No webhook replay protection
187
- - Webhook secrets logged
188
-
189
- Output JSON: [{id: "API-XXX", title, severity, category: "security", file, line, code, description, recommendation, confidence}]
190
- ```
191
-
192
- ### Agent 4: Infrastructure Scanner
193
- ```
194
- Scan infrastructure and deployment configs:
195
-
196
- DOCKER:
197
- - Running as root user
198
- - Secrets in Dockerfile or build args
199
- - Latest tag usage (unpinned versions)
200
- - Sensitive ports exposed
201
- - Missing health checks
202
- - No resource limits
203
- - Privileged mode enabled
204
- - Writable root filesystem
205
-
206
- KUBERNETES/HELM:
207
- - No resource limits/requests
208
- - Running as root
209
- - Privileged containers
210
- - Host network/PID enabled
211
- - Missing network policies
212
- - Secrets not encrypted at rest
213
- - No pod security policies/standards
214
- - Service account auto-mount enabled
215
-
216
- CI/CD:
217
- - Secrets in CI config files
218
- - Credentials in environment variables logged
219
- - Missing secret scanning in pipeline
220
- - Deploy keys with write access
221
- - No branch protection
222
- - Missing SAST/DAST in pipeline
223
-
224
- CLOUD:
225
- - S3 buckets public or misconfigured
226
- - IAM roles too permissive
227
- - Security groups too open
228
- - Logging not enabled
229
- - Encryption at rest disabled
230
-
231
- Output JSON: [{id: "INFRA-XXX", title, severity, category: "infrastructure", file, line, code, description, recommendation, confidence}]
232
- ```
233
-
234
- ### Agent 5: Data & Privacy Scanner
235
- ```
236
- Scan for data protection and privacy issues:
237
-
238
- PII HANDLING:
239
- - PII logged (emails, names, IPs, phone numbers)
240
- - PII in URLs/query strings
241
- - PII in error messages
242
- - PII not encrypted at rest
243
- - PII not masked in UI/logs
244
-
245
- GDPR/PRIVACY:
246
- - Missing data retention policy implementation
247
- - No data deletion mechanism (right to erasure)
248
- - No data export mechanism (data portability)
249
- - Consent not tracked properly
250
- - Third-party data sharing without consent
251
- - Cross-border data transfer issues
252
-
253
- DATABASE:
254
- - Sensitive data not encrypted (column-level)
255
- - No audit logging for sensitive operations
256
- - Backup not encrypted
257
- - Connection strings with credentials in code
258
-
259
- SECRETS:
260
- - API keys in code (check git ls-files!)
261
- - Secrets in environment files committed
262
- - Secrets logged
263
- - Secrets in client-side code
264
- - Hardcoded tokens/passwords
265
- - .env files not in .gitignore
266
-
267
- Output JSON: [{id: "DATA-XXX", title, severity, category: "privacy", file, line, code, description, recommendation, confidence}]
268
- ```
269
-
270
- ### Agent 6: AI/LLM Security Scanner
271
- ```
272
- Scan for AI/LLM specific vulnerabilities:
273
-
274
- PROMPT INJECTION:
275
- - User input directly in prompts without sanitization
276
- - System prompts exposed to users
277
- - Prompt leakage via error messages
278
- - No input length limits on prompts
279
- - Missing output validation from LLM
280
- - Jailbreak vulnerabilities
281
-
282
- DATA LEAKAGE:
283
- - Training data in responses
284
- - PII in AI context
285
- - Conversation history not cleared
286
- - AI accessing unauthorized data
287
- - Model output not sanitized
288
-
289
- SUPPLY CHAIN:
290
- - CDN imports without Subresource Integrity (SRI)
291
- - Unpinned AI model versions
292
- - External AI APIs without TLS verification
293
- - Model files from untrusted sources
294
-
295
- RESOURCE:
296
- - No token limits on AI calls
297
- - Missing rate limiting on AI endpoints
298
- - Cost explosion attacks (large inputs)
299
- - Denial of service via AI
300
-
301
- BUSINESS LOGIC:
302
- - AI bypassing business rules
303
- - AI making unauthorized decisions
304
- - Content filter bypasses
305
- - AI output directly executed (code injection)
306
-
307
- Output JSON: [{id: "AI-XXX", title, severity, category: "ai-security", file, line, code, description, recommendation, confidence}]
308
- ```
309
-
310
- ### Agent 7: Performance & DoS Scanner
311
- ```
312
- Scan for performance issues and DoS vectors:
313
-
314
- DATABASE:
315
- - N+1 query patterns
316
- - Missing indexes on filtered/sorted columns
317
- - Full table scans
318
- - Unbounded queries (no LIMIT)
319
- - Connection pool exhaustion
320
- - Long-running transactions
321
-
322
- MEMORY:
323
- - Memory leaks (event listeners not removed)
324
- - Unbounded caches
325
- - Large object accumulation
326
- - Buffer handling issues
327
- - Stream not properly closed
328
- - SSE/WebSocket buffer accumulation
329
-
330
- CPU:
331
- - ReDoS (Regular Expression DoS)
332
- - Algorithmic complexity attacks
333
- - Synchronous crypto operations
334
- - JSON parsing of large payloads
335
- - XML parsing without limits (billion laughs)
336
-
337
- NETWORK:
338
- - No timeout on external calls
339
- - Missing circuit breakers
340
- - Retry storms
341
- - No backpressure handling
342
- - Connection leaks
343
-
344
- RESOURCE EXHAUSTION:
345
- - File upload without size limits
346
- - Zip bomb potential
347
- - Unbounded pagination
348
- - Missing request size limits
349
- - Too many concurrent connections
350
-
351
- Output JSON: [{id: "PERF-XXX", title, severity, category: "performance", file, line, code, description, recommendation, confidence}]
352
- ```
353
-
354
- ### Agent 8: Business Logic Scanner
355
- ```
356
- Scan for business logic vulnerabilities:
357
-
358
- RACE CONDITIONS:
359
- - TOCTOU (time-of-check-time-of-use)
360
- - Double-spend in transactions
361
- - Inventory overselling
362
- - Concurrent booking conflicts
363
- - Non-atomic read-modify-write
364
-
365
- WORKFLOW:
366
- - Step skipping in multi-step processes
367
- - State manipulation attacks
368
- - Order of operations bypass
369
- - Workflow replay attacks
370
-
371
- FINANCIAL:
372
- - Rounding errors in calculations
373
- - Currency handling issues
374
- - Negative amount bypass
375
- - Discount stacking exploits
376
- - Price manipulation
377
-
378
- ACCESS CONTROL:
379
- - Role hierarchy bypass
380
- - Feature flag manipulation
381
- - Subscription level bypass
382
- - Time-based access bypass
383
-
384
- DATA INTEGRITY:
385
- - Missing referential integrity
386
- - Orphaned records possible
387
- - Data inconsistency between services
388
- - Missing transaction boundaries
389
-
390
- Output JSON: [{id: "BIZ-XXX", title, severity, category: "business-logic", file, line, code, description, recommendation, confidence}]
391
- ```
392
-
393
- ### Agent 9: Code Quality Scanner
394
- ```
395
- Scan for code quality and maintainability issues:
396
-
397
- COMPLEXITY:
398
- - Cyclomatic complexity > 10
399
- - Functions > 50 lines
400
- - Files > 500 lines
401
- - Deep nesting (> 4 levels)
402
- - Too many parameters (> 5)
403
-
404
- DRY VIOLATIONS:
405
- - Duplicated code blocks (> 10 lines)
406
- - Copy-paste code with minor changes
407
- - Similar functions that should be unified
408
-
409
- ANTI-PATTERNS:
410
- - God objects/classes
411
- - Callback hell
412
- - Magic numbers/strings
413
- - Dead code
414
- - Unused imports/variables
415
- - Any type overuse (TypeScript)
416
- - Console.log in production
417
- - TODO/FIXME comments in production
418
-
419
- ERROR HANDLING:
420
- - Empty catch blocks
421
- - Generic error swallowing
422
- - Missing error boundaries (React)
423
- - Unhandled promise rejections
424
- - Missing finally blocks for cleanup
425
-
426
- NAMING:
427
- - Inconsistent naming conventions
428
- - Misleading names
429
- - Single letter variables (except i,j,k)
430
- - Abbreviations without context
431
-
432
- Output JSON: [{id: "QUAL-XXX", title, severity, category: "quality", file, line, code, description, recommendation, confidence}]
433
- ```
434
-
435
- ### Agent 10: Testing & Reliability Scanner
436
- ```
437
- Scan for testing gaps and reliability issues:
438
-
439
- TEST COVERAGE:
440
- - Critical paths without tests (auth, payments, data access)
441
- - Error handlers not tested
442
- - Edge cases not covered
443
- - No integration tests
444
- - No E2E tests for main flows
445
-
446
- TEST QUALITY:
447
- - Tests without assertions
448
- - Mocked security checks (dangerous!)
449
- - Flaky tests (time-dependent)
450
- - Tests with hardcoded data that can expire
451
- - Missing negative tests (what should fail)
452
-
453
- RELIABILITY:
454
- - Missing health checks
455
- - No graceful shutdown
456
- - Missing readiness/liveness probes
457
- - No circuit breakers for external calls
458
- - Missing retry logic with backoff
459
- - No fallback mechanisms
460
-
461
- OBSERVABILITY:
462
- - Missing structured logging
463
- - No correlation IDs
464
- - Missing metrics collection
465
- - No distributed tracing
466
- - Errors not properly categorized
467
-
468
- DEPLOYMENT:
469
- - No feature flags for risky changes
470
- - Missing rollback mechanism
471
- - No canary/blue-green deployment
472
- - Database migrations not reversible
473
-
474
- Output JSON: [{id: "TEST-XXX", title, severity, category: "testing", file, line, code, description, recommendation, confidence}]
475
- ```
476
-
477
- ---
478
-
479
- ## Phase 2: Cross-Validation (3+ parallel validators)
480
-
481
- Wait for all Phase 1 background agents to complete using `AgentOutputTool`.
482
-
483
- Then launch 3 built-in validators + custom validation agents IN PARALLEL with `run_in_background: true`:
484
-
485
- ### Custom Validators (from .coverme/agents.json)
486
- If custom agents with `"phase": "validation"` were loaded in Phase 0, launch them here in parallel with the built-in validators.
487
-
488
- ### Validator A: False Positive Hunter
489
- ```
490
- Review ALL findings from Phase 1. For each finding:
491
- 1. Read the actual code file
492
- 2. Check if there are mitigating controls elsewhere
493
- 3. For secrets: run "git ls-files <file>" - if not tracked, mark FALSE POSITIVE
494
- 4. Check if code is actually reachable in production
495
- 5. Verify the context (is it test code? example code? disabled feature?)
496
-
497
- Output: { confirmed: ["SEC-001",...], falsePositives: [{id, reason},...] }
498
- ```
499
-
500
- ### Validator B: Evidence Challenger
501
- ```
502
- Challenge every HIGH and CRITICAL finding:
503
- 1. Read the actual code with 20 lines of context
504
- 2. Trace data flow from source to sink
505
- 3. Check for sanitization/validation in between
506
- 4. Verify the exploit scenario is realistic
507
- 5. Consider the deployment environment
508
- 6. Check if it's actually exploitable in production
509
-
510
- Output: { confirmed: ["SEC-001",...], falsePositives: [{id, reason},...] }
511
- ```
512
-
513
- ### Validator C: Missing Issues Hunter
514
- ```
515
- Look for issues that Phase 1 agents MISSED:
516
- - Race conditions in critical operations
517
- - Business logic flaws specific to this application
518
- - Edge cases (empty input, null, undefined, max length)
519
- - Integration point vulnerabilities
520
- - Configuration issues for specific environment
521
- - Combination attacks (multiple low issues = high)
522
-
523
- Output: { missedIssues: [{id, title, severity, file, line, description, recommendation},...] }
524
- ```
525
-
526
- ---
527
-
528
- ## Phase 3: Build Consensus
529
-
530
- Wait for all Phase 2 background validators to complete using `AgentOutputTool`.
531
-
532
- Combine all results:
533
- 1. Calculate confidence: (confirmations / validators) * 100
534
- 2. Remove findings with confidence < 50%
535
- 3. Add missed issues from Validator C
536
- 4. Identify positive observations (good patterns found)
537
-
538
- ---
539
-
540
- ## Phase 4: Generate Report
541
-
542
- **DO NOT ASK - JUST OVERWRITE THE FILE!**
543
-
544
- Update `.coverme/scan.json` with the scan results. Overwrite any existing content without asking:
545
-
546
- - **projectName**: from package.json or folder name
547
- - **scanDate**: today's date
548
- - **findings**: array of issues found (each with id, title, severity, category, file, line, description, code, recommendation, confidence)
549
- - **positiveObservations**: array of good patterns found
550
- - **scanDuration**: time taken in ms
551
- - **agentCount**: 7
552
-
553
- Use the Write tool to overwrite `.coverme/scan.json` with the results. Do not ask for confirmation.
554
-
555
- ---
556
-
557
- ## Phase 5: Generate HTML Report
558
-
559
- **DO NOT ASK - JUST RUN THE COMMANDS!**
560
-
561
- Generate the HTML report and open it automatically:
562
- ```bash
563
- TIMESTAMP=$(date +%Y-%m-%d_%H-%M-%S)
564
- npx coverme-scanner report .coverme/scan.json -f html -o ".coverme/report_$TIMESTAMP.html"
565
- cp .coverme/scan.json ".coverme/scan_$TIMESTAMP.json"
566
- open ".coverme/report_$TIMESTAMP.html"
567
- ```
568
-
569
- Run these commands without asking for permission.
570
-
571
- ---
572
-
573
- ## DONE
574
-
575
- Tell the user: "Scan complete! Report saved to .coverme/ and opened in browser."
576
-
577
- **REMINDER: You should have completed all 5 phases without asking ANY questions or stopping for confirmation.**