Skip to content

fix(security): pin third-party GitHub Actions to commit SHAs in CI/release workflows - #6229

Closed
XananasX7 wants to merge 1 commit into
google:mainfrom
XananasX7:fix/security-pin-third-party-actions-release
Closed

fix(security): pin third-party GitHub Actions to commit SHAs in CI/release workflows#6229
XananasX7 wants to merge 1 commit into
google:mainfrom
XananasX7:fix/security-pin-third-party-actions-release

Conversation

@XananasX7

Copy link
Copy Markdown
Contributor

Summary

Mutable tag references for third-party Actions in the release-publish and continuous-integration workflows introduce a supply-chain risk: if the upstream tag is silently moved (e.g. via a compromised maintainer account, a typosquat, or a direct repo compromise), a malicious version of the action will run with full access to repository secrets on the next triggered run.

Affected Workflows

release-publish.yml (HIGH)

Action Before After
astral-sh/setup-uv @v7 @94527f2e…
actions/checkout @v6 @df4cb1c0…
actions/setup-python @v6 @ece7cb06…

This workflow has contents: write permission and accesses PYPI_TOKEN (publishes to PyPI) and RELEASE_PAT (full GitHub PAT). A compromised astral-sh/setup-uv@v7 tag could exfiltrate both secrets, enabling a supply-chain attack on every downstream user of google-adk.

continuous-integration.yml (MEDIUM)

Action Before After
pre-commit/action @v3.0.1 @2c7b3805…
astral-sh/setup-uv @v7 @94527f2e…
actions/checkout @v6 @df4cb1c0…
actions/setup-python @v6 @ece7cb06…

CI runs on every PR/push and has access to GITHUB_TOKEN. A compromised action here could exfiltrate tokens and inject malicious code into CI artifacts.

Fix

Pin every action to its exact commit SHA (with the human-readable tag preserved as a comment). This is the approach recommended by GitHub's own security hardening guide and OpenSSF Scorecards.

This change has zero functional impact — the same action code runs, only the resolution is now deterministic and tamper-proof.

Unpinned tag references for third-party actions can be silently mutated.
Pin each action to its commit SHA so the workflow is immune to tag
redirection attacks that could exfiltrate PYPI_TOKEN / RELEASE_PAT or
inject malicious code into CI.

Actions pinned:
- astral-sh/setup-uv@v7  → @94527f2e458b27549849d47d273a16bec83a01e9
- actions/checkout@v6    → @df4cb1c069e1874edd31b4311f1884172cec0e10
- actions/setup-python@v6 → @ece7cb06caefa5fff74198d8649806c4678c61a1
- pre-commit/action@v3.0.1 → @2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd
@google-cla

google-cla Bot commented Jun 28, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@adk-bot adk-bot added the tools [Component] This issue is related to tools label Jul 11, 2026
copybara-service Bot pushed a commit that referenced this pull request Jul 16, 2026
Merge #6229

Pin third-party GitHub Actions to specific commit SHAs in CI and release workflows to harden supply-chain security.

PiperOrigin-RevId: 949177003
@adk-bot

adk-bot commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Thank you @XananasX7 for your contribution! 🎉

Your changes have been successfully imported and merged via Copybara in commit 4e16855.

Closing this PR as the changes are now in the main branch.

@adk-bot adk-bot added the merged [Status] This PR is merged label Jul 16, 2026
@adk-bot adk-bot closed this Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged [Status] This PR is merged tools [Component] This issue is related to tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants