CI: Explicitly define CI workflow permissions#31238
Conversation
Is this a security gain? I just checke cibuildwheel.yml, and there you removed the global read permission but re-added it in all (both) jobs. https://scientific-python.org/specs/spec-0008/#hardening-workflow-environment-permissions suggests to globally set read permissions. Semi-OT: Where do we stand on https://scientific-python.org/specs/spec-0008/? |
|
It's not a functional/security change for the files which already defined global permissions. It's more of a defensive pattern in those cases, if additional jobs get added to those files or those jobs get pasted into other places. |
…ci_permissions
…ci_permissions
PR summary
Inspired by the recent CI attacks here: https://www.stepsecurity.io/blog/hackerbot-claw-github-actions-exploitation#summary-of-results
This tightens up permissions on CI runners by zeroing out permissions to start, and adding them back in per-job. I would characterize this as low priority hardening.
AI Disclosure
PR checklist