coverme-scanner 1.0.6 → 1.0.8

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/dist/cli/index.js CHANGED
@@ -5,11 +5,14 @@ const commander_1 = require("commander");
5
5
  const init_js_1 = require("./init.js");
6
6
  const scan_js_1 = require("./scan.js");
7
7
  const index_js_1 = require("../report/index.js");
8
+ const fs_1 = require("fs");
9
+ const path_1 = require("path");
10
+ const pkg = JSON.parse((0, fs_1.readFileSync)((0, path_1.join)(__dirname, '..', '..', 'package.json'), 'utf-8'));
8
11
  const program = new commander_1.Command();
9
12
  program
10
- .name('vibecode')
13
+ .name('coverme')
11
14
  .description('AI-powered code scanner with multi-agent verification for Claude Code')
12
- .version('1.0.0');
15
+ .version(pkg.version);
13
16
  program
14
17
  .command('init')
15
18
  .description('Install vibecode slash commands into .claude/commands/')
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";;;AAEA,yCAAoC;AACpC,uCAAiC;AACjC,uCAAiC;AACjC,iDAAoD;AAEpD,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,UAAU,CAAC;KAChB,WAAW,CAAC,uEAAuE,CAAC;KACpF,OAAO,CAAC,OAAO,CAAC,CAAC;AAEpB,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,CAAC;KAC5E,MAAM,CAAC,0BAA0B,EAAE,kBAAkB,CAAC;KACtD,MAAM,CAAC,yBAAyB,EAAE,qDAAqD,EAAE,KAAK,CAAC;KAC/F,MAAM,CAAC,wBAAwB,EAAE,iDAAiD,EAAE,KAAK,CAAC;KAC1F,MAAM,CAAC,eAAe,EAAE,gBAAgB,CAAC;KACzC,MAAM,CAAC,sBAAsB,EAAE,2BAA2B,EAAE,GAAG,CAAC;KAChE,MAAM,CAAC,cAAI,CAAC,CAAC;AAEhB,OAAO;KACJ,OAAO,CAAC,QAAQ,CAAC;KACjB,WAAW,CAAC,yCAAyC,CAAC;KACtD,QAAQ,CAAC,aAAa,EAAE,gCAAgC,CAAC;KACzD,MAAM,CAAC,qBAAqB,EAAE,kBAAkB,CAAC;KACjD,MAAM,CAAC,uBAAuB,EAAE,0BAA0B,EAAE,KAAK,CAAC;KAClE,MAAM,CAAC,KAAK,EAAE,QAAgB,EAAE,OAAqD,EAAE,EAAE;IACxF,MAAM,IAAA,yBAAc,EAAC,QAAQ,EAAE,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,KAAK,CAAC,CAAC;AAC1E,CAAC,CAAC,CAAC;AAEL,OAAO,CAAC,KAAK,EAAE,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";;;AAEA,yCAAoC;AACpC,uCAAiC;AACjC,uCAAiC;AACjC,iDAAoD;AACpD,2BAAkC;AAClC,+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,CAAC;KAC5E,MAAM,CAAC,0BAA0B,EAAE,kBAAkB,CAAC;KACtD,MAAM,CAAC,yBAAyB,EAAE,qDAAqD,EAAE,KAAK,CAAC;KAC/F,MAAM,CAAC,wBAAwB,EAAE,iDAAiD,EAAE,KAAK,CAAC;KAC1F,MAAM,CAAC,eAAe,EAAE,gBAAgB,CAAC;KACzC,MAAM,CAAC,sBAAsB,EAAE,2BAA2B,EAAE,GAAG,CAAC;KAChE,MAAM,CAAC,cAAI,CAAC,CAAC;AAEhB,OAAO;KACJ,OAAO,CAAC,QAAQ,CAAC;KACjB,WAAW,CAAC,yCAAyC,CAAC;KACtD,QAAQ,CAAC,aAAa,EAAE,gCAAgC,CAAC;KACzD,MAAM,CAAC,qBAAqB,EAAE,kBAAkB,CAAC;KACjD,MAAM,CAAC,uBAAuB,EAAE,0BAA0B,EAAE,KAAK,CAAC;KAClE,MAAM,CAAC,KAAK,EAAE,QAAgB,EAAE,OAAqD,EAAE,EAAE;IACxF,MAAM,IAAA,yBAAc,EAAC,QAAQ,EAAE,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,KAAK,CAAC,CAAC;AAC1E,CAAC,CAAC,CAAC;AAEL,OAAO,CAAC,KAAK,EAAE,CAAC"}
@@ -17,12 +17,38 @@ Every finding MUST include ALL these fields for the report to work:
17
17
  "code": "the vulnerable/problematic code snippet",
18
18
  "description": "What is wrong - the specific problem found",
19
19
  "impact": "Security impact - what an attacker could exploit, potential damage, real-world risk",
20
+ "attackChain": "Step-by-step exploitation: 1. Attacker does X, 2. System responds with Y, 3. Attacker gains Z",
20
21
  "recommendation": "Exact steps to fix this issue with code example if applicable",
21
22
  "cwe": "CWE-XXX (if applicable)",
22
- "confidence": 85
23
+ "confidence": 85,
24
+ "dpiead": {
25
+ "damage": 8,
26
+ "reproducibility": 9,
27
+ "exploitability": 7,
28
+ "affectedUsers": 10,
29
+ "discoverability": 6,
30
+ "score": 8.0
31
+ }
23
32
  }
24
33
  ```
25
34
 
35
+ ## DREAD SCORING (for HIGH and CRITICAL findings)
36
+
37
+ Calculate DREAD score (1-10 for each, average for final score):
38
+
39
+ - **Damage**: How severe is the impact? (10 = full system compromise, 1 = minimal)
40
+ - **Reproducibility**: How easy to reproduce? (10 = always works, 1 = rare conditions)
41
+ - **Exploitability**: How easy to exploit? (10 = script kiddie, 1 = expert + physical access)
42
+ - **Affected Users**: How many users impacted? (10 = all users, 1 = single admin)
43
+ - **Discoverability**: How easy to find? (10 = obvious, 1 = requires source code)
44
+
45
+ **Score interpretation**:
46
+ - 9.0-10.0 = CRITICAL (exploit immediately)
47
+ - 7.0-8.9 = HIGH (fix within days)
48
+ - 5.0-6.9 = MEDIUM (fix within sprint)
49
+ - 3.0-4.9 = LOW (backlog)
50
+ - 1.0-2.9 = INFO (document only)
51
+
26
52
  ## FIELD GUIDELINES
27
53
 
28
54
  ### impact (REQUIRED)
@@ -57,6 +83,21 @@ CHECK FOR:
57
83
  - Weak Cryptography (MD5, SHA1 for passwords, ECB mode)
58
84
  - Insecure Random (Math.random for security purposes)
59
85
 
86
+ **DATABASE-SPECIFIC DANGEROUS FUNCTIONS** (check for ANY database):
87
+ - DuckDB: read_text(), read_blob(), read_csv_auto(), read_parquet(), glob(), getenv(), httpfs
88
+ - SQLite: load_extension(), readfile(), writefile()
89
+ - PostgreSQL: pg_read_file(), pg_ls_dir(), COPY TO/FROM
90
+ - MySQL: LOAD_FILE(), INTO OUTFILE, INTO DUMPFILE
91
+ - MongoDB: $where with user input, mapReduce with user functions
92
+ - Redis: EVAL/EVALSHA with user input, CONFIG, DEBUG commands
93
+
94
+ **BLOCKLIST BYPASS PATTERNS**:
95
+ - Keyword blocklists that miss database-specific functions
96
+ - Case sensitivity bypass (READ_TEXT vs read_text)
97
+ - Unicode homoglyph bypass
98
+ - Comment injection (SELECT/**/read_text)
99
+ - Encoding bypass (hex, base64, URL encoding)
100
+
60
101
  For EACH finding, output the FULL JSON format above.
61
102
 
62
103
  ---
@@ -77,6 +118,24 @@ CHECK FOR:
77
118
  - Account enumeration (different responses for valid/invalid users)
78
119
  - Brute force protection missing
79
120
 
121
+ **MEMORY SAFETY FOR SECRETS**:
122
+ - Cryptographic keys not zeroed after use (persist in heap/memory)
123
+ - Passwords stored in String instead of char[] (immutable, stays in memory)
124
+ - Session tokens not cleared on logout (memory leak of credentials)
125
+ - Private keys in JavaScript objects (V8 heap, not securely cleared)
126
+ - Sensitive data in logs or error messages that persist
127
+
128
+ Look for:
129
+ - `delete obj.secretKey` (doesn't zero memory, just removes reference)
130
+ - Missing explicit buffer.fill(0) before releasing crypto keys
131
+ - Session/token caches without secure cleanup on expiry
132
+ - Garbage collection dependency for secret cleanup (insecure)
133
+
134
+ **TIMING ATTACKS**:
135
+ - Non-constant-time string comparison for tokens/secrets
136
+ - Early return on auth failure leaking valid usernames
137
+ - Different response times for valid vs invalid credentials
138
+
80
139
  For EACH finding, output the FULL JSON format.
81
140
 
82
141
  ---
@@ -97,6 +156,27 @@ CHECK FOR:
97
156
  - API versioning issues
98
157
  - Excessive data exposure in responses
99
158
 
159
+ **FAIL-OPEN vs FAIL-CLOSED PATTERNS** (CRITICAL):
160
+ - IP whitelist empty/missing = allow all (should deny all)
161
+ - Auth middleware errors = request passes through (should block)
162
+ - Rate limiter Redis down = no limiting (should block or use fallback)
163
+ - Config missing = insecure defaults (should fail startup)
164
+ - Feature flag missing = feature enabled (should be disabled)
165
+ - RBAC role not found = access granted (should deny)
166
+
167
+ Look for patterns like:
168
+ ```
169
+ if (whitelist.length > 0) { check() } // FAIL-OPEN: empty whitelist bypasses
170
+ if (!config.AUTH_REQUIRED) { next() } // FAIL-OPEN: missing config = no auth
171
+ catch(e) { next() } // FAIL-OPEN: error = proceed
172
+ ```
173
+
174
+ **ADMIN/INTERNAL API EXPOSURE**:
175
+ - Admin APIs bound to 0.0.0.0 instead of 127.0.0.1
176
+ - Internal ports exposed without auth
177
+ - Debug endpoints in production
178
+ - Metrics/health endpoints exposing sensitive data
179
+
100
180
  For EACH finding, output the FULL JSON format.
101
181
 
102
182
  ---
@@ -117,6 +197,27 @@ CHECK FOR:
117
197
  - Exposed internal ports
118
198
  - Missing resource limits
119
199
 
200
+ **SECRETS IN CONFIGURATION FILES** (check ALL config formats):
201
+ - Helm values.yaml / values-*.yaml with hardcoded secrets
202
+ - Kubernetes secrets not using external secrets manager
203
+ - Docker Compose with hardcoded passwords
204
+ - Terraform tfvars with credentials
205
+ - Ansible vault passwords in plaintext
206
+ - CI/CD pipeline secrets in yaml files (.github/workflows, .gitlab-ci.yml)
207
+
208
+ **PRIVILEGE ESCALATION RISKS**:
209
+ - Containers/processes running as root
210
+ - Missing securityContext in K8s (runAsNonRoot, readOnlyRootFilesystem)
211
+ - Privileged containers
212
+ - Host path mounts to sensitive directories
213
+ - Missing capability drops (drop: ALL)
214
+ - Service accounts with excessive permissions
215
+
216
+ **CONFIGURATION THAT SHOULD FAIL AT STARTUP**:
217
+ - Required environment variables not validated at startup
218
+ - Missing config = silent fallback to insecure defaults
219
+ - No validation of secret strength/format at startup
220
+
120
221
  For EACH finding, output the FULL JSON format.
121
222
 
122
223
  ---
@@ -157,6 +258,25 @@ CHECK FOR:
157
258
  - Jailbreak prevention missing
158
259
  - PII in training data/prompts
159
260
 
261
+ **LLM OUTPUT → CODE EXECUTION CHAINS**:
262
+ - LLM generates SQL that gets executed (SQL injection via prompt injection)
263
+ - LLM generates code that gets eval'd
264
+ - LLM generates shell commands that get executed
265
+ - LLM generates file paths that get accessed
266
+ - LLM output used in template rendering (SSTI)
267
+
268
+ **VALIDATION OF LLM OUTPUT**:
269
+ - Is there ANY validation between LLM output and dangerous operations?
270
+ - Are blocklists/allowlists applied to LLM-generated content?
271
+ - Can the blocklist be bypassed? (check for completeness)
272
+ - Is validation case-insensitive?
273
+ - Does validation handle encoded input?
274
+
275
+ **PROMPT SANITIZATION WEAKNESSES**:
276
+ - Regex-based filtering (easily bypassed with synonyms, encoding, whitespace)
277
+ - Literal string matching (bypass with Unicode homoglyphs)
278
+ - Missing: base64 encoded payloads, ROT13, leetspeak variations
279
+
160
280
  For EACH finding, output the FULL JSON format.
161
281
 
162
282
  ---
@@ -177,6 +297,20 @@ CHECK FOR:
177
297
  - Resource exhaustion (no limits on uploads, requests)
178
298
  - Synchronous operations that should be async
179
299
 
300
+ **DANGEROUS DATABASE OPERATIONS IN HOT PATHS**:
301
+ - Redis KEYS command (blocks entire server, O(n) scan)
302
+ - MongoDB find() without limit
303
+ - SQL SELECT without LIMIT on large tables
304
+ - Full table scans in request handlers
305
+ - Aggregations without indexes
306
+
307
+ **BLOCKING OPERATIONS**:
308
+ - Synchronous file I/O in request handlers
309
+ - crypto.pbkdf2Sync / crypto.scryptSync in hot paths
310
+ - JSON.parse on unbounded input
311
+ - Regex on user input without timeout
312
+ - DNS lookups without caching
313
+
180
314
  For EACH finding, output the FULL JSON format.
181
315
 
182
316
  ---
@@ -217,6 +351,25 @@ CHECK FOR:
217
351
  - Callback hell making auditing hard
218
352
  - Anti-patterns (god objects, tight coupling)
219
353
 
354
+ **DEAD CODE WITH SECURITY IMPLICATIONS** (CRITICAL):
355
+ - Old/commented code that has BETTER security than current code
356
+ - Deprecated functions with security controls not ported to replacement
357
+ - Legacy validation code that was more thorough
358
+ - Backup implementations with different (better) security model
359
+ - TODO/FIXME comments about security issues never addressed
360
+
361
+ Look for patterns:
362
+ - `// OLD: validated input here` followed by code that doesn't
363
+ - Functions named `*_secure`, `*_safe`, `*_v2` that are unused
364
+ - Commented-out security checks with no explanation
365
+ - Multiple implementations where one is more secure but unused
366
+
367
+ **SECURITY-CRITICAL CODE WITHOUT TESTS**:
368
+ - Authentication/authorization code with 0% test coverage
369
+ - Input validation functions without unit tests
370
+ - Cryptographic operations without test vectors
371
+ - Rate limiting logic without integration tests
372
+
220
373
  For EACH finding, output the FULL JSON format.
221
374
 
222
375
  ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "coverme-scanner",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
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
  "bin": {
package/src/cli/index.ts CHANGED
@@ -4,13 +4,17 @@ import { Command } from 'commander';
4
4
  import { init } from './init.js';
5
5
  import { scan } from './scan.js';
6
6
  import { generateReport } from '../report/index.js';
7
+ import { readFileSync } from 'fs';
8
+ import { join } from 'path';
9
+
10
+ const pkg = JSON.parse(readFileSync(join(__dirname, '..', '..', 'package.json'), 'utf-8'));
7
11
 
8
12
  const program = new Command();
9
13
 
10
14
  program
11
- .name('vibecode')
15
+ .name('coverme')
12
16
  .description('AI-powered code scanner with multi-agent verification for Claude Code')
13
- .version('1.0.0');
17
+ .version(pkg.version);
14
18
 
15
19
  program
16
20
  .command('init')
@@ -17,12 +17,38 @@ Every finding MUST include ALL these fields for the report to work:
17
17
  "code": "the vulnerable/problematic code snippet",
18
18
  "description": "What is wrong - the specific problem found",
19
19
  "impact": "Security impact - what an attacker could exploit, potential damage, real-world risk",
20
+ "attackChain": "Step-by-step exploitation: 1. Attacker does X, 2. System responds with Y, 3. Attacker gains Z",
20
21
  "recommendation": "Exact steps to fix this issue with code example if applicable",
21
22
  "cwe": "CWE-XXX (if applicable)",
22
- "confidence": 85
23
+ "confidence": 85,
24
+ "dpiead": {
25
+ "damage": 8,
26
+ "reproducibility": 9,
27
+ "exploitability": 7,
28
+ "affectedUsers": 10,
29
+ "discoverability": 6,
30
+ "score": 8.0
31
+ }
23
32
  }
