Repository navigation
workflows: pin actions by commit SHA and narrow the token - #101
Merged
Merged
Conversation
release.yml gave contents: write to the whole workflow and ran a third-party action by a movable tag; that step publishes the SHA256SUMS ops-get trusts. Pin every action to a full commit SHA, default both workflows to contents: read, give write only to the release job, and do not persist the checkout token while tests and the build run. Closes #99
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.
Closes #99.
What changed
actions/checkoutv4.4.0 (11d5960a…),softprops/action-gh-releasev2.6.2 (3bb12739…). Both SHAs were resolved from each repository's own tag refs withgh api repos/<owner>/<repo>/git/matching-refs/tags/…; v4 and v2 currently point at these same commits.permissions: contents: read; only the release job getscontents: write.persist-credentials: false;run-testsandbuild-releasedo not need the token.Why
The step that publishes release assets and the SHA256SUMS that ops-get trusts ran third-party code selected by a movable tag, with a write token.
Verification
grep uses:shows only 40-hex refs.Not verified