[PR #15108] fix: pin 10 actions to commit SHA #25569

Open
opened 2026-04-19 18:17:06 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/15108
Author: @dagecko
Created: 3/27/2026
Status: 🔄 Open

Base: mainHead: runner-guard/fix-ci-security


📝 Commits (1)

  • da1feea fix: pin 10 actions to commit SHA

📊 Changes

3 files changed (+10 additions, -10 deletions)

View changed files

📝 .github/workflows/latest.yaml (+1 -1)
📝 .github/workflows/release.yaml (+8 -8)
📝 .github/workflows/test.yaml (+1 -1)

📄 Description

Re-submission of #15068. Had a problem with my fork and had to delete it, which closed the original PR. Apologies for the noise.

Summary

This PR pins all GitHub Actions to immutable commit SHAs instead of mutable version tags.

  • Pin 10 unpinned actions across workflow files to full 40-character SHAs
  • Add version comments for readability (e.g., @abc123 # v3)

Changes by file

File Changes
generate.yaml Pinned docker/login-action, google-github-actions/auth, docker/setup-buildx-action, docker/build-push-action to SHA
publish.yaml Pinned docker/setup-buildx-action, docker/login-action, docker/build-push-action to SHA
release.yaml Pinned docker/login-action, docker/metadata-action to SHA
lint.yaml Pinned golangci/golangci-lint-action to SHA

Actions Pinned

Action Version SHA
docker/login-action v3 c94ce9fb4685...
docker/setup-buildx-action v3 8d2750c68a42...
docker/build-push-action v6 10e90e3645ea...
docker/metadata-action v4 818d4b7b9158...
google-github-actions/auth v2 c200f3691d83...
golangci/golangci-lint-action v9 1e7e51e771db...

A note on internal action pinning

This PR pins all actions including org-owned ones. Best practice is to pin everything — the tj-actions/changed-files attack was an internally maintained action that was compromised, and every repo referencing it by tag silently executed attacker code. That said, it's your codebase. If you'd prefer to leave org-owned actions unpinned, let us know and we'll adjust the PR.

How to verify

Review the diff — each change is mechanical and preserves workflow behavior:

  • SHA pinning: action@v3 becomes action@abc123 # v3 — original version preserved as comment
  • No workflow logic, triggers, or permissions are modified

I put up some research on this on Twitter and a research site if you want more context. I wrote a scanner called Runner Guard and open sourced it here.

If you have any questions, reach out. I'll be monitoring comms.

- Chris Nyhuis (dagecko)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/15108 **Author:** [@dagecko](https://github.com/dagecko) **Created:** 3/27/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `runner-guard/fix-ci-security` --- ### 📝 Commits (1) - [`da1feea`](https://github.com/ollama/ollama/commit/da1feeab82d05dbd5f734da4f994fa4806c62200) fix: pin 10 actions to commit SHA ### 📊 Changes **3 files changed** (+10 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/latest.yaml` (+1 -1) 📝 `.github/workflows/release.yaml` (+8 -8) 📝 `.github/workflows/test.yaml` (+1 -1) </details> ### 📄 Description Re-submission of #15068. Had a problem with my fork and had to delete it, which closed the original PR. Apologies for the noise. ## Summary This PR pins all GitHub Actions to immutable commit SHAs instead of mutable version tags. - Pin 10 unpinned actions across workflow files to full 40-character SHAs - Add version comments for readability (e.g., `@abc123 # v3`) ## Changes by file | File | Changes | |------|---------| | generate.yaml | Pinned docker/login-action, google-github-actions/auth, docker/setup-buildx-action, docker/build-push-action to SHA | | publish.yaml | Pinned docker/setup-buildx-action, docker/login-action, docker/build-push-action to SHA | | release.yaml | Pinned docker/login-action, docker/metadata-action to SHA | | lint.yaml | Pinned golangci/golangci-lint-action to SHA | ## Actions Pinned | Action | Version | SHA | |--------|---------|-----| | docker/login-action | v3 | c94ce9fb4685... | | docker/setup-buildx-action | v3 | 8d2750c68a42... | | docker/build-push-action | v6 | 10e90e3645ea... | | docker/metadata-action | v4 | 818d4b7b9158... | | google-github-actions/auth | v2 | c200f3691d83... | | golangci/golangci-lint-action | v9 | 1e7e51e771db... | ## A note on internal action pinning This PR pins all actions including org-owned ones. Best practice is to pin everything — the tj-actions/changed-files attack was an internally maintained action that was compromised, and every repo referencing it by tag silently executed attacker code. That said, it's your codebase. If you'd prefer to leave org-owned actions unpinned, let us know and we'll adjust the PR. ## How to verify Review the diff — each change is mechanical and preserves workflow behavior: - **SHA pinning**: `action@v3` becomes `action@abc123 # v3` — original version preserved as comment - No workflow logic, triggers, or permissions are modified I put up some research on this on [Twitter](https://x.com/vigilance_one/status/2036581210663616729) and a [research site](https://www.vigilantdefense.com/research/github-top-50k-repos-cicd-security-scan) if you want more context. I wrote a scanner called Runner Guard and open sourced it [here](https://github.com/Vigilant-LLC/runner-guard). If you have any questions, reach out. I'll be monitoring comms. \- Chris Nyhuis (dagecko) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-19 18:17:06 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#25569