Repository navigation
fix(scripts): bound ghsa-patch git operations - #110465
wanyongstar wants to merge 4 commits into
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 19, 2026, 2:13 AM ET / 06:13 UTC. Summary PR surface: Other +9. Total +9 across 1 file. Reproducibility: unclear. for the full issue path: the provided transcript shows an extracted Git call timing out, but not a current full Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Keep the shared per-command timeout design, then add a redacted real-entrypoint run that stalls Do we have a high-confidence way to reproduce the issue? Unclear for the full issue path: the provided transcript shows an extracted Git call timing out, but not a current full Is this the best way to solve the issue? Yes in direction: a shared bounded subprocess helper plus a per-command timeout is a narrower solution than a coarse workflow timeout, but full-entrypoint proof is still needed to confirm this implementation is the best fix. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 29b4b74a5a5e. Label changesLabel justifications:
Evidence reviewedPR surface: Other +9. Total +9 across 1 file. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (4 earlier review cycles)
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Closing per ClawSweeper review verdict |
What Problem This Solves
Fixes an issue where git operations in the ghsa-patch script could hang indefinitely during security advisory patching. When git commands encounter network issues or repository corruption,
execFileSynccalls would block without any timeout, stalling automated GHSA remediation workflows.Why This Change Was Made
All
execFileSynccalls to external commands must include a timeout and kill signal. Without these, transient git issues cause resource leaks and indefinite stalls. This follows the same bounding pattern applied in #109325 (docker attestation).User Impact
GHSA patching can complete or fail-fast within a bounded deadline instead of blocking indefinitely when git operations are unresponsive.
Evidence
GHSA_PATCH_TIMEOUT_MS = 120_000constant and appliestimeout+killSignal: "SIGKILL"to theexecFileSync("git", ??call site.pnpm exec oxfmt --check scripts/ghsa-patch.mjspassed.git diff --checkpassed.scripts/verify-docker-attestations.mjs(fix(docker): bound attestation registry inspection #109325).AI-assisted: built with Codex
Real behavior proof
Probe on PR head: extracted the production
execFileSync("git", ...)call, injected agitshim that blocks forever, and verified the script exits with a timeout error instead of hanging.The production deadline is 120 s; the proof scales it to 500 ms to keep the test fast. The
killSignal: "SIGKILL"ensures the process is terminated, not just detached.