24
33
  ```
25
34
 
35
+ ## DREAD SCORING (for HIGH and CRITICAL findings)
36
+
37
+ Calculate DREAD score (1-10 for each, average for final score):
38
+
39
+ - **Damage**: How severe is the impact? (10 = full system compromise, 1 = minimal)
40
+ - **Reproducibility**: How easy to reproduce? (10 = always works, 1 = rare conditions)
41
+ - **Exploitability**: How easy to exploit? (10 = script kiddie, 1 = expert + physical access)
42
+ - **Affected Users**: How many users impacted? (10 = all users, 1 = single admin)
43
+ - **Discoverability**: How easy to find? (10 = obvious, 1 = requires source code)
44
+
45
+ **Score interpretation**:
46
+ - 9.0-10.0 = CRITICAL (exploit immediately)
47
+ - 7.0-8.9 = HIGH (fix within days)
48
+ - 5.0-6.9 = MEDIUM (fix within sprint)
49
+ - 3.0-4.9 = LOW (backlog)
50
+ - 1.0-2.9 = INFO (document only)
51
+
26
52
  ## FIELD GUIDELINES
27
53
 
28
54
  ### impact (REQUIRED)
@@ -57,6 +83,21 @@ CHECK FOR:
57
83
  - Weak Cryptography (MD5, SHA1 for passwords, ECB mode)
58
84
  - Insecure Random (Math.random for security purposes)
59
85
 
86
+ **DATABASE-SPECIFIC DANGEROUS FUNCTIONS** (check for ANY database):
87
+ - DuckDB: read_text(), read_blob(), read_csv_auto(), read_parquet(), glob(), getenv(), httpfs
88
+ - SQLite: load_extension(), readfile(), writefile()
89
+ - PostgreSQL: pg_read_file(), pg_ls_dir(), COPY TO/FROM
90
+ - MySQL: LOAD_FILE(), INTO OUTFILE, INTO DUMPFILE
91
+ - MongoDB: $where with user input, mapReduce with user functions
92
+ - Redis: EVAL/EVALSHA with user input, CONFIG, DEBUG commands
93
+
94
+ **BLOCKLIST BYPASS PATTERNS**:
95
+ - Keyword blocklists that miss database-specific functions
96
+ - Case sensitivity bypass (READ_TEXT vs read_text)
97
+ - Unicode homoglyph bypass
98
+ - Comment injection (SELECT/**/read_text)
99
+ - Encoding bypass (hex, base64, URL encoding)
100
+
60
101
  For EACH finding, output the FULL JSON format above.
61
102
 
62
103
  ---
@@ -77,6 +118,24 @@ CHECK FOR:
77
118
  - Account enumeration (different responses for valid/invalid users)
78
119
  - Brute force protection missing
79
120
 
121
+ **MEMORY SAFETY FOR SECRETS**:
122
+ - Cryptographic keys not zeroed after use (persist in heap/memory)
123
+ - Passwords stored in String instead of char[] (immutable, stays in memory)
124
+ - Session tokens not cleared on logout (memory leak of credentials)
125
+ - Private keys in JavaScript objects (V8 heap, not securely cleared)
126
+ - Sensitive data in logs or error messages that persist
127
+
128
+ Look for:
129
+ - `delete obj.secretKey` (doesn't zero memory, just removes reference)
130
+ - Missing explicit buffer.fill(0) before releasing crypto keys
131
+ - Session/token caches without secure cleanup on expiry
132
+ - Garbage collection dependency for secret cleanup (insecure)
133
+
134
+ **TIMING ATTACKS**:
135
+ - Non-constant-time string comparison for tokens/secrets
136
+ - Early return on auth failure leaking valid usernames
137
+ - Different response times for valid vs invalid credentials
138
+
80
139
  For EACH finding, output the FULL JSON format.
81
140
 
82
141
  ---
@@ -97,6 +156,27 @@ CHECK FOR:
97
156
  - API versioning issues
98
157
  - Excessive data exposure in responses
99
158
 
159
+ **FAIL-OPEN vs FAIL-CLOSED PATTERNS** (CRITICAL):
160
+ - IP whitelist empty/missing = allow all (should deny all)
161
+ - Auth middleware errors = request passes through (should block)
162
+ - Rate limiter Redis down = no limiting (should block or use fallback)
163
+ - Config missing = insecure defaults (should fail startup)
164
+ - Feature flag missing = feature enabled (should be disabled)
165
+ - RBAC role not found = access granted (should deny)
166
+
167
+ Look for patterns like:
168
+ ```
169
+ if (whitelist.length > 0) { check() } // FAIL-OPEN: empty whitelist bypasses
170
+ if (!config.AUTH_REQUIRED) { next() } // FAIL-OPEN: missing config = no auth
171
+ catch(e) { next() } // FAIL-OPEN: error = proceed
172
+ ```
173
+
174
+ **ADMIN/INTERNAL API EXPOSURE**:
175
+ - Admin APIs bound to 0.0.0.0 instead of 127.0.0.1
176
+ - Internal ports exposed without auth
177
+ - Debug endpoints in production
178
+ - Metrics/health endpoints exposing sensitive data
179
+
100
180
  For EACH finding, output the FULL JSON format.
101
181
 
102
182
  ---
@@ -117,6 +197,27 @@ CHECK FOR:
117
197
  - Exposed internal ports
118
198
  - Missing resource limits
119
199
 
200
+ **SECRETS IN CONFIGURATION FILES** (check ALL config formats):
201
+ - Helm values.yaml / values-*.yaml with hardcoded secrets
202
+ - Kubernetes secrets not using external secrets manager
203
+ - Docker Compose with hardcoded passwords
204
+ - Terraform tfvars with credentials
205
+ - Ansible vault passwords in plaintext
206
+ - CI/CD pipeline secrets in yaml files (.github/workflows, .gitlab-ci.yml)
207
+
208
+ **PRIVILEGE ESCALATION RISKS**:
209
+ - Containers/processes running as root
210
+ - Missing securityContext in K8s (runAsNonRoot, readOnlyRootFilesystem)
211
+ - Privileged containers
212
+ - Host path mounts to sensitive directories
213
+ - Missing capability drops (drop: ALL)
214
+ - Service accounts with excessive permissions
215
+
216
+ **CONFIGURATION THAT SHOULD FAIL AT STARTUP**:
217
+ - Required environment variables not validated at startup
218
+ - Missing config = silent fallback to insecure defaults
219
+ - No validation of secret strength/format at startup
220
+
120
221
  For EACH finding, output the FULL JSON format.
121
222
 
122
223
  ---
@@ -157,6 +258,25 @@ CHECK FOR:
157
258
  - Jailbreak prevention missing
158
259
  - PII in training data/prompts
159
260
 
261
+ **LLM OUTPUT → CODE EXECUTION CHAINS**:
262
+ - LLM generates SQL that gets executed (SQL injection via prompt injection)
263
+ - LLM generates code that gets eval'd
264
+ - LLM generates shell commands that get executed
265
+ - LLM generates file paths that get accessed
266
+ - LLM output used in template rendering (SSTI)
267
+
268
+ **VALIDATION OF LLM OUTPUT**:
269
+ - Is there ANY validation between LLM output and dangerous operations?
270
+ - Are blocklists/allowlists applied to LLM-generated content?
271
+ - Can the blocklist be bypassed? (check for completeness)
272
+ - Is validation case-insensitive?
273
+ - Does validation handle encoded input?
274
+
275
+ **PROMPT SANITIZATION WEAKNESSES**:
276
+ - Regex-based filtering (easily bypassed with synonyms, encoding, whitespace)
277
+ - Literal string matching (bypass with Unicode homoglyphs)
278
+ - Missing: base64 encoded payloads, ROT13, leetspeak variations
279
+
160
280
  For EACH finding, output the FULL JSON format.
161
281
 
162
282
  ---
@@ -177,6 +297,20 @@ CHECK FOR:
177
297
  - Resource exhaustion (no limits on uploads, requests)
178
298
  - Synchronous operations that should be async
179
299
 
300
+ **DANGEROUS DATABASE OPERATIONS IN HOT PATHS**:
301
+ - Redis KEYS command (blocks entire server, O(n) scan)
302
+ - MongoDB find() without limit
303
+ - SQL SELECT without LIMIT on large tables
304
+ - Full table scans in request handlers
305
+ - Aggregations without indexes
306
+
307
+ **BLOCKING OPERATIONS**:
308
+ - Synchronous file I/O in request handlers
309
+ - crypto.pbkdf2Sync / crypto.scryptSync in hot paths
310
+ - JSON.parse on unbounded input
311
+ - Regex on user input without timeout
312
+ - DNS lookups without caching
313
+
180
314
  For EACH finding, output the FULL JSON format.
181
315
 
182
316
  ---
@@ -217,6 +351,25 @@ CHECK FOR:
217
351
  - Callback hell making auditing hard
218
352
  - Anti-patterns (god objects, tight coupling)
219
353
 
354
+ **DEAD CODE WITH SECURITY IMPLICATIONS** (CRITICAL):
355
+ - Old/commented code that has BETTER security than current code
356
+ - Deprecated functions with security controls not ported to replacement
357
+ - Legacy validation code that was more thorough
358
+ - Backup implementations with different (better) security model
359
+ - TODO/FIXME comments about security issues never addressed
360
+
361
+ Look for patterns:
362
+ - `// OLD: validated input here` followed by code that doesn't
363
+ - Functions named `*_secure`, `*_safe`, `*_v2` that are unused
364
+ - Commented-out security checks with no explanation
365
+ - Multiple implementations where one is more secure but unused
366
+
367
+ **SECURITY-CRITICAL CODE WITHOUT TESTS**:
368
+ - Authentication/authorization code with 0% test coverage
369
+ - Input validation functions without unit tests
370
+ - Cryptographic operations without test vectors
371
+ - Rate limiting logic without integration tests
372
+
220
373
  For EACH finding, output the FULL JSON format.
221
374
 
222
375
  ---