Skip to content

fix: prevent expression injection in benchmark-compare workflow#68135

Open
py4y6 wants to merge 1 commit intoangular:mainfrom
py4y6:py4y6-patch-1
Open

fix: prevent expression injection in benchmark-compare workflow#68135
py4y6 wants to merge 1 commit intoangular:mainfrom
py4y6:py4y6-patch-1

Conversation

@py4y6
Copy link
Copy Markdown

@py4y6 py4y6 commented Apr 10, 2026

Fix expression injection vulnerability where fork-controlled step outputs
(compareSha, benchmarkTarget) are interpolated directly into a run: block
via ${{ }} syntax, allowing shell command injection.

Changes:

  1. Wrap step outputs in environment variables (same pattern as COMMENT_BODY)
  2. Add SHA format validation for compareSha before use

References:

  • GitHub Security Lab: Keeping your GitHub Actions and workflows secure
  • OWASP CI/CD-SEC-4: Poisoned Pipeline Execution

@pullapprove pullapprove bot requested a review from alan-agius4 April 10, 2026 23:18
@google-cla

This comment was marked as outdated.

@py4y6
Copy link
Copy Markdown
Author

py4y6 commented Apr 10, 2026

@googlebot I signed it.

@google-cla google-cla bot added cla: yes and removed cla: no labels Apr 11, 2026
@ngbot ngbot bot added this to the Backlog milestone Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants