Skip to content

ci: pin GitHub Actions to commit SHAs - #1314

Open
chopmob-cloud wants to merge 1 commit into
a2aproject:mainfrom
chopmob-cloud:ci/pin-actions-sha
Open

chopmob-cloud wants to merge 1 commit into
a2aproject:mainfrom
chopmob-cloud:ci/pin-actions-sha

Conversation

@chopmob-cloud

Copy link
Copy Markdown
Contributor

Pins the GitHub Actions in .github/workflows to full-length commit SHAs with # vX version comments, bringing this repo in line with the sibling repo a2a-go, which is already fully pinned.

Why

A mutable tag like @v7 can be moved to new code after review, so a compromised or hijacked action tag would run with this workflow's permissions. Pinning to a commit SHA is the OpenSSF Scorecard "Pinned-Dependencies" control and the GitHub-recommended practice. This repo already runs Dependabot for the github-actions ecosystem, so Dependabot keeps the SHA pins current (it bumps the SHA and the # vX comment together).

What

  • Pins every non-local uses: across 10 workflow files to its exact commit SHA, keeping a # vX version comment. Same versions, no upgrades or downgrades.
  • Generated with pinact; each pinned SHA was verified to resolve to the version in its comment via the GitHub API.
  • Ref-pinning only: no job, step, trigger, or permission changed, so there is no functional change. A few already-pinned entries also had their # vX comment expanded to the exact version (same SHA).

@chopmob-cloud
chopmob-cloud requested a review from a team as a code owner October 5, 2026 06:03
@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

🧪 Code Coverage (vs main)

⬇️ Download Full Report

No coverage changes.

Generated by coverage-comment.yml

Pin the GitHub Actions in .github/workflows to full-length commit SHAs
with version comments. A mutable tag can be re-pointed after review, so
pinning to a commit SHA is the OpenSSF Scorecard Pinned-Dependencies
control. Ref-pinning only, same versions, no functional change. Generated
with pinact; each SHA verified to resolve to its version tag.

Signed-off-by: AlgoVoi <chopmob@gmail.com>
@chopmob-cloud

Copy link
Copy Markdown
Contributor Author

Rebased onto current main — was 18 commits behind, now green

Rebased ci/pin-actions-sha onto main (43d1eff1). The rebase applied cleanly and the branch is now a single commit ahead, with the same intent: every uses: pinned from a floating tag to a commit SHA.

No upstream pins were clobbered — upstream had not touched these uses: lines in the interim, so the diff is still exactly the tag→SHA conversion across 10 workflow files, and no unpinned uses: remains:

grep -rnE "uses:\s+[a-zA-Z0-9._/-]+@(v[0-9]|main|master)" .github/workflows/   # empty

Spot-verified three pins against the tag they claim:

action pinned SHA resolves to
actions/checkout@v7.0.1 3d3c42e5aac5ba805825da76410c181273ba90b1
astral-sh/setup-uv@v7.6.0 37802adc94f370d6bfd71619e3f0bf239e1f3b78
actions/cache@v6.1.0 55cc8345863c7cc4c66a329aec7e433d2d1c52a9

Checks, per this repo's docs/ai/mandatory_checks.md

  • uv run ruff check → All checks passed.
  • uv run pytest → 2482 passed, 203 skipped, 4 xfailed (--ignore=tests/integration/cross_version).
  • uv run ty check → 3 diagnostics, identical on pristine main (verified by checking out upstream/main and re-running), so pre-existing and unrelated.
  • The 4 push_notifications errors and the cross_version failures also reproduce on pristine main — they are Windows subprocess/shell environment issues (TypeError: stat: path should be ... not NoneType, shell not found: neither %ComSpec% nor %SystemRoot% is set), not branch regressions. CI runs these on Linux.

All 17 checks now pass, so this is ready for review. Head is fbd96fd9204d8523199caa0000a49120604eaf41.

This branch has not been deployed

No deployments
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