Skip to content

fix: harden GitHub Actions workflows#80

Open
fzipi wants to merge 1 commit intomainfrom
fix/harden-gha-workflows
Open

fix: harden GitHub Actions workflows#80
fzipi wants to merge 1 commit intomainfrom
fix/harden-gha-workflows

Conversation

@fzipi
Copy link
Member

@fzipi fzipi commented Mar 16, 2026

what

  • pin actions/checkout and actions/setup-python to commit SHAs instead of mutable v2 tags
  • add explicit permissions: contents: read to all workflows

why

  • unpinned actions reference mutable tags that can be moved by upstream maintainers or attackers
  • publish.yml handles PyPI credentials (TWINE_USERNAME/PASSWORD) and was using unpinned actions — a supply chain attack could exfiltrate secrets
  • explicit permissions follow the principle of least privilege

refs

- pin all third-party actions to commit SHAs instead of mutable tags
- add explicit minimal permissions blocks to all workflows
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.

1 participant