Skip to content

security(gha): fix potential for shell injection #4099

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 26, 2025

Conversation

mdtro
Copy link
Member

@mdtro mdtro commented Feb 25, 2025

Running these workflows is gated pretty well, but this mitigates the potential for a script injection attack by passing the input to an intermediary environment variable first.

See https://docs.github.com/en/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions#example-of-a-script-injection-attack for more details.

@mdtro mdtro requested review from antonpirker and a team February 25, 2025 14:24
Copy link

codecov bot commented Feb 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.52%. Comparing base (189e4a9) to head (c2c2f66).
Report is 1 commits behind head on master.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4099      +/-   ##
==========================================
- Coverage   79.55%   79.52%   -0.03%     
==========================================
  Files         140      140              
  Lines       15521    15521              
  Branches     2631     2631              
==========================================
- Hits        12347    12343       -4     
- Misses       2338     2340       +2     
- Partials      836      838       +2     

see 3 files with indirect coverage changes

Copy link
Member

@antonpirker antonpirker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice! Thank's @mdtro for discovering and fixing this!

@antonpirker antonpirker merged commit 07d2dce into master Feb 26, 2025
142 checks passed
@antonpirker antonpirker deleted the mdtro/fix-gha-injection branch February 26, 2025 09:01
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