fix(auto-reply): resolve scp from path for media staging#79202
Conversation
|
Codex review: needs real behavior proof before merge. Summary Reproducibility: yes. The current-main source unconditionally spawns Real behavior proof Next step before merge Security Review detailsBest possible solution: Land the narrow PATH-resolution change with the existing validation, regression assertion, and changelog if maintainers accept process PATH as the intended Do we have a high-confidence way to reproduce the issue? Yes. The current-main source unconditionally spawns Is this the best way to solve the issue? Yes. Spawning What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against df069f7b0222. |
948fe23 to
e51d6c5
Compare
e51d6c5 to
02900a2
Compare
Summary
/usr/bin/scp.PATHcould fail media copy even thoughscpis available.scpby command name so the runtimePATHdecides.Verification
git diff --check origin/main..HEADpnpm test src/auto-reply/reply.stage-sandbox-media.scp-remote-path.test.ts— 2 passedcommand -v scp—/usr/bin/scpin the live local environmentReal behavior proof
scpfromPATHinstead of hardcoding/usr/bin/scp.PATH.command -v scp/usr/bin/scpscpby command name, and the regression test verifies the production spawn call usesscp.Security Impact
scpcommand.Risks and Mitigations
scpbinary.scparguments.Linked Issue
Closes #79242