Skip to content

fix: harden GitHub Actions workflows#72

Merged
lelia merged 1 commit intomainfrom
fix/zizmor-workflow-security
Mar 25, 2026
Merged

fix: harden GitHub Actions workflows#72
lelia merged 1 commit intomainfrom
fix/zizmor-workflow-security

Conversation

@reberhardt7
Copy link
Copy Markdown
Contributor

@reberhardt7 reberhardt7 commented Mar 25, 2026

Summary

  • Template injection fixes: In release.yml, replaced direct ${{ github.ref_name }} interpolation in run: blocks with an env variable (REF_NAME) to prevent template injection attacks.
  • Pinned actions to SHA: Upgraded actions/checkout from the old pinned SHA to v6.0.2 (de0fac2e4500dabe0009e67214ff5f5447ce83dd) across all three workflows (pr-preview.yml, release.yml, version-check.yml).
  • persist-credentials: false: Added persist-credentials: false to all actions/checkout steps to avoid persisting the GITHUB_TOKEN in the git config.
  • Permissions: Added a top-level permissions block to version-check.yml (contents: read, pull-requests: write, issues: write) to follow the principle of least privilege.

- Fix template injection vulnerabilities in release.yml by using
  environment variables instead of direct interpolation of github.ref_name
- Upgrade actions/checkout to v6.0.2 (pinned to SHA) across all workflows
- Add persist-credentials: false to all checkout steps
- Add top-level permissions block to version-check.yml

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@reberhardt7 reberhardt7 requested a review from a team as a code owner March 25, 2026 04:02
@socket-security
Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedgithub/​actions/​checkout@​eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 ⏵ de0fac2e4500dabe0009e67214ff5f5447ce83dd100 +1100100100100

View full report

@github-actions
Copy link
Copy Markdown

🚀 Preview package published!

Install with:

pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple socketdev==3.0.32.dev2

@socket-security-staging
Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedgithub/​actions/​checkout@​eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 ⏵ de0fac2e4500dabe0009e67214ff5f5447ce83dd92100100100100

View full report

@lelia lelia self-assigned this Mar 25, 2026
@reberhardt7 reberhardt7 changed the title fix: harden GitHub Actions workflows (zizmor) fix: harden GitHub Actions workflows Mar 25, 2026
@lelia lelia merged commit c8efa8f into main Mar 25, 2026
6 checks passed
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