Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix: use env var to prevent template injection in release workflow
Passes github.event.pull_request.head.ref through an env variable
instead of direct template expansion to satisfy zizmor audit.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
  • Loading branch information
Wenxin-Jiang and claude committed Apr 1, 2026
commit 676cf6cf98b8e9b9c12f666e92b0b965f9a703e2
5 changes: 3 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ jobs:
steps:
- name: Extract version from branch name
id: extract
env:
HEAD_REF: ${{ github.event.pull_request.head.ref }}
run: |
BRANCH="${{ github.event.pull_request.head.ref }}"
VERSION="${BRANCH#release/v}"
VERSION="${HEAD_REF#release/v}"
echo "VERSION=$VERSION" >> "$GITHUB_OUTPUT"
echo "Detected release version: $VERSION"

Expand Down
Loading