Repository navigation
fix(ci): harden GitHub Actions workflows (#4994) - #4998
Open
hf-security-analysis[bot] wants to merge 1 commit into
Open
hf-security-analysis[bot] wants to merge 1 commit into
hf-security-analysis[bot] wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automated hardening of the workflow files flagged on #4994.
Targets
main. Files changed, and what changed them:.github/workflows/release.yml— injection, llm injectionFixed by this PR:
llm_prompt_injection(claude) — .github/workflows/release.ymlThis does not fix everything. 6 further finding(s) (6 high) need a decision this bot should not make for you. They are in the security channel with their locations — deliberately not repeated here, since this repository may be public and they are not fixed yet.
Pinning changes come from
pinactand are mechanical. Any other change was generated by Claude — read it before merging.Note
Low Risk
Changes are limited to CI workflow wiring and input validation; normal release inputs are unchanged, with lower injection risk into shell and LLM tooling.
Overview
Hardens
.github/workflows/release.ymlso release automation is less vulnerable to shell interpolation and unsafe values reaching the OpenCode release-notes path.In the prepare job, branch checkout, version bump, and commit/tag/push steps now pass
BRANCH,RELEASE_TYPE,VERSION,TAG, andIS_PRERELEASEthrough stepenvinstead of embedding${{ ... }}inside the shell script.The Generate release notes with OpenCode step now sets
SINCE_TAGandBUMP_TYPEfrom job outputs viaenv, enablesset -euo pipefail, and fails the step unless bump type isminor,major, orpatchand the since tag matchesv[0-9]*, before invokinggenerate_release_notes. The Generate Slack message step similarly movesVERSIONtoenvand addsset -euo pipefail.Reviewed by Cursor Bugbot for commit ec1642e. Bugbot is set up for automated code reviews on this repo. Configure here.