Commit 6941ef7
fix(bounds): .take(LIMIT) on external-input reads (batch 1/N)
Self-scan found 14 UnboundedAllocation criticals in panic-attack's
own src/ — all TPs by detector semantics. This batch bounds the
three highest-risk reads (external or user-supplied input, biggest
attack surface) using the same pattern applied to 007-lang:
bridge/reachability.rs — Rust source file scan (64 MiB cap)
bridge/intelligence.rs — OSV API HTTP response body (256 MiB for
success, 64 KiB for error-body; uses
ureq v3's Body::with_config().limit())
amuck/mod.rs — mutation target source (64 MiB cap) and
spec JSON/YAML (4 MiB cap)
Self-scan after this batch: UnboundedAllocation 14 -> 11 critical
findings (confirmed the three flagged files are now disarmed).
Remaining 11: self-produced reports, config files, /proc metadata,
and the analyzer's own manifest-file reads — all lower-risk but
still on the sweep list for the next batch.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 4c1c128 commit 6941ef7
3 files changed
Lines changed: 70 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
12 | 23 | | |
13 | 24 | | |
14 | 25 | | |
| |||
114 | 125 | | |
115 | 126 | | |
116 | 127 | | |
117 | | - | |
118 | | - | |
119 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
120 | 140 | | |
121 | 141 | | |
122 | 142 | | |
| |||
281 | 301 | | |
282 | 302 | | |
283 | 303 | | |
284 | | - | |
285 | | - | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
286 | 314 | | |
287 | 315 | | |
288 | 316 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
147 | 154 | | |
148 | 155 | | |
149 | 156 | | |
150 | | - | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
151 | 166 | | |
152 | 167 | | |
153 | 168 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
17 | 25 | | |
18 | 26 | | |
19 | 27 | | |
| |||
50 | 58 | | |
51 | 59 | | |
52 | 60 | | |
53 | | - | |
54 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
55 | 72 | | |
56 | 73 | | |
57 | 74 | | |
| |||
0 commit comments