coverme-scanner 1.5.2 → 1.6.0

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.
@@ -1,1034 +1,250 @@
1
1
  # CoverMe - Ultimate AI Security Scanner
2
2
 
3
- The most comprehensive AI-powered code scanner. 22 specialized agents + validators + deep analysis.
3
+ The most comprehensive AI-powered code scanner. 22 specialized agents + validators.
4
4
 
5
5
  $ARGUMENTS
6
6
 
7
- ## CRITICAL INSTRUCTIONS - READ FIRST!
7
+ ## CRITICAL INSTRUCTIONS
8
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 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.
9
+ 1. **DO NOT ASK ANY QUESTIONS** - Run autonomously
10
+ 2. **DO NOT STOP FOR CONFIRMATION** - Keep going
11
+ 3. **COMPLETE EVERYTHING** - All phases without interruption
12
+ 4. **AGENTS WRITE TO FILES** - Each agent writes results to `.coverme/agents/{ID}.json`
13
+ 5. **AGENTS RETURN ONLY "done" or "skipped"** - Never return findings in response
18
14
 
19
15
  ---
20
16
 
21
- ## Phase 0: Project Discovery & Statistics
22
-
23
- ### Step 1: Gather Project Statistics
17
+ ## Phase 0: Setup
24
18
 
25
19
  ```bash
26
- # Count files and lines of code
27
- find . -type f \( -name "*.ts" -o -name "*.js" -o -name "*.tsx" -o -name "*.jsx" -o -name "*.py" -o -name "*.go" -o -name "*.java" -o -name "*.rb" -o -name "*.php" -o -name "*.cs" -o -name "*.swift" -o -name "*.kt" \) -not -path "*/node_modules/*" -not -path "*/.git/*" -not -path "*/dist/*" -not -path "*/build/*" -not -path "*/__pycache__/*" | wc -l
28
-
29
- # Count lines of code (approximate)
30
- find . -type f \( -name "*.ts" -o -name "*.js" -o -name "*.tsx" -o -name "*.jsx" -o -name "*.py" -o -name "*.go" \) -not -path "*/node_modules/*" -not -path "*/.git/*" -not -path "*/dist/*" 2>/dev/null | head -100 | xargs wc -l 2>/dev/null | tail -1
31
-
32
- # Generate project tree (max 3 levels deep, exclude node_modules etc)
33
- find . -maxdepth 3 -type d -not -path "*/node_modules/*" -not -path "*/.git/*" -not -path "*/dist/*" -not -path "*/__pycache__/*" | head -30 | sort
20
+ mkdir -p .coverme/agents
21
+ rm -f .coverme/agents/*.json 2>/dev/null
34
22
  ```
35
23
 
36
- ### Step 2: Read Project Info
37
-
38
- ```bash
39
- cat package.json 2>/dev/null | head -30
40
- cat README.md 2>/dev/null | head -100
41
- ls -la
42
- ls src/ 2>/dev/null || ls app/ 2>/dev/null || ls lib/ 2>/dev/null
43
- ```
44
-
45
- ### Step 3: Load Custom Agents (if exists)
46
-
47
- ```bash
48
- cat .coverme/agents.json 2>/dev/null || echo "NO_CUSTOM_AGENTS"
49
- ```
50
-
51
- ### Step 4: Check for Runtime Verification (SSH)
52
-
24
+ Get project stats:
53
25
  ```bash
54
- cat .coverme/runtime.json 2>/dev/null || echo "NO_RUNTIME_CONFIG"
26
+ FILES=$(find . -type f \( -name "*.ts" -o -name "*.js" -o -name "*.py" -o -name "*.go" \) -not -path "*/node_modules/*" -not -path "*/.git/*" -not -path "*/dist/*" 2>/dev/null | wc -l | tr -d ' ')
27
+ LINES=$(find . -type f \( -name "*.ts" -o -name "*.js" -o -name "*.py" \) -not -path "*/node_modules/*" -not -path "*/dist/*" 2>/dev/null | head -50 | xargs wc -l 2>/dev/null | tail -1 | awk '{print $1}')
28
+ echo "Files: $FILES, Lines: ~$LINES"
55
29
  ```
56
30
 
57
31
  ---
58
32
 
59
- ## Phase 1: Discovery (22 parallel agents)
33
+ ## Phase 1: Launch 22 Agents (parallel, background)
60
34
 
61
- Launch ALL agents IN PARALLEL using the Task tool with `run_in_background: true`.
35
+ **CRITICAL**: Each agent MUST:
36
+ 1. Scan the codebase for its specific issues
37
+ 2. Write findings to `.coverme/agents/{PREFIX}.json`
38
+ 3. Return ONLY the word "done" or "skipped" - NOTHING ELSE
62
39
 
63
- **CRITICAL FOR CONTEXT MANAGEMENT**: Each agent MUST return ONLY a compact JSON array of findings.
64
- - NO explanatory text before or after the JSON
65
- - NO tool output summaries
66
- - ONLY the final JSON array
67
- - Keep descriptions short (max 100 chars)
68
- - If no findings, return: `[]`
40
+ Launch ALL with `run_in_background: true`:
69
41
 
70
- Example agent output format:
71
- ```json
72
- [{"id":"SEC-001","title":"SQL Injection","severity":"critical","file":"src/db.ts","line":45,"description":"User input concatenated into query","recommendation":"Use parameterized queries"}]
42
+ ### Agent 1: SEC - Security Core
73
43
  ```
