Skip to content

fix: prevent shell injection from context expressions in run blocks - #40

Merged
melissag-ensemble merged 1 commit into
mainfrom
security/yaml-context-injection
May 26, 2026
Merged

fix: prevent shell injection from context expressions in run blocks#40
melissag-ensemble merged 1 commit into
mainfrom
security/yaml-context-injection

Conversation

@melissag-ensemble

@melissag-ensemble melissag-ensemble commented May 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Moves ${{ }} context expressions out of run: blocks and into sibling env: blocks, per GitHub's security hardening guide. Flagged by security review on commerce-php#451.

Ticket

https://jira.corp.adobe.com/browse/DEVSITE-2433

Related PRs

Notes

GitHub substitutes ${{ }} into the YAML before the shell parses it. The env: pattern passes the value as plain data instead, so shell metacharacters can't execute.

Test

https://github.com/AdobeDocs/adp-devsite-github-actions-test/actions/runs/26468085998/job/77933754731

Screenshot 2026-05-26 at 11 32 27 AM Screenshot 2026-05-26 at 11 32 15 AM

@melissag-ensemble melissag-ensemble changed the title security: route context expressions through env vars in run blocks security: prevent shell injection from context expressions in run blocks May 26, 2026
@melissag-ensemble melissag-ensemble changed the title security: prevent shell injection from context expressions in run blocks fix: prevent shell injection from context expressions in run blocks May 26, 2026
@melissag-ensemble
melissag-ensemble force-pushed the security/yaml-context-injection branch 2 times, most recently from 4ef8964 to e42496c Compare May 26, 2026 16:36
@melissag-ensemble
melissag-ensemble force-pushed the security/yaml-context-injection branch from e42496c to ab63d5b Compare May 26, 2026 20:15
@melissag-ensemble
melissag-ensemble merged commit 524428d into main May 26, 2026
1 check passed
@melissag-ensemble
melissag-ensemble deleted the security/yaml-context-injection branch May 26, 2026 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants