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
security: bound external command execution time and output #13
runCommand() invokes tools such as lsof and ps without a timeout or output limit. A hung command or unbounded output can stall inspection indefinitely or consume excessive memory. --timeout-ms currently limits only the wait after SIGTERM.
Security and reliability impact
A local tool replacement, pathological process table, or stalled OS utility can deny service to list, inspect, or unlock. A timeout must remain uncertainty and must never be interpreted as absence or a released lock.
Required behavior
Add bounded execution for every external command:
explicit per-command deadline
bounded stdout and stderr capture
deterministic child termination and cleanup on timeout/overflow
structured timeout/output-limit errors
propagation to unknown or refusal at every safety decision
Keep the existing unlock termination timeout semantically separate from diagnostic subprocess limits.
Tests
Use controlled fixture commands to cover:
command completion within limits
timeout and cleanup
stdout and stderr overflow
spawn failure
lock/process classification remaining fail closed after command errors
Activity