74
-
75
- ### Agent 1: Security Core Scanner (SEC)
44
+ Scan for: SQL injection, XSS, command injection, SSTI, hardcoded secrets, weak crypto.
45
+ Write to .coverme/agents/SEC.json:
46
+ [{"id":"SEC-001","title":"...","severity":"critical|high|medium|low","file":"...","line":N,"description":"...","recommendation":"..."}]
47
+ Return ONLY: "done" or "skipped"
76
48
  ```
77
- Scan for OWASP Top 10 and common vulnerabilities:
78
-
79
- INJECTION:
80
- - SQL injection (string concatenation in queries, raw queries)
81
- - NoSQL injection (MongoDB $where, $regex with user input)
82
- - Command injection (exec, spawn, system with user input)
83
- - LDAP injection, XPath injection
84
- - Template injection (SSTI in Jinja2, EJS, Handlebars)
85
- - Header injection (CRLF in headers)
86
- - Log injection (unescaped user input in logs)
87
-
88
- XSS:
89
- - Reflected XSS (user input in response without encoding)
90
- - Stored XSS (database content rendered without escaping)
91
- - DOM XSS (innerHTML, document.write, eval with user data)
92
- - dangerouslySetInnerHTML in React without sanitization
93
-
94
- AUTHENTICATION:
95
- - Hardcoded credentials (check git ls-files first!)
96
- - Weak password policies (no complexity, short length)
97
- - Missing rate limiting on login/register
98
- - Session fixation (session ID not rotated after login)
99
- - JWT issues (none algorithm, weak secret, no expiry)
100
- - Missing MFA on sensitive operations
101
-
102
- AUTHORIZATION:
103
- - IDOR (direct object references without ownership check)
104
- - Missing authorization checks on endpoints
105
- - Privilege escalation paths
106
- - Horizontal access (user A accessing user B's data)
107
- - Vertical access (user accessing admin functions)
108
49
 
109
- CRYPTOGRAPHY:
110
- - MD5/SHA1 for passwords (use bcrypt/argon2)
111
- - Math.random() for security (use crypto.randomBytes)
112
- - Hardcoded encryption keys/IVs
113
- - ECB mode usage
114
- - Missing HTTPS enforcement
115
-
116
- DATABASE-SPECIFIC DANGEROUS FUNCTIONS:
117
- - DuckDB: read_text(), read_blob(), read_csv_auto(), read_parquet(), glob(), getenv(), httpfs
118
- - SQLite: load_extension(), readfile(), writefile()
119
- - PostgreSQL: pg_read_file(), pg_ls_dir(), COPY TO/FROM
120
- - MySQL: LOAD_FILE(), INTO OUTFILE, INTO DUMPFILE
121
- - MongoDB: $where with user input, mapReduce with user functions
122
- - Redis: EVAL/EVALSHA with user input, CONFIG, DEBUG commands
123
-
124
- RETURN ONLY THIS JSON (no other text):
125
- [{"id":"SEC-001","title":"...","severity":"critical|high|medium|low","file":"path","line":N,"description":"max 100 chars","recommendation":"max 100 chars"}]
50
+ ### Agent 2: AUTH - Authentication
126
51
  ```
127
-
128
- ### Agent 2: Auth & Session Scanner (AUTH)
52
+ Scan for: JWT issues, session problems, OAuth flaws, weak passwords, missing MFA.
53
+ Write to .coverme/agents/AUTH.json
54
+ Return ONLY: "done" or "skipped"
129
55
  ```
130
- Deep dive into authentication and session management:
131
-
132
- FIRST: Detect which auth method(s) this project uses:
133
- | Auth Type | Detection Pattern |
134
- |-----------|-------------------|
135
- | OAuth/OIDC | oauth, oidc, authorization_code, client_id, redirect_uri |
136
- | JWT | jsonwebtoken, jwt, Bearer, accessToken, refreshToken |
137
- | Session-based | express-session, cookie-session, session.save, req.session |
138
- | API Keys | x-api-key, apiKey, api_key, API_SECRET |
139
- | Clerk | @clerk, useAuth, clerkMiddleware |
140
- | Auth0 | @auth0, auth0-js, auth0-react |
141
- | Firebase Auth | firebase/auth, signInWith, onAuthStateChanged |
142
- | Passport.js | passport, passport-local, passport-jwt |
143
- | Supabase Auth | @supabase/auth, supabase.auth |
144
- | NextAuth | next-auth, NextAuth, getServerSession |
145
-
146
- FOR EACH AUTH TYPE DETECTED, check specific vulnerabilities:
147
-
148
- OAuth/OIDC:
149
- - Open redirect in return_url/redirect_uri (CRITICAL!)
150
- - State parameter missing or predictable
151
- - PKCE not implemented for public clients
152
- - Token stored in localStorage (XSS vulnerable)
153
56
 
154
- JWT:
155
- - alg: none accepted (signature bypass)
156
- - Weak secret (< 256 bits)
157
- - No expiry (exp claim missing)
158
- - Token not invalidated on logout
159
-
160
- Session-based:
161
- - Session ID in URL (referer leak)
162
- - Session not invalidated on logout
163
- - Session fixation
164
- - Missing secure, httpOnly, sameSite on cookies
165
-
166
- TIMING ATTACKS:
167
- - Non-constant-time string comparison for tokens/secrets
168
- - Early return on auth failure leaking valid usernames
169
-
170
- RETURN ONLY JSON: [{"id":"AUTH-001","title":"...","severity":"...","file":"...","line":N,"description":"...","recommendation":"..."}]
57
+ ### Agent 3: API - API Security
171
58
  ```
172
-
173
- ### Agent 3: API Security Scanner (API)
59
+ Scan for: CORS issues, rate limiting, input validation, mass assignment, GraphQL issues.
60
+ Write to .coverme/agents/API.json
61
+ Return ONLY: "done" or "skipped"
174
62
  ```
175
- Scan API endpoints for security issues:
176
-
177
- INPUT VALIDATION:
178
- - Missing input validation on request body
179
- - Type coercion attacks (string vs number)
180
- - Array/object pollution
181
- - Prototype pollution
182
- - Mass assignment vulnerabilities
183
- - GraphQL introspection enabled in production
184
- - GraphQL depth/complexity limits missing
185
-
186
- RATE LIMITING:
187
- - No rate limiting on expensive operations
188
- - Rate limit bypass via headers (X-Forwarded-For)
189
- - Non-atomic INCR+EXPIRE in Redis
190
63
 
191
- CORS MISCONFIGURATION:
192
- - res.header('Access-Control-Allow-Origin', req.headers.origin)
193
- - res.header('Access-Control-Allow-Origin', '*')
194
- - app.use(cors({ origin: true }))
195
-
196
- FAIL-OPEN vs FAIL-CLOSED PATTERNS (CRITICAL):
197
- - IP whitelist empty/missing = allow all
198
- - Auth middleware errors = request passes through
199
- - Rate limiter Redis down = no limiting
200
- - Config missing = insecure defaults
201
-
202
- WEBHOOKS:
203
- - Webhook signature not verified
204
- - SSRF via webhook URLs
205
- - No webhook replay protection
206
-
207
- RETURN ONLY JSON: [{"id":"API-001","title":"...","severity":"...","file":"...","line":N,"description":"...","recommendation":"..."}]
64
+ ### Agent 4: INFRA - Infrastructure
208
65
  ```
209
-
210
- ### Agent 4: Infrastructure Scanner (INFRA)
66
+ Scan for: Docker issues, K8s misconfig, CI/CD secrets, cloud misconfig.
67
+ Write to .coverme/agents/INFRA.json
68
+ Return ONLY: "done" or "skipped"
211
69
  ```
212
- Scan infrastructure and deployment configs:
213
-
214
- DOCKER:
215
- - Running as root user
216
- - Secrets in Dockerfile or build args
217
- - Latest tag usage (unpinned versions)
218
- - Sensitive ports exposed
219
- - Missing health checks
220
- - No resource limits
221
- - Privileged mode enabled
222
-
223
- KUBERNETES/HELM:
224
- - No resource limits/requests
225
- - Running as root
226
- - Privileged containers
227
- - Host network/PID enabled
228
- - Missing network policies
229
- - Secrets not encrypted at rest
230
- - Service account auto-mount enabled
231
70
 
232
- CI/CD:
233
- - Secrets in CI config files
234
- - Missing SAST/DAST in pipeline
235
- - No branch protection
236
-
237
- SECRETS IN GIT HISTORY (CRITICAL CHECK!):
238
- Run: git log --all --full-history -- "**/secrets*" "**/credentials*" "**/*.env"
239
- If secrets appear in history, they are EXPOSED even if now gitignored!
240
-
241
- DEPENDENCY SECURITY (HIGH if missing):
242
- - npm audit or yarn audit in CI pipeline
243
- - Dependabot/Renovate configuration
244
- - SBOM generation
245
-
246
- RETURN ONLY JSON: [{"id":"INFRA-001","title":"...","severity":"...","file":"...","line":N,"description":"...","recommendation":"..."}]
71
+ ### Agent 5: DATA - Data & Privacy
247
72
  ```
248
-
249
- ### Agent 5: Data & Privacy Scanner (DATA)
73
+ Scan for: PII exposure, GDPR issues, unencrypted data, secrets in code.
74
+ Write to .coverme/agents/DATA.json
75
+ Return ONLY: "done" or "skipped"
250
76
  ```
251
- Scan for data protection and privacy issues:
252
-
253
- PII HANDLING:
254
- - PII logged (emails, IPs, names, phone numbers)
255
- - PII in URLs/query strings
256
- - PII in error messages
257
- - PII not encrypted at rest
258
- - PII not masked in UI/logs
259
-
260
- GDPR/PRIVACY:
261
- - Missing data retention policy implementation
262
- - No data deletion mechanism (right to erasure)
263
- - No data export mechanism (data portability)
264
- - Consent not tracked properly
265
- - Third-party data sharing without consent
266
77
 
267
- DATABASE:
268
- - Sensitive data not encrypted (column-level)
269
- - No audit logging for sensitive operations
270
- - Connection strings with credentials in code
271
-
272
- SECRETS:
273
- - API keys in code (check git ls-files!)
274
- - Secrets in environment files committed
275
- - .env files not in .gitignore
276
-
277
- RETURN ONLY JSON: [{"id":"DATA-001","title":"...","severity":"...","file":"...","line":N,"description":"...","recommendation":"..."}]
78
+ ### Agent 6: AI - AI/LLM Security
278
79
  ```
279
-
280
- ### Agent 6: AI/LLM Security Scanner (AI)
80
+ FIRST: Check if AI code exists (openai, anthropic, langchain, etc.)
81
+ If no AI code: Write {"skipped":true} and return "skipped"
82
+ If AI code: Scan for prompt injection, data leakage, output validation.
83
+ Write to .coverme/agents/AI.json
84
+ Return ONLY: "done" or "skipped"
281
85
  ```
282
- CONDITIONAL: First detect if this project uses AI/LLM:
283
- grep -r -l "openai\|anthropic\|langchain\|ollama\|huggingface\|llama\|gpt-\|claude\|gemini\|bedrock\|vertex" --include="*.ts" --include="*.js" --include="*.py" --include="*.json" .
284
-
285
- IF NO AI CODE FOUND: Output: {"skipped": true, "reason": "No AI/LLM code detected", "findings": []}
286
-
287
- IF AI CODE FOUND:
288
- PROMPT INJECTION:
289
- - User input directly in prompts without sanitization
290
- - System prompts exposed to users
291
- - No input length limits on prompts
292
- - Missing output validation from LLM
293
- - Jailbreak vulnerabilities
294
-
295
- LLM OUTPUT → CODE EXECUTION CHAINS:
296
- - LLM generates SQL that gets executed
297
- - LLM generates code that gets eval'd
298
- - LLM generates shell commands that get executed
299
- - LLM output used in template rendering (SSTI)
300
86
 
301
- SUPPLY CHAIN:
302
- - CDN imports without Subresource Integrity (SRI)
303
- - Unpinned AI model versions
304
-
305
- RETURN ONLY JSON (no other text): []
306
- ```
307
-
308
- ### Agent 7: Performance & DoS Scanner (PERF)
309
- ```
310
- Scan for performance and denial-of-service issues:
311
-
312
- DATABASE:
313
- - N+1 query patterns
314
- - Missing indexes on filtered/sorted columns
315
- - Full table scans
316
- - Unbounded queries (no LIMIT)
317
-
318
- MEMORY:
319
- - Memory leaks (event listeners not removed)
320
- - Unbounded caches
321
- - Stream not properly closed
322
- - SSE/WebSocket buffer accumulation
323
-
324
- CPU:
325
- - ReDoS (Regular Expression DoS)
326
- - Algorithmic complexity attacks
327
- - Synchronous crypto operations
328
- - JSON parsing of large payloads
329
-
330
- DANGEROUS DATABASE OPERATIONS IN HOT PATHS:
331
- - Redis KEYS command (blocks entire server, O(n) scan)
332
- - MongoDB find() without limit
333
- - SQL SELECT without LIMIT
334
-
335
- RETURN ONLY JSON (no other text): []
87
+ ### Agent 7: PERF - Performance & DoS
336
88
  ```
337
-
338
- ### Agent 8: Business Logic Scanner (BIZ)
89
+ Scan for: ReDoS, N+1 queries, memory leaks, unbounded operations.
90
+ Write to .coverme/agents/PERF.json
91
+ Return ONLY: "done" or "skipped"
339
92
  ```
340
- Scan for business logic vulnerabilities:
341
-
342
- RACE CONDITIONS:
343
- - TOCTOU (time-of-check-time-of-use)
344
- - Double-spend in transactions
345
- - Inventory overselling
346
- - Non-atomic read-modify-write
347
-
348
- WORKFLOW:
349
- - Step skipping in multi-step processes
350
- - State manipulation attacks
351
- - Workflow replay attacks
352
93
 
353
- FINANCIAL:
354
- - Rounding errors in calculations
355
- - Currency handling issues
356
- - Negative amount bypass
357
- - Discount stacking exploits
358
-
359
- RETURN ONLY JSON (no other text): []
94
+ ### Agent 8: BIZ - Business Logic
360
95
  ```
361
-
362
- ### Agent 9: Code Quality Scanner (QUAL)
96
+ Scan for: Race conditions, TOCTOU, workflow bypass, financial issues.
97
+ Write to .coverme/agents/BIZ.json
98
+ Return ONLY: "done" or "skipped"
363
99
  ```
364
- Scan for code quality issues that affect security/reliability:
365
-
366
- COMPLEXITY:
367
- - Cyclomatic complexity > 10
368
- - Functions > 50 lines
369
- - Files > 500 lines
370
- - Deep nesting (> 4 levels)
371
-
372
- ANTI-PATTERNS:
373
- - God objects/classes
374
- - Callback hell
375
- - Magic numbers/strings
376
- - Dead code
377
- - Console.log in production
378
- - TODO/FIXME comments about security issues
379
-
380
- ERROR HANDLING:
381
- - Empty catch blocks
382
- - Generic error swallowing
383
- - Missing error boundaries (React)
384
- - Unhandled promise rejections
385
-
386
- DEAD CODE WITH SECURITY IMPLICATIONS:
387
- - Old/commented code that has BETTER security than current code
388
- - Deprecated functions with security controls not ported
389
100
 
390
- RETURN ONLY JSON (no other text): []
101
+ ### Agent 9: QUAL - Code Quality
391
102
  ```
392
-
393
- ### Agent 10: Testing & Reliability Scanner (TEST)
103
+ Scan for: High complexity, dead code, error swallowing, anti-patterns.
104
+ Write to .coverme/agents/QUAL.json
105
+ Return ONLY: "done" or "skipped"
394
106
  ```
395
- Scan for testing gaps and reliability issues:
396
-
397
- TEST COVERAGE:
398
- - Critical paths without tests (auth, payments, data access)
399
- - Error handlers not tested
400
- - No integration tests
401
- - No E2E tests for main flows
402
-
403
- TEST QUALITY:
404
- - Tests without assertions
405
- - Mocked security checks (dangerous!)
406
- - Flaky tests (time-dependent)
407
107
 
408
- RELIABILITY:
409
- - Missing health checks
410
- - No graceful shutdown
411
- - Missing readiness/liveness probes
412
- - No circuit breakers for external calls
413
- - Missing retry logic with backoff
414
-
415
- RETURN ONLY JSON (no other text): []
108
+ ### Agent 10: TEST - Testing
416
109
  ```
417
-
418
- ### Agent 11: Redis & Cache Security Scanner (REDIS)
110
+ Scan for: Missing tests on critical paths, mocked security, no E2E.
111
+ Write to .coverme/agents/TEST.json
112
+ Return ONLY: "done" or "skipped"
419
113
  ```
420
- CONDITIONAL: First detect if this project uses Redis/Cache:
421
- grep -r -l "redis\|ioredis\|memcached\|node-cache\|lru-cache\|cache-manager" --include="*.ts" --include="*.js" --include="*.json" --include="*.yaml" .
422
-
423
- IF NO CACHE CODE FOUND: Output: {"skipped": true, "reason": "No Redis/Cache code detected", "findings": []}
424
114
 
425
- IF CACHE CODE FOUND:
426
- DANGEROUS COMMANDS:
427
- - KEYS * in production code (blocks entire server, use SCAN instead)
428
- - FLUSHALL, FLUSHDB accessible without protection
429
- - DEBUG, CONFIG commands enabled in production
430
- - EVAL/EVALSHA with user-controlled scripts (Lua injection)
431
-
432
- AUTHENTICATION & ACCESS:
433
- - Redis without AUTH (requirepass not set)
434
- - Redis exposed on 0.0.0.0 instead of 127.0.0.1
435
- - Missing TLS for Redis connections
436
- - Connection strings with passwords in code/logs
437
-
438
- DATA SECURITY:
439
- - Sensitive data stored without encryption
440
- - PII in Redis without TTL
441
- - Cache keys predictable/enumerable
442
- - No key prefix separation between tenants (multi-tenant leak)
443
-
444
- RACE CONDITIONS:
445
- - Non-atomic read-modify-write patterns
446
- - Missing WATCH/MULTI/EXEC for transactions
447
- - INCR + EXPIRE not atomic
448
-
449
- RETURN ONLY JSON (no other text): []
115
+ ### Agent 11: REDIS - Cache Security
450
116
  ```
451
-
452
- ### Agent 12: Resilience & Fallback Scanner (RESIL)
117
+ FIRST: Check if Redis/cache code exists.
118
+ If not: Write {"skipped":true} and return "skipped"
119
+ If yes: Scan for dangerous commands, auth issues, race conditions.
120
+ Write to .coverme/agents/REDIS.json
121
+ Return ONLY: "done" or "skipped"
453
122
  ```
454
- Scan for resilience patterns and fallback mechanisms:
455
-
456
- CIRCUIT BREAKERS:
457
- - External service calls without circuit breaker
458
- - Circuit breaker without proper thresholds
459
- - No fallback when circuit is open
460
123
 
461
- RETRY PATTERNS:
462
- - Retries without exponential backoff
463
- - Retries without jitter (thundering herd)
464
- - Retries without max attempts limit
465
- - Retrying non-idempotent operations
466
-
467
- TIMEOUTS:
468
- - HTTP calls without timeout
469
- - Database queries without timeout
470
- - External API calls without timeout
471
-
472
- FALLBACKS:
473
- - No fallback for critical external dependencies
474
- - Missing cached fallback data
475
- - No degraded mode implementation
476
-
477
- HEALTH CHECKS:
478
- - Health check that calls external dependencies
479
- - No distinction between liveness and readiness
480
-
481
- RETURN ONLY JSON (no other text): []
124
+ ### Agent 12: RESIL - Resilience
482
125
  ```
