fix(ci): complete injection prevention in translation review workflow#17576
Conversation
Move remaining GitHub context values to env blocks to prevent potential shell injection. Add numeric validation for PR numbers before downstream usage. Extends the security fixes from #17560 to cover the "Get PR number" and "Post acknowledgment" steps that were not addressed in the original PR.
✅ Deploy Preview for ethereumorg ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Security ReviewPR: fix(ci): complete injection prevention in translation review workflow #17576 FindingsNo security issues identified. This PR is a security hardening that closes the remaining injection vectors in the "Get PR number" and "Post acknowledgment" steps, extending the fixes from #17560. Changes reviewed:
Areas Reviewed
Not applicable: API Route Security, SSRF & External Fetching, XSS & Content Injection, Security Headers & Transport, Dependencies & Supply Chain, Secrets & Configuration LimitationsNone. |


Summary
Context
This extends the security fixes from #17560, which addressed auth bypass and command injection vulnerabilities but left the "Get PR number" step using direct shell interpolation. While the risk was lower (PR numbers are typically numeric), this change applies defense-in-depth by:
github.event_name,github.event.inputs.pr_number,github.event.pull_request.number, andgithub.event.issue.numberto theenv:blockTest plan
workflow_dispatchissue_commentpull_request