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
{{ message }}
Repository navigation
scanner: bound source staging enumeration and run it under the scan timeout #1602
Follow-up from the TPA red-team PR #1596 (Sol 6.1 round 21, transcript kept locally).
Unbounded directory enumeration — internal/security/scanner/source_staging.go:112: d.ReadDir(-1) allocates every entry before the 100,000-entry cap is checked (lines ~124-126), so an upstream-controlled directory with millions of entries can exhaust daemon memory before staging fails closed. Fix: read in bounded batches and enforce the remaining entry budget during enumeration; extend the cap test to assert bounded allocation.
Staging outside the scan timeout — internal/security/scanner/engine.go:823: source staging runs before DockerRunner.RunScanner starts its timeout (docker.go:~220-225) and production scans pass context.Background() (engine.go:~368-370); copyRegularFromRoot (source_staging.go:~173-193) copies without a context. A slow or huge source tree can stall a scan indefinitely. Fix: create the scan deadline before staging and make the copy context-aware.
Both are availability (not bypass) issues: staging still fails closed and tampering still discards results.
Activity
fix(security): close TPA red-team holes in the rug-pull gate and dete…
fix(scanner): bound source staging enumeration and run it under the s…
fix(scanner): Pass 2 dropped by Pass 1 slot race; clock-independent s…