483
-
484
- ### Agent 13: PII & Sensitive Data Scanner (PII)
126
+ Scan for: Missing circuit breakers, no timeouts, no retries, no fallbacks.
127
+ Write to .coverme/agents/RESIL.json
128
+ Return ONLY: "done" or "skipped"
485
129
  ```
486
- Scan for PII exposure and sensitive data handling issues:
487
-
488
- PII IN LOGS:
489
- - Email addresses logged
490
- - Phone numbers logged
491
- - IP addresses logged without justification
492
- - Names/addresses in logs
493
- - Request/response bodies logged without redaction
494
130
 
495
- PII IN URLS:
496
- - PII in URL path (e.g., /user/john@email.com)
497
- - PII in query parameters
498
- - Session tokens in URLs (referer leak)
499
-
500
- PII IN STORAGE:
501
- - PII stored without encryption at rest
502
- - PII in local storage/session storage (browser)
503
- - PII in cookies without encryption
504
-
505
- GDPR/CCPA COMPLIANCE:
506
- - No data export functionality
507
- - No data deletion on request
508
- - Missing consent tracking
509
-
510
- SENSITIVE DATA TYPES TO FIND:
511
- - SSN, passport numbers, national IDs
512
- - Credit card numbers (even partial)
513
- - Bank account numbers
514
- - Health/medical information
515
- - Authentication credentials
516
-
517
- RETURN ONLY JSON (no other text): []
131
+ ### Agent 13: PII - PII Scanner
518
132
  ```
519
-
520
- ### Agent 14: Dead Code & Unused Scanner (DEAD)
133
+ Scan for: PII in logs, PII in URLs, unencrypted PII, missing GDPR controls.
134
+ Write to .coverme/agents/PII.json
135
+ Return ONLY: "done" or "skipped"
521
136
  ```
522
- Scan for dead code, unused dependencies, and technical debt:
523
-
524
- UNUSED CODE:
525
- - Functions never called
526
- - Classes never instantiated
527
- - Variables assigned but never read
528
- - API endpoints not used by any client
529
137
 
530
- COMMENTED CODE:
531
- - Large blocks of commented-out code
532
- - TODO/FIXME comments older than 6 months
533
- - Console.log/print statements
534
-
535
- UNUSED DEPENDENCIES:
536
- - npm/pip packages installed but never imported
537
- - Devdependencies in production bundle
538
- - Duplicate dependencies (different versions)
539
-
540
- SECURITY IMPLICATIONS:
541
- - Commented security checks (why removed?)
542
- - Unused auth middleware (was security removed?)
543
- - Dead validation code (security regression?)
544
-
545
- RETURN ONLY JSON (no other text): []
138
+ ### Agent 14: DEAD - Dead Code
546
139
  ```
547
-
548
- ### Agent 15: Database Security Scanner (DB)
140
+ Scan for: Unused functions, unused deps, commented code, TODO/FIXME.
141
+ Write to .coverme/agents/DEAD.json
142
+ Return ONLY: "done" or "skipped"
549
143
  ```
550
- AUTO-DETECT DATABASE TYPE(S):
551
- | Database | Detection Pattern |
552
- |----------|-------------------|
553
- | PostgreSQL | pg, postgres, @prisma, typeorm, knex |
554
- | MySQL | mysql, mysql2, mariadb |
555
- | SQLite | sqlite, better-sqlite3, sql.js |
556
- | MongoDB | mongoose, mongodb |
557
- | DuckDB | duckdb, @duckdb |
558
- | Supabase | @supabase/supabase-js |
559
-
560
- IF NO DATABASE FOUND: Output: {"skipped": true, "reason": "No database code detected", "findings": []}
561
-
562
- SQL INJECTION:
563
- - String concatenation in queries
564
- - Template literals with user input in SQL
565
- - Raw queries without parameterization
566
- - Dynamic table/column names from user input
567
144
 
568
- NOSQL INJECTION:
569
- - MongoDB: $where with user input
570
- - MongoDB: operator injection ({$gt: ""})
571
-
572
- ACCESS CONTROL:
573
- - Database user with excessive privileges (GRANT ALL)
574
- - Application using root/admin database user
575
- - No row-level security (RLS) for multi-tenant
576
-
577
- CONNECTION SECURITY:
578
- - Database connection without TLS/SSL
579
- - Connection strings with credentials in code
580
- - Database exposed on public IP
581
-
582
- ORM SPECIFIC:
583
- - Prisma.$queryRawUnsafe() - VULNERABLE
584
- - Sequelize.query() with user input - VULNERABLE
585
- - TypeORM repository.query() with string concat - VULNERABLE
586
- - Mongoose User.find({ username: req.body.username }) - operator injection
587
-
588
- RETURN ONLY JSON (no other text): []
145
+ ### Agent 15: DB - Database Security
589
146
  ```
590
-
591
- ### Agent 16: Network & Architecture Scanner (ARCH)
147
+ Scan for: SQL injection, NoSQL injection, missing RLS, exposed connections.
148
+ Write to .coverme/agents/DB.json
149
+ Return ONLY: "done" or "skipped"
592
150
  ```
593
- Scan for network architecture and service boundary issues:
594
-
595
- SERVICE BOUNDARIES:
596
- - Internal endpoints exposed externally
597
- - Missing network segmentation between services
598
- - Service-to-service communication without mTLS
599
- - Admin/debug ports accessible from outside
600
-
601
- For EACH FINDING, determine fixOwner:
602
- - Fixable by code? → fixOwner: "developer"
603
- - Fixable by NetworkPolicy/firewall/K8s config? → fixOwner: "devops"
604
- - Needs architecture redesign? → fixOwner: "architect"
605
151
 
606
- KUBERNETES/INFRASTRUCTURE:
607
- - Missing NetworkPolicies for namespace isolation
608
- - Services using ClusterIP that should be internal
609
- - LoadBalancer exposing internal services
610
- - Pod-to-pod communication without restrictions
611
-
612
- RETURN ONLY JSON (no other text): []
152
+ ### Agent 16: ARCH - Architecture
613
153
  ```
