Skip to content

ci: pin GitHub Actions to commit SHAs and add pinact#89

Open
tembleking wants to merge 1 commit into
mainfrom
ci-pin-actions
Open

ci: pin GitHub Actions to commit SHAs and add pinact#89
tembleking wants to merge 1 commit into
mainfrom
ci-pin-actions

Conversation

@tembleking

Copy link
Copy Markdown
Member

Mutable tags (@v5, @V3...) let a compromised or retagged action run arbitrary code in CI with packages:write and contents:write. Pinning to full commit SHAs removes that supply-chain vector while keeping a readable `# vX` comment for humans.

Adds `pinact` to the dev shell and wires `pinact run -u` into `just update`, so pinned actions stay current on each dependency bump instead of drifting silently.

The same run bumped several actions across majors (checkout v6, upload-artifact v7, download-artifact v8, docker setup-buildx v4 / login v4 / build-push v7, action-gh-release v3, stale v10, nix-installer v22, magic-nix-cache v14, scan-action pinned at v6.3.6). Verified none of the removed inputs/env vars are used and all current options still work. The only behavioral change is download-artifact v8 erroring on digest mismatch (a security improvement); GitHub-hosted runners satisfy the new Node 24 runtime.

@tembleking tembleking requested a review from a team as a code owner June 9, 2026 10:10
Copilot AI review requested due to automatic review settings June 9, 2026 10:10
@tembleking tembleking enabled auto-merge (squash) June 9, 2026 10:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Pins GitHub Actions references to immutable commit SHAs to reduce CI supply-chain risk, and integrates pinact into the Nix dev shell + just update flow so pins can be refreshed automatically.

Changes:

  • Add pinact to the Nix dev shell and run pinact run -u during just update.
  • Update GitHub Actions workflows to use commit-SHA-pinned uses: entries (with human-readable # vX.Y.Z comments).
  • Bump the stale workflow to actions/stale v10 pinned by SHA.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
justfile Runs pinact run -u as part of just update to keep action pins current.
flake.nix Adds pinact to the dev shell packages so just update can run it.
.github/workflows/stale.yml Pins actions/stale to a specific commit SHA (v10.3.0).
.github/workflows/pull-request-ci.yaml Pins all referenced actions to commit SHAs (checkout, nix installer/cache, docker, artifacts, scan).
.github/workflows/publish.yaml Pins all referenced actions to commit SHAs (checkout, nix installer/cache, docker, artifacts, gh-release).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/pull-request-ci.yaml
Comment thread .github/workflows/pull-request-ci.yaml
Comment thread .github/workflows/pull-request-ci.yaml
Comment thread .github/workflows/pull-request-ci.yaml
Comment thread .github/workflows/publish.yaml
Comment thread .github/workflows/publish.yaml
Comment thread .github/workflows/publish.yaml
Comment thread .github/workflows/publish.yaml
Comment thread .github/workflows/publish.yaml
Comment thread .github/workflows/publish.yaml
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.

3 participants