Commit c936f7f
fix(security): Use crypto.randomUUID() for analysis IDs
Breaking the data flow from user inputs to file paths:
- generateAnalysisId() now uses crypto.randomUUID()
- Analysis ID format: analysis-{uuid} (no user data)
- Output paths: workDir/reports/analysis-{uuid}
Why This Fixes CodeQL Alerts:
- CodeQL traces data flow from user inputs
- Previously: analysisId derived from repoName and prNumber
- Now: analysisId uses only crypto.randomUUID()
- No user-controlled data reaches file path operations
🤖 Generated with Claude Code
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent cf9944e commit c936f7f
1 file changed
Lines changed: 15 additions & 6 deletions
Lines changed: 15 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
184 | 185 | | |
185 | 186 | | |
186 | 187 | | |
| 188 | + | |
| 189 | + | |
187 | 190 | | |
188 | 191 | | |
189 | | - | |
190 | | - | |
| 192 | + | |
| 193 | + | |
191 | 194 | | |
192 | 195 | | |
193 | 196 | | |
194 | 197 | | |
195 | | - | |
| 198 | + | |
196 | 199 | | |
197 | 200 | | |
198 | 201 | | |
| |||
349 | 352 | | |
350 | 353 | | |
351 | 354 | | |
352 | | - | |
353 | | - | |
354 | | - | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
355 | 364 | | |
356 | 365 | | |
357 | 366 | | |
| |||
0 commit comments