Skip to content

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

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

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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant