Repository navigation
Add zizmor workflow and fix GitHub Actions security findings - #16
Open
antoine-olivier wants to merge 2 commits into
Open
antoine-olivier wants to merge 2 commits into
antoine-olivier wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs jupyter/security#141
Breakage risks & untested paths
publishjob (.github/workflows/test.yml) only runs onrefs/tags/*pushes (not exercised by PR CI):actions/checkoutnow setspersist-credentials: false, and jobpermissionsexplicitly declarescontents: readalongsideid-token: write.actions/cachestep (testsjob) now setslookup-only: ${{ startsWith(github.ref, 'refs/tags/') }}to addresscache-poisoningon tag pushes while keeping normal caching active on branches and pull requests..github/zizmor.ymlignores were needed (12/12baseline findings fixed directly).Summary (2 commits for easier review)
.github/workflows/test.ymlto immutable commit SHAs resolved viagit ls-remote(keeping current major versions:actions/checkout@v4.4.0,actions/setup-python@v6.3.0,actions/cache@v4.3.0,pypa/gh-action-pypi-publish@v1.14.3).cooldownin.github/dependabot.yml.zizmorworkflow & security hardening:.github/workflows/zizmor.ymlusing SHA-pinnedzizmorcore/zizmor-action@v0.9.2withadvanced-security: ${{ github.event.pull_request.head.repo.fork != true }}so fork PRs do not fail on SARIF upload (same pattern asjupyter/nbclient#345).permissions: {}at workflow level,contents: readontests,contents: read+id-token: writeonpublish).persist-credentials: falseon bothactions/checkoutsteps (no subsequent git push/write in either job).actions/cachewithlookup-onlyon tag pushes (cache-poisoning).Verification
zizmor 1.33.1(online & offline):0findings.actionlint:0errors.main: zero residual diff outside the declared hardening changes.