fix(ci): pin third-party GitHub Actions to SHA to prevent supply chain attacks - #8318
Closed
memosr wants to merge 1 commit into
Closed
fix(ci): pin third-party GitHub Actions to SHA to prevent supply chain attacks#8318memosr wants to merge 1 commit into
memosr wants to merge 1 commit into
Conversation
Contributor
|
Thanks for the security-conscious contribution, @memosr! 🔒 This is an automated hermes-sweeper review. The fix you proposed is already reflected on
This PR's changes are fully superseded by the current state of |
Collaborator
|
Superseded by #9801 (merged) — comprehensive supply chain hardening that covers all actions pinned here. |
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.
What does this PR do?
.github/workflows/docker-publish.ymlandtests.ymlused mutableversion tags for third-party GitHub Actions:
Mutable tags can be silently redirected to malicious commits. If an
attacker compromises the
dockerorastral-shGitHub organization,they can push a backdoored commit to the same tag — and the next CI
run will execute it with access to
secrets.DOCKERHUB_TOKEN.Attack scenario
docker/build-push-actionand redirects@v6to a malicious commit
docker-publish.ymlruns and the malicious action has access to${{ secrets.DOCKERHUB_TOKEN }}and${{ secrets.DOCKERHUB_USERNAME }}nousresearch/hermes-agent:latestFix
Pinned all third-party actions to their full commit SHA with a version
comment for readability:
docker/setup-qemu-action@v3@SHA # v3docker/setup-buildx-action@v3@SHA # v3docker/build-push-action@v6@SHA # v6docker/login-action@v3@SHA # v3astral-sh/setup-uv@v5@SHA # v5actions/checkout@v4(first-party GitHub action) not changed —first-party actions are trusted.
Type of Change
Checklist