614
-
615
- ### Agent 17: Design Decision Detector (DESIGN)
154
+ Scan for: Internal endpoints exposed, missing mTLS, network issues.
155
+ Write to .coverme/agents/ARCH.json
156
+ Return ONLY: "done" or "skipped"
616
157
  ```
617
- Scan for intentional design decisions that might look like bugs.
618
-
619
- GOAL: Prevent false positives by identifying documented/intentional patterns
620
158
 
621
- DOCUMENTED DECISIONS:
622
- - Comments explaining WHY something is done a certain way
623
- - README/docs explaining architecture choices
624
- - ADR (Architecture Decision Records) files
625
-
626
- CODE PATTERNS THAT ARE NOT BUGS:
627
- - // Intentional: .... or // Design decision: ...
628
- - // SECURITY: This is safe because...
629
- - Feature flags controlling security features with documentation
630
-
631
- FOR EACH PATTERN FOUND, output:
632
- {
633
- "id": "DESIGN-001",
634
- "type": "documented_decision",
635
- "title": "Content filtering disabled",
636
- "file": "src/ai/chat.ts",
637
- "line": 45,
638
- "reason": "Documented in code comment",
639
- "relatedFindings": ["AI-001"],
640
- "recommendation": "Not a bug - document as accepted risk"
641
- }
642
-
643
- These findings will be EXCLUDED from main report and moved to "Design Decisions" section.
159
+ ### Agent 17: DESIGN - Design Decisions
644
160
  ```
645
-
646
- ### Agent 18: Context-Aware Validator (CTX)
161
+ Find documented design decisions that might look like bugs (intentional patterns).
162
+ Write to .coverme/agents/DESIGN.json
163
+ Return ONLY: "done" or "skipped"
647
164
  ```
648
- Scan to understand the CONTEXT of each potential finding.
649
-
650
- GOAL: Reduce false positives by understanding deployment context
651
-
652
- FOR EACH FINDING FROM OTHER AGENTS, determine:
653
-
654
- DEPLOYMENT CONTEXT:
655
- - Is this code running in a container with network isolation?
656
- - Is this behind an API gateway that handles auth?
657
- - Is this internal-only service behind VPN?
658
165
 
659
- RUNTIME CONTEXT:
660
- - Is this code path actually reachable in production?
661
- - Is this only used in development/testing?
662
- - Is this protected by feature flag that's disabled?
663
-
664
- DATA FLOW CONTEXT:
665
- - Is the input already validated upstream?
666
- - Is there middleware that applies to this route?
667
-
668
- OUTPUT:
669
- {
670
- "findingId": "SEC-001",
671
- "contextAnalysis": {
672
- "deploymentContext": "Runs in K8s with NetworkPolicy",
673
- "runtimeContext": "Only reachable from internal services",
674
- "verdict": "false_positive|confirmed|needs_review",
675
- "reason": "Protected by network policy"
676
- }
677
- }
166
+ ### Agent 18: CTX - Context Validator
678
167
  ```
679
-
680
- ### Agent 19: Enclave & Trusted Compute Scanner (ENC)
168
+ For critical findings from other agents, check deployment context.
169
+ Write to .coverme/agents/CTX.json
170
+ Return ONLY: "done" or "skipped"
681
171
  ```
682
- CONDITIONAL: First detect if this project uses enclaves/TEE:
683
- grep -r -l "enclave\|nitro\|sgx\|tee\|attestation\|trusted.compute\|confidential.computing\|vsock" --include="*.ts" --include="*.js" --include="*.py" --include="*.yaml" --include="*.yml" .
684
-
685
- IF NO ENCLAVE CODE FOUND: Output: {"skipped": true, "reason": "No enclave/TEE code detected", "findings": []}
686
172
 
687
- ENCLAVE REGISTRATION:
688
- - Enclave-to-backend registration without attestation
689
- - IP-based trust without cryptographic verification
690
- - Enclave secrets transmitted without encryption
691
-
692
- RETURN ONLY JSON (no other text): []
173
+ ### Agent 19: ENC - Enclave Security
693
174
  ```
694
-
695
- ### Agent 20: Executive Summary Generator (EXEC)
175
+ FIRST: Check if enclave/TEE code exists.
176
+ If not: Write {"skipped":true} and return "skipped"
177
+ If yes: Scan for attestation issues.
178
+ Write to .coverme/agents/ENC.json
179
+ Return ONLY: "done" or "skipped"
696
180
  ```
697
- After all other agents complete, generate an executive summary.
698
181
 
699
- OUTPUT FORMAT:
700
- {
701
- "executiveSummary": {
702
- "headline": "3 Critical + 5 High findings require immediate attention",
703
- "riskLevel": "HIGH",
704
- "topRisks": [
705
- "SQL injection in user search allows database access",
706
- "Missing rate limiting enables brute force attacks"
707
- ],
708
- "positives": [
709
- "Authentication flow is well-implemented",
710
- "Good use of parameterized queries in core modules"
711
- ],
712
- "recommendedActions": [
713
- {
714
- "priority": 1,
715
- "action": "Fix SQL injection in src/search.ts",
716
- "owner": "developer",
717
- "effort": "1-2 hours"
718
- }
719
- ],
720
- "byOwner": {
721
- "developer": 5,
722
- "devops": 3,
723
- "architect": 1
724
- }
725
- }
726
- }
182
+ ### Agent 20: EXEC - Executive Summary
727
183
  ```
728
-
729
- ### Agent 21: Duplicate & Existing Solutions Scanner (DUP)
184
+ After scanning, generate executive summary with top risks and positives.
185
+ Write to .coverme/agents/EXEC.json
186
+ Return ONLY: "done"
730
187
  ```
731
- CRITICAL: Before recommending ANY fix, check if a solution ALREADY EXISTS.
732
-
733
- For EVERY finding from Phase 1, search the codebase for:
734
188
 
735
- 1. Existing utilities/helpers:
736
- - Search for similar function names (sanitize, validate, escape)
737
- - Check utils/, helpers/, lib/, common/ folders
738
-
739
- 2. Existing patterns:
740
- - How do OTHER files handle the same issue?
741
- - Is there a project-wide convention?
742
-
743
- 3. Duplicate findings:
744
- - Is this the same issue reported multiple times?
745
- - Are multiple findings actually ONE root cause?
746
-
747
- For EACH finding, add:
748
- - "EXISTING: Found sanitizeHtml() in src/utils/security.ts - use this"
749
- - "PATTERN: Other files use zod.string().email() - follow same pattern"
750
- - "DUPLICATE: Same root cause as SEC-003, fix once in middleware"
751
-
752
- Output:
753
- {
754
- "findingId": "SEC-001",
755
- "existingSolution": "Found: src/utils/sanitize.ts exports sanitizeUserInput()",
756
- "duplicateOf": null,
757
- "suggestedApproach": "Import and use existing function"
758
- }
189
+ ### Agent 21: DUP - Duplicate Finder
759
190
  ```
760
-
761
- ### Agent 22: Runtime Verification Scanner (RUNTIME)
191
+ Find existing solutions in codebase that could fix other findings.
192
+ Write to .coverme/agents/DUP.json
193
+ Return ONLY: "done" or "skipped"
762
194
  ```
763
- CONDITIONAL: Only runs if SSH is configured in Phase 0 runtime.json.
764
-
765
- IF NO runtime.json → Skip this agent entirely
766
-
767
- PURPOSE: Find dangerous mismatches between code configuration and actual runtime.
768
-
769
- STEP 1: Gather Code Expectations
770
- grep -E "^USER|^EXPOSE|^ENV" Dockerfile 2>/dev/null
771
- grep -E "runAsUser|runAsNonRoot|readOnlyRootFilesystem" k8s/*.yaml 2>/dev/null
772
-
773
- STEP 2: SSH and Check Actual Runtime
774
- ssh user@server "docker ps -q | head -1 | xargs -I {} docker exec {} id"
775
- ssh user@server "kubectl get pods -o name | head -1 | xargs -I {} kubectl exec {} -- id"
776
-
777
- STEP 3: Compare and Generate Findings
778
195
 
779
- | Mismatch | Severity |
780
- |----------|----------|
781
- | Code says non-root, runs as root | CRITICAL |
782
- | Dockerfile USER ignored | CRITICAL |
783
- | ReadOnlyRootFilesystem not enforced | HIGH |
784
- | Unexpected ports exposed | MEDIUM |
785
-
786
- RETURN ONLY JSON (no other text): []
196
+ ### Agent 22: POSITIVE - Good Patterns
787
197
  ```
788
-
789
- ---
790
-
791
- ## Phase 2: Mitigation Validation (CRITICAL)
792
-
793
- Wait for all Phase 1 background agents to complete using `AgentOutputTool`.
794
-
795
- ### Validator M: Mitigation Hunter
796
-
797
- For EVERY finding, search the codebase for mitigations:
798
-
799
- 1. **Input Validation** - Is input sanitized before reaching the vulnerable sink?
800
- 2. **Middleware Protection** - Is there middleware that protects this route?
801
- 3. **Framework Auto-Protection** - Does the framework handle this automatically?
802
- 4. **Route Protection** - Is the endpoint protected by auth/authorization?
803
-
804
- Output Per Finding:
805
- ```json
806
- {
807
- "findingId": "SEC-001",
808
- "verdict": "mitigated|partial|confirmed|false_positive",
809
- "mitigationType": "input_validation|middleware|framework|config|none",
810
- "evidence": ["Found Zod validation at src/routes/user.ts:23"],
811
- "adjustedSeverity": "low"
812
- }
198
+ Find positive security patterns and good practices in the codebase.
199
+ Write to .coverme/agents/POSITIVE.json
200
+ Return ONLY: "done"
813
201
  ```
814
202
 
815
203
  ---
816
204
 
817
- ## Phase 3: Cross-Validation (3 parallel validators)
818
-
819
- Launch 3 validators IN PARALLEL with `run_in_background: true`:
820
-
821
- ### Validator A: False Positive Hunter
822
- Review ALL findings. For each finding:
823
- 1. Read the actual code file
824
- 2. Check if there are mitigating controls elsewhere
825
- 3. For secrets: run "git ls-files <file>" - if not tracked, mark FALSE POSITIVE
826
- 4. Check if code is actually reachable in production
827
-
828
- Output: { confirmed: ["SEC-001",...], falsePositives: [{id, reason},...] }
829
-
830
- ### Validator B: Evidence Challenger
831
- Challenge every HIGH and CRITICAL finding:
832
- 1. Read the actual code with 20 lines of context
833
- 2. Trace data flow from source to sink
834
- 3. Check for sanitization/validation in between
835
- 4. Verify the exploit scenario is realistic
836
-
837
- Output: { confirmed: ["SEC-001",...], falsePositives: [{id, reason},...] }
838
-
839
- ### Validator C: Missing Issues Hunter
840
- Look for issues that Phase 1 agents MISSED:
841
- - Race conditions in critical operations
842
- - Business logic flaws specific to this application
843
- - Combination attacks (multiple low issues = high)
844
-
845
- Output: { missedIssues: [{full finding object},...] }
846
-
847
- ---
848
-
849
- ## Phase 4: Build Consensus
850
-
851
- Wait for all Phase 3 background validators to complete using `AgentOutputTool`.
205
+ ## Phase 2: Wait for Agents
852
206
 
853
- Combine all results:
854
- 1. Calculate confidence: (confirmations / validators) * 100
855
- 2. Remove findings with confidence < 50%
856
- 3. Add missed issues from Validator C
857
- 4. Remove mitigated and false positive findings
858
- 5. Identify positive observations (good patterns found)
207
+ Wait for ALL background agents using `AgentOutputTool`.
208
+ Each should return only "done" or "skipped".
859
209
 
860
210
  ---
861
211
 
862
- ## Phase 5: Generate Report
863
-
864
- **DO NOT ASK - JUST OVERWRITE THE FILE!**
865
-
866
- Update `.coverme/scan.json` with the full scan results including:
867
-
868
- ### Required Fields:
869
- - **projectName**: from package.json or folder name
870
- - **scanDate**: today's date
871
- - **filesScanned**: count of source files analyzed
872
- - **linesOfCode**: total lines in source files
873
- - **projectTree**: ASCII tree of main directories
874
-
875
- ### projectOverview:
876
- ```json
877
- {
878
- "name": "project-name",
879
- "type": "Backend API | Frontend SPA | Full-stack | CLI | Library",
880
- "stack": ["Node.js", "TypeScript", "React", "PostgreSQL"],
881
- "purpose": "Brief description of what this project does",
882
- "architecture": "Monolith | Microservices | Serverless",
883
- "keyComponents": ["auth service", "payment processing", "AI chat"]
884
- }
885
- ```
886
-
887
- ### architectureOverview:
888
- ```json
889
- {
890
- "components": [
891
- {"name": "API Server", "type": "service", "description": "Express.js REST API", "trustLevel": "semi-trusted"},
892
- {"name": "PostgreSQL", "type": "database", "description": "Primary data store", "trustLevel": "trusted"}
893
- ],
894
- "trustBoundaries": [
895
- {"name": "Client to API", "from": "Browser", "to": "API Server", "protocol": "HTTPS"}
896
- ],
897
- "criticalAssets": [
898
- {"name": "User Credentials", "type": "credential", "location": "PostgreSQL", "protection": "bcrypt hashed"}
899
- ],
900
- "dataFlows": ["User Authentication Flow", "Payment Processing Flow"]
901
- }
902
- ```
903
-
904
- ### executiveSummary:
905
- ```json
906
- {
907
- "headline": "3 Critical + 5 High findings require immediate attention",
908
- "riskLevel": "CRITICAL | HIGH | MEDIUM | LOW",
909
- "topRisks": ["SQL injection in user search", "Missing rate limiting"],
910
- "positives": ["Good authentication flow", "Proper input validation"],
911
- "recommendedActions": [
912
- {"priority": 1, "action": "Fix SQL injection", "owner": "developer", "effort": "1-2 hours"}
913
- ],
914
- "byOwner": {"developer": 5, "devops": 3, "architect": 1}
915
- }
916
- ```
212
+ ## Phase 3: Aggregate Results
917
213
 
