Skip to content

Pin GitHub Actions to full-length commit SHAs - #5353

Merged
Timothee Guerin (timotheeguerin) merged 1 commit into
Azure:mainfrom
timotheeguerin:pin-actions
Aug 31, 2026
Merged

Pin GitHub Actions to full-length commit SHAs#5353
Timothee Guerin (timotheeguerin) merged 1 commit into
Azure:mainfrom
timotheeguerin:pin-actions

Conversation

@timotheeguerin

Copy link
Copy Markdown
Member

Every third-party action in our workflows was referenced by a mutable tag (actions/checkout@v7). Tags can be retargeted, so a compromised upstream repo silently gets write access to our CI — exactly what happened in the tj-actions/changed-files and codfish/semantic-release-action compromises.

Every action is now pinned to a full-length commit SHA, with the version kept as a comment so it stays readable and Dependabot can keep bumping it:

- uses: actions/checkout@v7
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

Dependabot also gets a 7 day cooldown on the github-actions ecosystem, giving the community a window to spot a compromised release before we auto-adopt it.

The SHAs resolve to the same commits the tags pointed at, so there is no behavioral change. Generated *.lock.yml agentic workflows are untouched — gh-aw already emits pinned SHAs there.

Redo of #5341, which went stale with conflicts. See https://aka.ms/action-pinning.

@github-actions

Copy link
Copy Markdown
Contributor

No changes needing a change description found.

@github-actions

Copy link
Copy Markdown
Contributor

Go emitter diff

Baseline gh:97966bdb670ef6703f7b97ba97a26db18cb56784 vs this PR.

No changes to generated output.

Rendered diff: inline on the run summary, or the emitter-diff-go-html artifact.

Informational check (core/eng/emitter-diff); does not block the PR.

@github-actions

Copy link
Copy Markdown
Contributor

📦 Package size report

✅ No notable package size changes compared to the base branch.

13 package(s) with no notable change
Package Packed (base → head) Δ Packed Unpacked (base → head) Δ Unpacked
@azure-tools/typespec-java 13.51 MB → 13.51 MB -142 B (-0.0%) 15.03 MB → 15.03 MB
@azure-tools/azure-http-specs 146.71 KB → 146.71 KB 1.16 MB → 1.16 MB
@azure-tools/typespec-autorest 80.93 KB → 80.93 KB 395.06 KB → 395.06 KB
@azure-tools/typespec-autorest-canonical 7.42 KB → 7.42 KB 26.00 KB → 26.00 KB
@azure-tools/typespec-azure-core 130.22 KB → 130.22 KB 706.76 KB → 706.76 KB
@azure-tools/typespec-azure-portal-core 42.40 KB → 42.40 KB 192.91 KB → 192.91 KB
@azure-tools/typespec-azure-resource-manager 171.92 KB → 171.92 KB 1.04 MB → 1.04 MB
@azure-tools/typespec-azure-rulesets 5.16 KB → 5.16 KB 32.09 KB → 32.09 KB
@azure-tools/typespec-client-generator-core 229.48 KB → 229.48 KB 1.23 MB → 1.23 MB
@azure-tools/typespec-go 260.21 KB → 260.21 KB 1.33 MB → 1.33 MB
@azure-tools/typespec-metadata 15.91 KB → 15.91 KB 62.26 KB → 62.26 KB
@azure-tools/typespec-python 42.22 KB → 42.22 KB 164.91 KB → 164.91 KB
@azure-tools/typespec-ts 536.71 KB → 536.71 KB 2.58 MB → 2.58 MB

Packed = gzipped .tgz published to npm. Unpacked = total extracted size. 🆕 added, 🗑️ removed. Packages from the core/ submodule are not included.
🔴 grew · 🟢 shrank — only changes of at least 512 B and 0.5% are marked.

@azure-sdk-automation

Copy link
Copy Markdown
Contributor

You can try these changes here

🛝 Playground 🌐 Website

Merged via the queue into Azure:main with commit 891130c Aug 31, 2026
44 of 46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants