Pin all GitHub Actions to exact commit hashes#1448
Conversation
Co-Authored-By: Konstantin Wohlwend <n2d4xc@gmail.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (18)
📝 WalkthroughWalkthroughThis PR pins GitHub Actions to specific commit SHAs across 16 workflow files to improve CI reproducibility and security. Every action reference from version tags (e.g., ChangesGitHub Actions pinning to commit SHAs
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Pins third-party GitHub Actions across this repository’s CI/workflow definitions to exact commit SHAs to improve supply-chain security, while retaining the original version tags as inline comments for readability/auditing.
Changes:
- Replaced all
uses: owner/action@vXreferences withuses: owner/action@<full_sha>. - Preserved the prior tag (e.g.
v4,v6,v7) as an inline comment next to each pinned SHA. - Updated workflows spanning CI, e2e tests, Docker/QEMU builds, publishing, and automation jobs.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/table-of-contents.yaml | Pins technote-space/toc-generator to a commit SHA. |
| .github/workflows/sync-main-to-dev.yml | Pins actions/checkout to a commit SHA. |
| .github/workflows/swift-sdk-publish.yaml | Pins actions/checkout to a commit SHA for Swift SDK publish workflow. |
| .github/workflows/setup-tests.yaml | Pins checkout/setup-node/pnpm/background-action to SHAs. |
| .github/workflows/setup-tests-with-custom-base-port.yaml | Pins checkout/setup-node/pnpm/background-action to SHAs. |
| .github/workflows/reviewers-assignees.yml | Pins actions/github-script steps to a commit SHA. |
| .github/workflows/qemu-emulator-build.yaml | Pins checkout/docker actions/pnpm/setup-node/cache/artifact actions to SHAs. |
| .github/workflows/npm-publish.yaml | Pins checkout/setup-node/pnpm to SHAs. |
| .github/workflows/mirror-to-wdb.yaml | Pins actions/checkout to a commit SHA. |
| .github/workflows/lint-and-build.yaml | Pins checkout/setup-node/pnpm to SHAs. |
| .github/workflows/e2e-fallback-tests.yaml | Pins checkout/setup-node/pnpm/background-action to SHAs. |
| .github/workflows/e2e-custom-base-port-api-tests.yaml | Pins checkout/setup-node/pnpm/background-action to SHAs. |
| .github/workflows/e2e-api-tests.yaml | Pins checkout/setup-node/pnpm/background-action to SHAs. |
| .github/workflows/e2e-api-tests-local-emulator.yaml | Pins checkout/setup-node/pnpm/background-action to SHAs. |
| .github/workflows/docker-server-build-run.yaml | Pins actions/checkout to a commit SHA. |
| .github/workflows/docker-server-build-push.yaml | Pins checkout and docker build/login/metadata actions to SHAs. |
| .github/workflows/db-migration-backwards-compatibility.yaml | Pins checkout/setup-node/pnpm/background-action to SHAs throughout the workflow. |
| .github/workflows/check-prisma-migrations.yaml | Pins checkout/setup-node/pnpm/background-action to SHAs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Greptile SummaryThis PR pins all GitHub Actions across 18 workflow files to exact commit SHAs for supply chain security hardening, preserving the original version tags as inline comments (e.g.,
Confidence Score: 5/5Safe to merge — purely mechanical replacement of mutable version tags with immutable commit SHAs, with no workflow logic touched. Every changed line is a one-to-one substitution of a version tag for a commit hash, with the original tag preserved as a comment. The same SHA is used consistently across all files that shared the same action+version. Files that were already SHA-pinned or had no external actions were correctly left out. No behaviour changes, no logic edits, no new permissions. No files require special attention. The two pre-existing SHA-pinned files (auto-assign.yaml, auto-update.yaml) are missing # vX version comments for readability, but this is cosmetic and outside the scope of this PR. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[GitHub Actions Workflow] --> B{Action Reference}
B -->|Before PR: version tag| C["uses: actions/checkout@v6"]
B -->|After PR: commit SHA| D["uses: actions/checkout@de0fac2e… #v6"]
C --> E[GitHub resolves tag to commit]
E --> F{Tag mutable?}
F -->|Yes - tag can be moved| G["⚠️ Resolves to attacker-controlled commit"]
D --> H[GitHub loads exact pinned commit]
H --> I["✅ Immutable - supply chain safe"]
subgraph Unchanged [Already-pinned / no external actions]
J["auto-assign.yaml (already SHA-pinned)"]
K["auto-update.yaml (already SHA-pinned)"]
L["all-good.yaml (no uses: directives)"]
end
Reviews (1): Last reviewed commit: "Pin all GitHub Actions to exact commit h..." | Re-trigger Greptile |
Pin all GitHub Actions to exact commit hashes for supply chain security. Version tags are preserved as inline comments.
Link to Devin session: https://app.devin.ai/sessions/7ab88b0a615946caa4c8f10563680ead
Requested by: @N2D4
Note
Low Risk
Low risk since this only updates GitHub Actions workflow references to pinned commit SHAs, without changing application code or workflow logic; primary risk is accidental breakage if a pinned SHA is incorrect or later removed.
Overview
Pins all GitHub Actions used across CI workflows to exact commit SHAs (e.g.,
actions/checkout,actions/setup-node,pnpm/action-setup, Docker build/push actions,actions/cache, artifact upload/download,actions/github-script, andtechnote-space/toc-generator) while keeping the human-readable version tags as comments.This hardens the workflows against supply-chain tampering by eliminating floating version tags, with no intended changes to job behavior beyond the action resolution source.
Reviewed by Cursor Bugbot for commit fd061e6. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit