coverme-scanner 1.0.12 → 1.0.14
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/.claude/commands/coverme.md +501 -0
- package/dist/cli/init.js +1 -1
- package/dist/prompts/architecture-reviewer.md +2 -0
- package/dist/prompts/consensus-builder.md +2 -0
- package/dist/prompts/context-discovery.md +2 -0
- package/dist/prompts/cross-validator.md +2 -0
- package/dist/prompts/deep-dive-expert.md +2 -0
- package/dist/prompts/dependency-auditor.md +2 -0
- package/dist/prompts/orchestration.md +2 -0
- package/dist/prompts/performance-hunter.md +2 -0
- package/dist/prompts/quality-analyzer.md +2 -0
- package/dist/prompts/security-scanner.md +2 -0
- package/package.json +1 -1
- package/src/cli/init.ts +1 -1
- package/src/prompts/architecture-reviewer.md +2 -0
- package/src/prompts/consensus-builder.md +2 -0
- package/src/prompts/context-discovery.md +2 -0
- package/src/prompts/cross-validator.md +2 -0
- package/src/prompts/deep-dive-expert.md +2 -0
- package/src/prompts/dependency-auditor.md +2 -0
- package/src/prompts/orchestration.md +2 -0
- package/src/prompts/performance-hunter.md +2 -0
- package/src/prompts/quality-analyzer.md +2 -0
- package/src/prompts/security-scanner.md +2 -0
- package/test-new.html +1582 -0
|
@@ -0,0 +1,501 @@
|
|
|
1
|
+
# CoverMe - Ultimate AI Security Scanner
|
|
2
|
+
|
|
3
|
+
The most comprehensive AI-powered code scanner. 10 specialized agents + 3 validators + deep analysis.
|
|
4
|
+
|
|
5
|
+
$ARGUMENTS
|
|
6
|
+
|
|
7
|
+
## IMPORTANT: Execute ALL phases automatically. Do NOT stop until the HTML report is open.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Phase 1: Discovery (10 parallel agents)
|
|
12
|
+
|
|
13
|
+
Launch ALL 10 agents IN PARALLEL using the Task tool with subagent_type="Explore":
|
|
14
|
+
|
|
15
|
+
### Agent 1: Security Scanner (Core)
|
|
16
|
+
```
|
|
17
|
+
Scan for OWASP Top 10 and common vulnerabilities:
|
|
18
|
+
|
|
19
|
+
INJECTION:
|
|
20
|
+
- SQL injection (string concatenation in queries, raw queries)
|
|
21
|
+
- NoSQL injection (MongoDB $where, $regex with user input)
|
|
22
|
+
- Command injection (exec, spawn, system with user input)
|
|
23
|
+
- LDAP injection, XPath injection
|
|
24
|
+
- Template injection (SSTI in Jinja2, EJS, Handlebars)
|
|
25
|
+
- Header injection (CRLF in headers)
|
|
26
|
+
- Log injection (unescaped user input in logs)
|
|
27
|
+
|
|
28
|
+
XSS:
|
|
29
|
+
- Reflected XSS (user input in response without encoding)
|
|
30
|
+
- Stored XSS (database content rendered without escaping)
|
|
31
|
+
- DOM XSS (innerHTML, document.write, eval with user data)
|
|
32
|
+
- dangerouslySetInnerHTML in React without sanitization
|
|
33
|
+
|
|
34
|
+
AUTHENTICATION:
|
|
35
|
+
- Hardcoded credentials (check git ls-files first!)
|
|
36
|
+
- Weak password policies (no complexity, short length)
|
|
37
|
+
- Missing rate limiting on login/register
|
|
38
|
+
- Session fixation (session ID not rotated after login)
|
|
39
|
+
- JWT issues (none algorithm, weak secret, no expiry)
|
|
40
|
+
- Missing MFA on sensitive operations
|
|
41
|
+
|
|
42
|
+
AUTHORIZATION:
|
|
43
|
+
- IDOR (direct object references without ownership check)
|
|
44
|
+
- Missing authorization checks on endpoints
|
|
45
|
+
- Privilege escalation paths
|
|
46
|
+
- Horizontal access (user A accessing user B's data)
|
|
47
|
+
- Vertical access (user accessing admin functions)
|
|
48
|
+
|
|
49
|
+
CRYPTOGRAPHY:
|
|
50
|
+
- MD5/SHA1 for passwords (use bcrypt/argon2)
|
|
51
|
+
- Math.random() for security (use crypto.randomBytes)
|
|
52
|
+
- Hardcoded encryption keys/IVs
|
|
53
|
+
- ECB mode usage
|
|
54
|
+
- Missing HTTPS enforcement
|
|
55
|
+
|
|
56
|
+
Output JSON: [{id: "SEC-XXX", title, severity, category: "security", file, line, code, description, recommendation, confidence}]
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Agent 2: Auth & Session Scanner
|
|
60
|
+
```
|
|
61
|
+
Deep dive into authentication and session management:
|
|
62
|
+
|
|
63
|
+
SSO/OAUTH:
|
|
64
|
+
- Open redirect in return_url/redirect_uri (CRITICAL!)
|
|
65
|
+
- State parameter missing or predictable
|
|
66
|
+
- PKCE not implemented for public clients
|
|
67
|
+
- Token stored in localStorage (XSS vulnerable)
|
|
68
|
+
- Refresh token rotation missing
|
|
69
|
+
- ID token validation incomplete
|
|
70
|
+
|
|
71
|
+
SESSION:
|
|
72
|
+
- Session ID in URL
|
|
73
|
+
- Session not invalidated on logout
|
|
74
|
+
- Session timeout too long (>24h)
|
|
75
|
+
- Same session across devices without tracking
|
|
76
|
+
- Session data not encrypted
|
|
77
|
+
|
|
78
|
+
COOKIES:
|
|
79
|
+
- Missing Secure flag
|
|
80
|
+
- Missing HttpOnly flag
|
|
81
|
+
- Missing SameSite attribute
|
|
82
|
+
- Overly broad domain/path
|
|
83
|
+
- Sensitive data in cookies
|
|
84
|
+
|
|
85
|
+
PASSWORD RESET:
|
|
86
|
+
- Predictable reset tokens
|
|
87
|
+
- Token not expiring
|
|
88
|
+
- No rate limiting on reset requests
|
|
89
|
+
- User enumeration via reset flow
|
|
90
|
+
- Reset link not single-use
|
|
91
|
+
|
|
92
|
+
Output JSON: [{id: "AUTH-XXX", title, severity, category: "security", file, line, code, description, recommendation, confidence}]
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Agent 3: API Security Scanner
|
|
96
|
+
```
|
|
97
|
+
Scan API endpoints for security issues:
|
|
98
|
+
|
|
99
|
+
INPUT VALIDATION:
|
|
100
|
+
- Missing input validation on request body
|
|
101
|
+
- Type coercion attacks (string vs number)
|
|
102
|
+
- Array/object pollution
|
|
103
|
+
- Prototype pollution
|
|
104
|
+
- Mass assignment vulnerabilities
|
|
105
|
+
- GraphQL introspection enabled in production
|
|
106
|
+
- GraphQL depth/complexity limits missing
|
|
107
|
+
|
|
108
|
+
RATE LIMITING:
|
|
109
|
+
- No rate limiting on expensive operations
|
|
110
|
+
- Rate limit bypass via headers (X-Forwarded-For)
|
|
111
|
+
- Missing rate limiting on auth endpoints
|
|
112
|
+
- No account lockout after failed attempts
|
|
113
|
+
|
|
114
|
+
API DESIGN:
|
|
115
|
+
- Verbose error messages leaking internals
|
|
116
|
+
- Stack traces in production
|
|
117
|
+
- Version information exposed
|
|
118
|
+
- Debug endpoints accessible
|
|
119
|
+
- CORS misconfiguration (wildcard origin with credentials)
|
|
120
|
+
- Missing security headers (CSP, HSTS, X-Frame-Options)
|
|
121
|
+
|
|
122
|
+
WEBHOOKS:
|
|
123
|
+
- Webhook signature not verified
|
|
124
|
+
- SSRF via webhook URLs
|
|
125
|
+
- No webhook replay protection
|
|
126
|
+
- Webhook secrets logged
|
|
127
|
+
|
|
128
|
+
Output JSON: [{id: "API-XXX", title, severity, category: "security", file, line, code, description, recommendation, confidence}]
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Agent 4: Infrastructure Scanner
|
|
132
|
+
```
|
|
133
|
+
Scan infrastructure and deployment configs:
|
|
134
|
+
|
|
135
|
+
DOCKER:
|
|
136
|
+
- Running as root user
|
|
137
|
+
- Secrets in Dockerfile or build args
|
|
138
|
+
- Latest tag usage (unpinned versions)
|
|
139
|
+
- Sensitive ports exposed
|
|
140
|
+
- Missing health checks
|
|
141
|
+
- No resource limits
|
|
142
|
+
- Privileged mode enabled
|
|
143
|
+
- Writable root filesystem
|
|
144
|
+
|
|
145
|
+
KUBERNETES/HELM:
|
|
146
|
+
- No resource limits/requests
|
|
147
|
+
- Running as root
|
|
148
|
+
- Privileged containers
|
|
149
|
+
- Host network/PID enabled
|
|
150
|
+
- Missing network policies
|
|
151
|
+
- Secrets not encrypted at rest
|
|
152
|
+
- No pod security policies/standards
|
|
153
|
+
- Service account auto-mount enabled
|
|
154
|
+
|
|
155
|
+
CI/CD:
|
|
156
|
+
- Secrets in CI config files
|
|
157
|
+
- Credentials in environment variables logged
|
|
158
|
+
- Missing secret scanning in pipeline
|
|
159
|
+
- Deploy keys with write access
|
|
160
|
+
- No branch protection
|
|
161
|
+
- Missing SAST/DAST in pipeline
|
|
162
|
+
|
|
163
|
+
CLOUD:
|
|
164
|
+
- S3 buckets public or misconfigured
|
|
165
|
+
- IAM roles too permissive
|
|
166
|
+
- Security groups too open
|
|
167
|
+
- Logging not enabled
|
|
168
|
+
- Encryption at rest disabled
|
|
169
|
+
|
|
170
|
+
Output JSON: [{id: "INFRA-XXX", title, severity, category: "infrastructure", file, line, code, description, recommendation, confidence}]
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Agent 5: Data & Privacy Scanner
|
|
174
|
+
```
|
|
175
|
+
Scan for data protection and privacy issues:
|
|
176
|
+
|
|
177
|
+
PII HANDLING:
|
|
178
|
+
- PII logged (emails, names, IPs, phone numbers)
|
|
179
|
+
- PII in URLs/query strings
|
|
180
|
+
- PII in error messages
|
|
181
|
+
- PII not encrypted at rest
|
|
182
|
+
- PII not masked in UI/logs
|
|
183
|
+
|
|
184
|
+
GDPR/PRIVACY:
|
|
185
|
+
- Missing data retention policy implementation
|
|
186
|
+
- No data deletion mechanism (right to erasure)
|
|
187
|
+
- No data export mechanism (data portability)
|
|
188
|
+
- Consent not tracked properly
|
|
189
|
+
- Third-party data sharing without consent
|
|
190
|
+
- Cross-border data transfer issues
|
|
191
|
+
|
|
192
|
+
DATABASE:
|
|
193
|
+
- Sensitive data not encrypted (column-level)
|
|
194
|
+
- No audit logging for sensitive operations
|
|
195
|
+
- Backup not encrypted
|
|
196
|
+
- Connection strings with credentials in code
|
|
197
|
+
|
|
198
|
+
SECRETS:
|
|
199
|
+
- API keys in code (check git ls-files!)
|
|
200
|
+
- Secrets in environment files committed
|
|
201
|
+
- Secrets logged
|
|
202
|
+
- Secrets in client-side code
|
|
203
|
+
- Hardcoded tokens/passwords
|
|
204
|
+
- .env files not in .gitignore
|
|
205
|
+
|
|
206
|
+
Output JSON: [{id: "DATA-XXX", title, severity, category: "privacy", file, line, code, description, recommendation, confidence}]
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### Agent 6: AI/LLM Security Scanner
|
|
210
|
+
```
|
|
211
|
+
Scan for AI/LLM specific vulnerabilities:
|
|
212
|
+
|
|
213
|
+
PROMPT INJECTION:
|
|
214
|
+
- User input directly in prompts without sanitization
|
|
215
|
+
- System prompts exposed to users
|
|
216
|
+
- Prompt leakage via error messages
|
|
217
|
+
- No input length limits on prompts
|
|
218
|
+
- Missing output validation from LLM
|
|
219
|
+
- Jailbreak vulnerabilities
|
|
220
|
+
|
|
221
|
+
DATA LEAKAGE:
|
|
222
|
+
- Training data in responses
|
|
223
|
+
- PII in AI context
|
|
224
|
+
- Conversation history not cleared
|
|
225
|
+
- AI accessing unauthorized data
|
|
226
|
+
- Model output not sanitized
|
|
227
|
+
|
|
228
|
+
SUPPLY CHAIN:
|
|
229
|
+
- CDN imports without Subresource Integrity (SRI)
|
|
230
|
+
- Unpinned AI model versions
|
|
231
|
+
- External AI APIs without TLS verification
|
|
232
|
+
- Model files from untrusted sources
|
|
233
|
+
|
|
234
|
+
RESOURCE:
|
|
235
|
+
- No token limits on AI calls
|
|
236
|
+
- Missing rate limiting on AI endpoints
|
|
237
|
+
- Cost explosion attacks (large inputs)
|
|
238
|
+
- Denial of service via AI
|
|
239
|
+
|
|
240
|
+
BUSINESS LOGIC:
|
|
241
|
+
- AI bypassing business rules
|
|
242
|
+
- AI making unauthorized decisions
|
|
243
|
+
- Content filter bypasses
|
|
244
|
+
- AI output directly executed (code injection)
|
|
245
|
+
|
|
246
|
+
Output JSON: [{id: "AI-XXX", title, severity, category: "ai-security", file, line, code, description, recommendation, confidence}]
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
### Agent 7: Performance & DoS Scanner
|
|
250
|
+
```
|
|
251
|
+
Scan for performance issues and DoS vectors:
|
|
252
|
+
|
|
253
|
+
DATABASE:
|
|
254
|
+
- N+1 query patterns
|
|
255
|
+
- Missing indexes on filtered/sorted columns
|
|
256
|
+
- Full table scans
|
|
257
|
+
- Unbounded queries (no LIMIT)
|
|
258
|
+
- Connection pool exhaustion
|
|
259
|
+
- Long-running transactions
|
|
260
|
+
|
|
261
|
+
MEMORY:
|
|
262
|
+
- Memory leaks (event listeners not removed)
|
|
263
|
+
- Unbounded caches
|
|
264
|
+
- Large object accumulation
|
|
265
|
+
- Buffer handling issues
|
|
266
|
+
- Stream not properly closed
|
|
267
|
+
- SSE/WebSocket buffer accumulation
|
|
268
|
+
|
|
269
|
+
CPU:
|
|
270
|
+
- ReDoS (Regular Expression DoS)
|
|
271
|
+
- Algorithmic complexity attacks
|
|
272
|
+
- Synchronous crypto operations
|
|
273
|
+
- JSON parsing of large payloads
|
|
274
|
+
- XML parsing without limits (billion laughs)
|
|
275
|
+
|
|
276
|
+
NETWORK:
|
|
277
|
+
- No timeout on external calls
|
|
278
|
+
- Missing circuit breakers
|
|
279
|
+
- Retry storms
|
|
280
|
+
- No backpressure handling
|
|
281
|
+
- Connection leaks
|
|
282
|
+
|
|
283
|
+
RESOURCE EXHAUSTION:
|
|
284
|
+
- File upload without size limits
|
|
285
|
+
- Zip bomb potential
|
|
286
|
+
- Unbounded pagination
|
|
287
|
+
- Missing request size limits
|
|
288
|
+
- Too many concurrent connections
|
|
289
|
+
|
|
290
|
+
Output JSON: [{id: "PERF-XXX", title, severity, category: "performance", file, line, code, description, recommendation, confidence}]
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
### Agent 8: Business Logic Scanner
|
|
294
|
+
```
|
|
295
|
+
Scan for business logic vulnerabilities:
|
|
296
|
+
|
|
297
|
+
RACE CONDITIONS:
|
|
298
|
+
- TOCTOU (time-of-check-time-of-use)
|
|
299
|
+
- Double-spend in transactions
|
|
300
|
+
- Inventory overselling
|
|
301
|
+
- Concurrent booking conflicts
|
|
302
|
+
- Non-atomic read-modify-write
|
|
303
|
+
|
|
304
|
+
WORKFLOW:
|
|
305
|
+
- Step skipping in multi-step processes
|
|
306
|
+
- State manipulation attacks
|
|
307
|
+
- Order of operations bypass
|
|
308
|
+
- Workflow replay attacks
|
|
309
|
+
|
|
310
|
+
FINANCIAL:
|
|
311
|
+
- Rounding errors in calculations
|
|
312
|
+
- Currency handling issues
|
|
313
|
+
- Negative amount bypass
|
|
314
|
+
- Discount stacking exploits
|
|
315
|
+
- Price manipulation
|
|
316
|
+
|
|
317
|
+
ACCESS CONTROL:
|
|
318
|
+
- Role hierarchy bypass
|
|
319
|
+
- Feature flag manipulation
|
|
320
|
+
- Subscription level bypass
|
|
321
|
+
- Time-based access bypass
|
|
322
|
+
|
|
323
|
+
DATA INTEGRITY:
|
|
324
|
+
- Missing referential integrity
|
|
325
|
+
- Orphaned records possible
|
|
326
|
+
- Data inconsistency between services
|
|
327
|
+
- Missing transaction boundaries
|
|
328
|
+
|
|
329
|
+
Output JSON: [{id: "BIZ-XXX", title, severity, category: "business-logic", file, line, code, description, recommendation, confidence}]
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
### Agent 9: Code Quality Scanner
|
|
333
|
+
```
|
|
334
|
+
Scan for code quality and maintainability issues:
|
|
335
|
+
|
|
336
|
+
COMPLEXITY:
|
|
337
|
+
- Cyclomatic complexity > 10
|
|
338
|
+
- Functions > 50 lines
|
|
339
|
+
- Files > 500 lines
|
|
340
|
+
- Deep nesting (> 4 levels)
|
|
341
|
+
- Too many parameters (> 5)
|
|
342
|
+
|
|
343
|
+
DRY VIOLATIONS:
|
|
344
|
+
- Duplicated code blocks (> 10 lines)
|
|
345
|
+
- Copy-paste code with minor changes
|
|
346
|
+
- Similar functions that should be unified
|
|
347
|
+
|
|
348
|
+
ANTI-PATTERNS:
|
|
349
|
+
- God objects/classes
|
|
350
|
+
- Callback hell
|
|
351
|
+
- Magic numbers/strings
|
|
352
|
+
- Dead code
|
|
353
|
+
- Unused imports/variables
|
|
354
|
+
- Any type overuse (TypeScript)
|
|
355
|
+
- Console.log in production
|
|
356
|
+
- TODO/FIXME comments in production
|
|
357
|
+
|
|
358
|
+
ERROR HANDLING:
|
|
359
|
+
- Empty catch blocks
|
|
360
|
+
- Generic error swallowing
|
|
361
|
+
- Missing error boundaries (React)
|
|
362
|
+
- Unhandled promise rejections
|
|
363
|
+
- Missing finally blocks for cleanup
|
|
364
|
+
|
|
365
|
+
NAMING:
|
|
366
|
+
- Inconsistent naming conventions
|
|
367
|
+
- Misleading names
|
|
368
|
+
- Single letter variables (except i,j,k)
|
|
369
|
+
- Abbreviations without context
|
|
370
|
+
|
|
371
|
+
Output JSON: [{id: "QUAL-XXX", title, severity, category: "quality", file, line, code, description, recommendation, confidence}]
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
### Agent 10: Testing & Reliability Scanner
|
|
375
|
+
```
|
|
376
|
+
Scan for testing gaps and reliability issues:
|
|
377
|
+
|
|
378
|
+
TEST COVERAGE:
|
|
379
|
+
- Critical paths without tests (auth, payments, data access)
|
|
380
|
+
- Error handlers not tested
|
|
381
|
+
- Edge cases not covered
|
|
382
|
+
- No integration tests
|
|
383
|
+
- No E2E tests for main flows
|
|
384
|
+
|
|
385
|
+
TEST QUALITY:
|
|
386
|
+
- Tests without assertions
|
|
387
|
+
- Mocked security checks (dangerous!)
|
|
388
|
+
- Flaky tests (time-dependent)
|
|
389
|
+
- Tests with hardcoded data that can expire
|
|
390
|
+
- Missing negative tests (what should fail)
|
|
391
|
+
|
|
392
|
+
RELIABILITY:
|
|
393
|
+
- Missing health checks
|
|
394
|
+
- No graceful shutdown
|
|
395
|
+
- Missing readiness/liveness probes
|
|
396
|
+
- No circuit breakers for external calls
|
|
397
|
+
- Missing retry logic with backoff
|
|
398
|
+
- No fallback mechanisms
|
|
399
|
+
|
|
400
|
+
OBSERVABILITY:
|
|
401
|
+
- Missing structured logging
|
|
402
|
+
- No correlation IDs
|
|
403
|
+
- Missing metrics collection
|
|
404
|
+
- No distributed tracing
|
|
405
|
+
- Errors not properly categorized
|
|
406
|
+
|
|
407
|
+
DEPLOYMENT:
|
|
408
|
+
- No feature flags for risky changes
|
|
409
|
+
- Missing rollback mechanism
|
|
410
|
+
- No canary/blue-green deployment
|
|
411
|
+
- Database migrations not reversible
|
|
412
|
+
|
|
413
|
+
Output JSON: [{id: "TEST-XXX", title, severity, category: "testing", file, line, code, description, recommendation, confidence}]
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
---
|
|
417
|
+
|
|
418
|
+
## Phase 2: Cross-Validation (3 parallel validators)
|
|
419
|
+
|
|
420
|
+
After ALL Phase 1 agents complete, launch 3 validators IN PARALLEL:
|
|
421
|
+
|
|
422
|
+
### Validator A: False Positive Hunter
|
|
423
|
+
```
|
|
424
|
+
Review ALL findings from Phase 1. For each finding:
|
|
425
|
+
1. Read the actual code file
|
|
426
|
+
2. Check if there are mitigating controls elsewhere
|
|
427
|
+
3. For secrets: run "git ls-files <file>" - if not tracked, mark FALSE POSITIVE
|
|
428
|
+
4. Check if code is actually reachable in production
|
|
429
|
+
5. Verify the context (is it test code? example code? disabled feature?)
|
|
430
|
+
|
|
431
|
+
Output: { confirmed: ["SEC-001",...], falsePositives: [{id, reason},...] }
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
### Validator B: Evidence Challenger
|
|
435
|
+
```
|
|
436
|
+
Challenge every HIGH and CRITICAL finding:
|
|
437
|
+
1. Read the actual code with 20 lines of context
|
|
438
|
+
2. Trace data flow from source to sink
|
|
439
|
+
3. Check for sanitization/validation in between
|
|
440
|
+
4. Verify the exploit scenario is realistic
|
|
441
|
+
5. Consider the deployment environment
|
|
442
|
+
6. Check if it's actually exploitable in production
|
|
443
|
+
|
|
444
|
+
Output: { confirmed: ["SEC-001",...], falsePositives: [{id, reason},...] }
|
|
445
|
+
```
|
|
446
|
+
|
|
447
|
+
### Validator C: Missing Issues Hunter
|
|
448
|
+
```
|
|
449
|
+
Look for issues that Phase 1 agents MISSED:
|
|
450
|
+
- Race conditions in critical operations
|
|
451
|
+
- Business logic flaws specific to this application
|
|
452
|
+
- Edge cases (empty input, null, undefined, max length)
|
|
453
|
+
- Integration point vulnerabilities
|
|
454
|
+
- Configuration issues for specific environment
|
|
455
|
+
- Combination attacks (multiple low issues = high)
|
|
456
|
+
|
|
457
|
+
Output: { missedIssues: [{id, title, severity, file, line, description, recommendation},...] }
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
---
|
|
461
|
+
|
|
462
|
+
## Phase 3: Build Consensus
|
|
463
|
+
|
|
464
|
+
Combine all results:
|
|
465
|
+
1. Calculate confidence: (confirmations / validators) * 100
|
|
466
|
+
2. Remove findings with confidence < 50%
|
|
467
|
+
3. Add missed issues from Validator C
|
|
468
|
+
4. Identify positive observations (good patterns found)
|
|
469
|
+
|
|
470
|
+
---
|
|
471
|
+
|
|
472
|
+
## Phase 4: Generate Report
|
|
473
|
+
|
|
474
|
+
Update the existing `.coverme/scan.json` file with the scan results. The file already exists with the correct structure - just fill in the values:
|
|
475
|
+
|
|
476
|
+
- **projectName**: from package.json or folder name
|
|
477
|
+
- **scanDate**: today's date
|
|
478
|
+
- **findings**: array of issues found (each with id, title, severity, category, file, line, description, code, recommendation, confidence)
|
|
479
|
+
- **positiveObservations**: array of good patterns found
|
|
480
|
+
- **scanDuration**: time taken in ms
|
|
481
|
+
- **agentCount**: 7
|
|
482
|
+
|
|
483
|
+
Use the Edit tool to update `.coverme/scan.json` with the results.
|
|
484
|
+
|
|
485
|
+
---
|
|
486
|
+
|
|
487
|
+
## Phase 5: Generate HTML Report
|
|
488
|
+
|
|
489
|
+
Generate the HTML report and open it:
|
|
490
|
+
```bash
|
|
491
|
+
TIMESTAMP=$(date +%Y-%m-%d_%H-%M-%S)
|
|
492
|
+
npx coverme-scanner report .coverme/scan.json -f html -o ".coverme/report_$TIMESTAMP.html"
|
|
493
|
+
cp .coverme/scan.json ".coverme/scan_$TIMESTAMP.json"
|
|
494
|
+
open ".coverme/report_$TIMESTAMP.html"
|
|
495
|
+
```
|
|
496
|
+
|
|
497
|
+
---
|
|
498
|
+
|
|
499
|
+
## DONE
|
|
500
|
+
|
|
501
|
+
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."
|
package/dist/cli/init.js
CHANGED
|
@@ -528,7 +528,7 @@ Use the Edit tool to update \`.coverme/scan.json\` with the results.
|
|
|
528
528
|
Generate the HTML report and open it:
|
|
529
529
|
\`\`\`bash
|
|
530
530
|
TIMESTAMP=$(date +%Y-%m-%d_%H-%M-%S)
|
|
531
|
-
npx coverme-scanner report .coverme/scan.json -f html -o ".coverme/report_$TIMESTAMP.html"
|
|
531
|
+
npx --yes coverme-scanner@latest report .coverme/scan.json -f html -o ".coverme/report_$TIMESTAMP.html"
|
|
532
532
|
cp .coverme/scan.json ".coverme/scan_$TIMESTAMP.json"
|
|
533
533
|
open ".coverme/report_$TIMESTAMP.html"
|
|
534
534
|
\`\`\`
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Architecture Reviewer Agent
|
|
2
2
|
|
|
3
|
+
**Ultrathink** - Map the entire system architecture, identify all dependencies and boundaries.
|
|
4
|
+
|
|
3
5
|
You are a senior software architect reviewing a codebase for architectural issues. Your job is to identify structural problems that affect scalability, maintainability, and system integrity.
|
|
4
6
|
|
|
5
7
|
## Prerequisites
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Consensus Builder Agent
|
|
2
2
|
|
|
3
|
+
**Ultrathink** - Weigh all evidence, resolve conflicts, ensure accuracy.
|
|
4
|
+
|
|
3
5
|
You are the final aggregator. Your job is to combine ALL findings from all phases and produce the FINAL list of findings with confidence scores.
|
|
4
6
|
|
|
5
7
|
## Input You Receive
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Cross-Validator Agent
|
|
2
2
|
|
|
3
|
+
**Ultrathink** - Question every assumption, verify every claim, trace every code path.
|
|
4
|
+
|
|
3
5
|
You are a critical reviewer whose job is to CHALLENGE findings from other agents. Your goal is to eliminate FALSE POSITIVES and find MISSED ISSUES.
|
|
4
6
|
|
|
5
7
|
## Your Role
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Deep Dive Expert Agent
|
|
2
2
|
|
|
3
|
+
**Ultrathink** - Exhaust every possibility, trace every edge case, leave no stone unturned.
|
|
4
|
+
|
|
3
5
|
You are called in when validators DISAGREE about a finding. Your job is to perform exhaustive analysis and make the FINAL determination.
|
|
4
6
|
|
|
5
7
|
## When You're Called
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Dependency Auditor Agent
|
|
2
2
|
|
|
3
|
+
**Ultrathink** - Check every dependency, trace transitive deps, verify all versions.
|
|
4
|
+
|
|
3
5
|
You are a dependency security expert. Your job is to identify ALL issues with project dependencies including security vulnerabilities, outdated packages, and compliance risks.
|
|
4
6
|
|
|
5
7
|
## Prerequisites
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Performance Hunter Agent
|
|
2
2
|
|
|
3
|
+
**Ultrathink** - Profile every hot path, analyze every query, find every bottleneck.
|
|
4
|
+
|
|
3
5
|
You are a performance engineering expert. Your job is to identify ALL performance issues, bottlenecks, and inefficiencies in the codebase.
|
|
4
6
|
|
|
5
7
|
## Prerequisites
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Quality Analyzer Agent
|
|
2
2
|
|
|
3
|
+
**Ultrathink** - Analyze patterns, find duplications, trace dead code paths thoroughly.
|
|
4
|
+
|
|
3
5
|
You are an expert code quality reviewer. Your job is to find ALL code quality issues that impact maintainability, reliability, and developer experience.
|
|
4
6
|
|
|
5
7
|
## Prerequisites
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Security Scanner Agent
|
|
2
2
|
|
|
3
|
+
**Ultrathink** - Trace every data flow from source to sink. Consider all attack vectors.
|
|
4
|
+
|
|
3
5
|
You are an expert security researcher performing a comprehensive security audit. Your task is to find ALL security vulnerabilities in this codebase with zero false negatives.
|
|
4
6
|
|
|
5
7
|
## Scan Methodology
|
package/package.json
CHANGED
package/src/cli/init.ts
CHANGED
|
@@ -497,7 +497,7 @@ Use the Edit tool to update \`.coverme/scan.json\` with the results.
|
|
|
497
497
|
Generate the HTML report and open it:
|
|
498
498
|
\`\`\`bash
|
|
499
499
|
TIMESTAMP=$(date +%Y-%m-%d_%H-%M-%S)
|
|
500
|
-
npx coverme-scanner report .coverme/scan.json -f html -o ".coverme/report_$TIMESTAMP.html"
|
|
500
|
+
npx --yes coverme-scanner@latest report .coverme/scan.json -f html -o ".coverme/report_$TIMESTAMP.html"
|
|
501
501
|
cp .coverme/scan.json ".coverme/scan_$TIMESTAMP.json"
|
|
502
502
|
open ".coverme/report_$TIMESTAMP.html"
|
|
503
503
|
\`\`\`
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Architecture Reviewer Agent
|
|
2
2
|
|
|
3
|
+
**Ultrathink** - Map the entire system architecture, identify all dependencies and boundaries.
|
|
4
|
+
|
|
3
5
|
You are a senior software architect reviewing a codebase for architectural issues. Your job is to identify structural problems that affect scalability, maintainability, and system integrity.
|
|
4
6
|
|
|
5
7
|
## Prerequisites
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Consensus Builder Agent
|
|
2
2
|
|
|
3
|
+
**Ultrathink** - Weigh all evidence, resolve conflicts, ensure accuracy.
|
|
4
|
+
|
|
3
5
|
You are the final aggregator. Your job is to combine ALL findings from all phases and produce the FINAL list of findings with confidence scores.
|
|
4
6
|
|
|
5
7
|
## Input You Receive
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Cross-Validator Agent
|
|
2
2
|
|
|
3
|
+
**Ultrathink** - Question every assumption, verify every claim, trace every code path.
|
|
4
|
+
|
|
3
5
|
You are a critical reviewer whose job is to CHALLENGE findings from other agents. Your goal is to eliminate FALSE POSITIVES and find MISSED ISSUES.
|
|
4
6
|
|
|
5
7
|
## Your Role
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Deep Dive Expert Agent
|
|
2
2
|
|
|
3
|
+
**Ultrathink** - Exhaust every possibility, trace every edge case, leave no stone unturned.
|
|
4
|
+
|
|
3
5
|
You are called in when validators DISAGREE about a finding. Your job is to perform exhaustive analysis and make the FINAL determination.
|
|
4
6
|
|
|
5
7
|
## When You're Called
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Dependency Auditor Agent
|
|
2
2
|
|
|
3
|
+
**Ultrathink** - Check every dependency, trace transitive deps, verify all versions.
|
|
4
|
+
|
|
3
5
|
You are a dependency security expert. Your job is to identify ALL issues with project dependencies including security vulnerabilities, outdated packages, and compliance risks.
|
|
4
6
|
|
|
5
7
|
## Prerequisites
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Performance Hunter Agent
|
|
2
2
|
|
|
3
|
+
**Ultrathink** - Profile every hot path, analyze every query, find every bottleneck.
|
|
4
|
+
|
|
3
5
|
You are a performance engineering expert. Your job is to identify ALL performance issues, bottlenecks, and inefficiencies in the codebase.
|
|
4
6
|
|
|
5
7
|
## Prerequisites
|