918
- ### threatModel:
919
- ```json
920
- [
921
- {
922
- "id": "T-001",
923
- "threat": "SQL Injection via user input",
924
- "category": "STRIDE",
925
- "strideType": "T",
926
- "status": "open | partial | mitigated",
927
- "relatedFindings": ["SEC-001", "DB-002"],
928
- "mitigation": "Use parameterized queries",
929
- "dreadScore": 8.5
930
- }
931
- ]
932
- ```
214
+ Read all agent files and merge:
933
215
 
934
- ### qualityReview:
935
- ```json
936
- {
937
- "deleteItems": [
938
- {"type": "delete", "file": "src/utils/oldHelpers.ts", "lines": 250, "description": "Dead code", "reason": "No imports found"}
939
- ],
940
- "mergeItems": [
941
- {"type": "merge", "file": "src/utils/validate.ts, src/helpers/validation.ts", "description": "Overlapping functions", "reason": "DRY violation"}
942
- ],
943
- "simplifyItems": [
944
- {"type": "simplify", "file": "src/services/payment.ts", "lines": 450, "description": "Overly complex", "reason": "Can be reduced"}
945
- ],
946
- "totalLinesRemovable": 680,
947
- "percentageOfCodebase": 4.2
948
- }
216
+ ```bash
217
+ echo "Aggregating results..."
218
+ ls -la .coverme/agents/
949
219
  ```
950
220
 
951
- ### actionItems:
952
- ```json
953
- [
954
- {
955
- "id": "A-001",
956
- "title": "Fix SQL injection in user search",
957
- "priority": "immediate | high | medium | long-term",
958
- "relatedFindings": ["SEC-001"],
959
- "effort": "low | medium | high",
960
- "description": "Replace string concatenation with parameterized query"
961
- }
962
- ]
963
- ```
221
+ Use the Read tool to read each `.coverme/agents/*.json` file.
964
222
 
965
- ### findings:
966
- Each finding MUST include ALL these fields:
223
+ Merge all findings into `.coverme/scan.json`:
967
224
  ```json
968
225
  {
969
- "id": "SEC-001",
970
- "title": "SQL Injection in User Search",
971
- "severity": "critical | high | medium | low | info",
972
- "category": "security | auth | api | infra | data | ai | performance | business-logic | quality | testing",
973
- "file": "src/routes/users.ts",
974
- "line": 45,
975
- "code": "db.query(`SELECT * FROM users WHERE name LIKE '%${searchTerm}%'`)",
976
- "description": "User search parameter directly concatenated into SQL query",
977
- "impact": "Attacker can extract entire database contents",
978
- "attackChain": [
979
- {"step": 1, "action": "Send malicious search term", "result": "Query returns all users"},
980
- {"step": 2, "action": "Use UNION SELECT", "result": "Database schema exposed"}
981
- ],
982
- "recommendation": "Use parameterized queries",
983
- "cwe": "CWE-89",
984
- "owasp": "A03:2021",
985
- "dread": {
986
- "damage": 10,
987
- "reproducibility": 10,
988
- "exploitability": 9,
989
- "affectedUsers": 10,
990
- "discoverability": 8,
991
- "total": 9.4
992
- },
993
- "status": "open",
994
- "confidence": 95,
995
- "fixOwner": "developer | devops | architect",
996
- "fixType": "code | config | infrastructure | design"
226
+ "projectName": "...",
227
+ "scanDate": "...",
228
+ "filesScanned": N,
229
+ "linesOfCode": N,
230
+ "findings": [...all from agent files...],
231
+ "positiveObservations": [...from POSITIVE.json...],
232
+ "summary": {"critical":N,"high":N,"medium":N,"low":N}
997
233
  }
998
234
  ```
999
235
 
1000
- ### Other sections:
1001
- - **designDecisions**: Intentional patterns that look like bugs
1002
- - **mitigatedFindings**: Findings with existing protection
1003
- - **falsePositives**: Findings that are not actually vulnerabilities
1004
- - **positiveObservations**: Good practices found
1005
- - **validationSummary**: Stats on mitigation validation
1006
- - **summary**: Total counts by severity
1007
- - **agentsUsed**: List of agents that ran
1008
- - **scanDuration**: Time taken in ms
1009
-
1010
- Use the Write tool to overwrite `.coverme/scan.json` with the results.
1011
-
1012
236
  ---
1013
237
 
1014
- ## Phase 6: Generate HTML Report
238
+ ## Phase 4: Generate Report
1015
239
 
1016
- **DO NOT ASK - JUST RUN THE COMMANDS!**
1017
-
1018
- Generate the HTML report and open it automatically:
1019
240
  ```bash
1020
241
  TIMESTAMP=$(date +%Y-%m-%d_%H-%M-%S)
1021
242
  npx coverme-scanner report .coverme/scan.json -f html -o ".coverme/report_$TIMESTAMP.html"
1022
- cp .coverme/scan.json ".coverme/scan_$TIMESTAMP.json"
1023
243
  open ".coverme/report_$TIMESTAMP.html"
1024
244
  ```
1025
245
 
1026
- Run these commands without asking for permission.
1027
-
1028
246
  ---
1029
247
 
1030
248
  ## DONE
1031
249
 
1032
- Tell the user: "Scan complete! Report saved to .coverme/ and opened in browser."
1033
-
1034
- **REMINDER: You should have completed all 6 phases without asking ANY questions or stopping for confirmation.**
250
+ Tell user: "Scan complete! Report opened."
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "coverme-scanner",
3
- "version": "1.5.2",
3
+ "version": "1.6.0",
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
6
  "files": [