Commit f339fc3
fix(security): actually close 5 re-confirmed CodeQL alerts (141,143,230-232)
These 5 were NOT scan-lag — CodeQL re-evaluated them on a July-6 commit and kept
them OPEN (the alert updated_at only moves on state change, which masked this). My
earlier bounds/guards did not satisfy the queries. Corrected:
- 141 permission-handler.js (polynomial-redos): the DANGEROUS_PATTERNS denylist had
~12 regexes with unbounded .* (curl/wget/cat/dd/git-push/$( ...). Bounded every
wildcard: .*->[^\n]{0,256}, \s+->\s{1,32}, \s*->\s{0,32}, [^)]*->[^)]{0,256}.
Verified: still blocks all 19 dangerous cmds, allows benign, <2ms on 40k pumps.
- 143 complexity.ts (polynomial-redos): functionPatterns[3] had \([^)]*\) — the
unbounded [^)]* is the O(n^2) driver on '\t0(' pumps. -> [^)]{0,512}; other \s*
bounded. 830ms -> 13ms, function count identical on real code.
- 230/231/232 (prototype-pollution-utility): a PRE-LOOP key scan is not tracked by
CodeQL's dataflow as a barrier — it flagged the recursive writes regardless. Moved
the literal-comparison guard INLINE, immediately before each current[key] write
(loop body + final assignment). Verified: nested set works, prototype unpollutable.
Version bumps (real published-byte changes): trio 1.3.18, swarmvector 0.2.39,
agentic-flow 2.0.17. tsc clean for all changed .ts.
Co-Authored-By: Swarmdo <maintainers@swarmdo.com>1 parent 8813364 commit f339fc3
11 files changed
Lines changed: 60 additions & 55 deletions
File tree
- swarmdo
- src/swarmvocal/src/lib/server/database
- v3
- @swarmdo/cli
- src
- mcp-tools
- services
- vendor
- agentic-flow
- dist/sdk
- swarmvector
- src/analysis
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
431 | 431 | | |
432 | 432 | | |
433 | 433 | | |
434 | | - | |
435 | | - | |
436 | | - | |
437 | | - | |
438 | 434 | | |
439 | 435 | | |
440 | | - | |
441 | | - | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
442 | 442 | | |
443 | | - | |
| 443 | + | |
444 | 444 | | |
445 | | - | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
446 | 448 | | |
447 | 449 | | |
448 | 450 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
114 | 110 | | |
115 | 111 | | |
116 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
117 | 116 | | |
118 | 117 | | |
119 | 118 | | |
120 | 119 | | |
121 | 120 | | |
122 | | - | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
123 | 126 | | |
124 | 127 | | |
125 | 128 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | 210 | | |
215 | 211 | | |
216 | 212 | | |
| 213 | + | |
| 214 | + | |
217 | 215 | | |
218 | 216 | | |
219 | 217 | | |
220 | 218 | | |
221 | 219 | | |
222 | | - | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
0 commit comments