You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(security): tighten watchdog overshoot, guard Windows path, assert live termination [DEVA11Y-484]
Addresses gaps found by stress-testing the guard rather than just asserting the
happy path:
- Measured overshoot: at a 200ms poll, bsdtar could write ~270-380MB past the cap
on a fast disk before the watchdog tripped (the cap was far softer than the
"200 MB" message implied). Tightened the poll to 50ms — a 10MB cap now peaks at
~34MB and a 2GB bomb is killed at ~224MB. Documented the cap as an explicit SOFT
ceiling whose purpose is preventing disk *exhaustion*, not exact byte enforcement.
- Windows Expand-Archive path was completely unguarded. Added a platform-agnostic
post-extraction footprint backstop in the common path (typecheckable on macOS)
so Windows rejects + cleans up a bomb before the binary is used.
- Strengthened tests to assert the LIVE watchdog fires (bsdtar SIGTERM, status 15)
and that peak disk stays bounded below the bomb size — previously the bomb tests
would have passed even if only the post-extraction check worked (which would let
a multi-GB bomb fill the disk).
- Added test_large_bomb.sh (opt-in via DEVA11Y_DEEP=1): proves a 2GB bomb is
bounded to ~224MB. Kept out of the default CI run to keep it fast/bounded.
- README now documents the real limitations: soft cap + overshoot, Windows is
post-hoc only, the Swift suite tests a mirror (not the compiled plugin) with the
call sites typecheck-only, and locateExecutable's cap is defense-in-depth.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments