Commit 2f114e5
committed
[argus] sandbox_audit: raise _MAX_COMMAND_LENGTH 10_000 → 131_072
The 10 000-char cap rejects legitimate heredocs that DeerFlow agents use
to write small-to-medium files in one shot — e.g. a 20 KB self-contained
HTML page produced by a research task. 128 KB is still four orders of
magnitude below Linux ARG_MAX, and the cap remains an effective
tripwire for base64 payload injection (which would otherwise produce
megabytes-long lines).
Updates the existing length tests to read the constant rather than
hard-coding 10_001, and adds:
- test_max_length_at_128k — pins the new value
- test_20kb_heredoc_accepted — realistic positive case from the bug
that motivated the change
PR-candidate: yes
Upstream-issue: none
Reason: Easy win, well-scoped, with a believable use case in the test.
Could be even more generally accepted if reframed as
configurable, but a flat bump is the smallest defensible change.1 parent 01f1863 commit 2f114e5
2 files changed
Lines changed: 25 additions & 10 deletions
File tree
- backend
- packages/harness/deerflow/agents/middlewares
- tests
Lines changed: 7 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
279 | 281 | | |
280 | 282 | | |
281 | 283 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
279 | | - | |
| 279 | + | |
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
283 | | - | |
| 283 | + | |
284 | 284 | | |
285 | 285 | | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
286 | 299 | | |
287 | 300 | | |
288 | 301 | | |
| |||
318 | 331 | | |
319 | 332 | | |
320 | 333 | | |
321 | | - | |
| 334 | + | |
322 | 335 | | |
323 | 336 | | |
324 | 337 | | |
| |||
339 | 352 | | |
340 | 353 | | |
341 | 354 | | |
342 | | - | |
| 355 | + | |
343 | 356 | | |
344 | 357 | | |
345 | 358 | | |
| |||
597 | 610 | | |
598 | 611 | | |
599 | 612 | | |
600 | | - | |
| 613 | + | |
601 | 614 | | |
602 | 615 | | |
603 | 616 | | |
| |||
0 commit comments