Skip to content

ci(github): pin third-party actions to commit SHAs#31277

Open
gnbm wants to merge 1 commit into
mainfrom
FW-6928
Open

ci(github): pin third-party actions to commit SHAs#31277
gnbm wants to merge 1 commit into
mainfrom
FW-6928

Conversation

@gnbm

@gnbm gnbm commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Issue number: FW-6928


What is the current behavior?

Several third-party GitHub Actions in our workflows and composite actions
were still referenced by mutable tags (@v6/@v7/@v8/@v4). A mutable
tag can be repointed by the action author — or an attacker who gains write
access to the action repo — to arbitrary code, which then runs with the
workflow's permissions and secrets (notably in the release pipeline).

What is the new behavior?

All remaining unpinned third-party actions are now pinned to a full-length
commit SHA with a # vX.Y.Z comment, matching the convention already used
across the repo (e.g. actions/checkout@9c091bb… # v7.0.0). Each action
keeps its current major, pinned to the latest patch of that major. Every
SHA was independently verified against its upstream tag.

File Action Pinned to
actions/build-angular/action.yml actions/setup-node 820762786… # v7.0.0
actions/upload-archive/action.yml actions/upload-artifact 043fb46d1… # v7.0.1
actions/test-core-screenshot/action.yml actions/upload-artifact 043fb46d1… # v7.0.1
actions/download-archive/action.yml actions/download-artifact 3e5f45b2c… # v8.0.1
actions/update-reference-screenshots/action.yml actions/download-artifact 3e5f45b2c… # v8.0.1
codeql-analysis.yml (init + analyze) github/codeql-action 7188fc363… # v4.37.1
conventional-commit.yml amannn/action-semantic-pull-request 48f256284… # v6.1.1
label.yml actions/labeler b8dd2d9be… # v6.2.0

Local uses: ./… composite/reusable refs are intentionally left unchanged
(same-repo, no external supply-chain risk).

Does this introduce a breaking change?

  • Yes
  • No

No behavioural change — this only pins which upstream commit CI executes.

Other information

  • No major-version upgrades; that's deferred as a separate maintenance concern.
  • Follow-ups considered but out of scope: a CI guard to block reintroducing
    unpinned actions, and a github-actions Dependabot entry to keep the pins
    bumped.

Pin all remaining unpinned third-party GitHub Actions to full-length
commit SHAs (with a # vX.Y.Z comment) to harden the CI/CD supply chain
against a compromised upstream tag being repointed to malicious code.

Each action keeps its current major version, pinned to the latest patch
of that major (SHA verified against the upstream tag):

- actions/setup-node          -> v7.0.0  (matches existing repo pins)
- actions/upload-artifact     -> v7.0.1
- actions/download-artifact   -> v8.0.1
- github/codeql-action        -> v4.37.1 (init + analyze, same SHA)
- amannn/action-semantic-pull-request -> v6.1.1
- actions/labeler             -> v6.2.0

Local ./ composite/reusable refs are unchanged (same-repo, no external
supply-chain risk).
@vercel

vercel Bot commented Jul 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ionic-framework Ready Ready Preview, Comment Jul 20, 2026 6:45pm

Request Review

@gnbm gnbm changed the title ci(github): pin third-party actions to commit SHAs (FW-6928) ci(github): pin third-party actions to commit SHAs Jul 20, 2026
@gnbm gnbm added the package: core @ionic/core package label Jul 20, 2026
@gnbm
gnbm requested a review from Copilot July 20, 2026 21:47

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

This PR improves GitHub Actions supply-chain security by pinning third-party uses: references (in workflows and composite actions) to full commit SHAs, with version comments, instead of mutable tags.

Changes:

  • Pin remaining third-party GitHub Actions (actions/*, github/codeql-action, amannn/action-semantic-pull-request) to full commit SHAs with # vX.Y.Z comments.
  • Apply the same pinning convention consistently across workflows and reusable/composite actions.
  • Keep local uses: ./... references unchanged (same-repo).

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
.github/workflows/actions/build-angular/action.yml Pins actions/setup-node to a commit SHA for reproducible builds.
.github/workflows/actions/upload-archive/action.yml Pins actions/upload-artifact to a commit SHA for reproducible artifact uploads.
.github/workflows/actions/download-archive/action.yml Pins actions/download-artifact to a commit SHA for reproducible artifact downloads.
.github/workflows/actions/update-reference-screenshots/action.yml Pins actions/download-artifact to a commit SHA for secure artifact retrieval.
.github/workflows/actions/test-core-screenshot/action.yml Pins actions/upload-artifact to a commit SHA for secure artifact publishing.
.github/workflows/codeql-analysis.yml Pins CodeQL init/analyze actions to a commit SHA for stable security scanning.
.github/workflows/conventional-commit.yml Pins amannn/action-semantic-pull-request to a commit SHA for stable PR title validation.
.github/workflows/label.yml Pins actions/labeler to a commit SHA for stable PR labeling.

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

Comment thread .github/workflows/label.yml
@gnbm
gnbm marked this pull request as ready for review July 20, 2026 21:54
@gnbm
gnbm requested a review from a team as a code owner July 20, 2026 21:54
@gnbm
gnbm requested review from ShaneK and brandyscarney and removed request for brandyscarney July 20, 2026 21:54

@ShaneK ShaneK left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: core @ionic/core package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants