Skip to content

fix(ci): harden GitHub Actions workflows (#4994) - #4998

Open
hf-security-analysis[bot] wants to merge 1 commit into
mainfrom
security/workflow-hardening/pr-4994
Open

hf-security-analysis[bot] wants to merge 1 commit into
mainfrom
security/workflow-hardening/pr-4994

Conversation

@hf-security-analysis

@hf-security-analysis hf-security-analysis Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Automated hardening of the workflow files flagged on #4994.

Targets main. Files changed, and what changed them:

  • .github/workflows/release.yml — injection, llm injection

Fixed by this PR:

  • HIGH llm_prompt_injection (claude) — .github/workflows/release.yml

This 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 pinact and 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.yml so 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, and IS_PRERELEASE through step env instead of embedding ${{ ... }} inside the shell script.

The Generate release notes with OpenCode step now sets SINCE_TAG and BUMP_TYPE from job outputs via env, enables set -euo pipefail, and fails the step unless bump type is minor, major, or patch and the since tag matches v[0-9]*, before invoking generate_release_notes. The Generate Slack message step similarly moves VERSION to env and adds set -euo pipefail.

Reviewed by Cursor Bugbot for commit ec1642e. Bugbot is set up for automated code reviews on this repo. Configure here.

This branch has not been deployed

No deployments
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.

0 participants