Skip to content

Pin GitHub Actions to specific stable versions (#1854)#1865

Merged
Liraim merged 1 commit into
evidentlyai:mainfrom
strickvl:ci-pin-actions-1854
May 2, 2026
Merged

Pin GitHub Actions to specific stable versions (#1854)#1865
Liraim merged 1 commit into
evidentlyai:mainfrom
strickvl:ci-pin-actions-1854

Conversation

@strickvl
Copy link
Copy Markdown
Contributor

Part 2 of #1854 (paired with #1864). Pins every third-party GitHub Actions reference in the repo to a specific stable version, so a force-pushed tag on an upstream action cannot silently run new code here.

Approach

Conservative: stay on the same major version the repo is already using, pin to the latest stable patch within that major. No behavioral changes expected — this is the same code the @v4 (etc.) floating tag resolves to right now.

Pin targets

Action Before After
actions/checkout @v4 (and @master in docker.yml) @v4.3.1
actions/setup-python @v5 @v5.6.0
actions/upload-artifact @v4 @v4.6.2
actions/download-artifact @v4 @v4.3.0
actions/cache @v4 @v4.3.0
actions/setup-node @v4 @v4.4.0
astral-sh/setup-uv @v4 / @v7 @v4.2.0 / @v7.6.0
pnpm/action-setup @v3 @v3.0.0
marocchino/sticky-pull-request-comment @v2 @v2.9.4
docker/login-action @v3 @v3.7.0
docker/setup-buildx-action @v3 @v3.12.0
docker/setup-qemu-action @v3 @v3.7.0
docker/build-push-action @v5 @v5.4.0
ncipollo/release-action @v1 @v1.21.0
pypa/gh-action-pypi-publish @release/v1 (branch ref) @v1.14.0
tj-actions/changed-files @v42 SHA-pinned @aa08304b with # v42.1.0 comment

Notes

  • actions/checkout@master in docker.yml was tracking the default branch, which is the worst-case pinning scenario. Now pinned to v4.3.1 along with the rest.
  • tj-actions/changed-files is SHA-pinned rather than tag-pinned because it was the target of a documented March 2025 supply-chain attack where version tags were force-pushed to malicious commits. The pinned commit aa08304bd477b800d468db44fe10f6c61f7f7b11 is the legitimate v42.1.0 from 2024-03-09, pre-dating the incident by a year. A trailing comment (# v42.1.0) keeps the version readable. Happy to switch to plain tag pinning if you prefer consistency with the other actions.
  • pypa/gh-action-pypi-publish: moved from the release/v1 branch ref to @v1.14.0. OIDC trusted-publishing is a PyPI server-side feature keyed on {repo, workflow, environment}, so this change is purely a ref-type change and does not affect publishing behavior.
  • This PR does not include the tj-actions/changed-files major upgrade (v42 → v47) — held off intentionally to avoid bundling a major-version bump with a security pin. If you want that bump, a follow-up PR would be appropriate.

Test plan

  • CI on this PR exercises most of main.yml end-to-end. The changed-files job, linter, tests, UI builds, and Playwright runs should all succeed with pinned versions.
  • release.yml is tag-triggered and can't be exercised from a PR; behavioral changes are zero (same major versions), so low risk.
  • deploy-artifacts-to-github-pages.yml runs after CI completes via workflow_run; same story.
  • docker.yml is workflow_dispatch only; the actions/checkout@master@v4.3.1 change is functionally identical to all the other checkout call sites.

Replaces floating major tags (@v4, @v5, ...) with specific patch releases
so a force-pushed tag on an upstream action can't silently run new code
in this repo's CI. Pin targets are the latest stable release within each
action's currently-used major version, so no behavioral change is
expected.

- `actions/checkout` → v4.3.1 (also replaces @master in docker.yml)
- `actions/setup-python` → v5.6.0
- `actions/upload-artifact` → v4.6.2
- `actions/download-artifact` → v4.3.0
- `actions/cache` → v4.3.0
- `actions/setup-node` → v4.4.0
- `astral-sh/setup-uv` → v4.2.0 (workflows) / v7.6.0 (share-actions)
- `pnpm/action-setup` → v3.0.0
- `marocchino/sticky-pull-request-comment` → v2.9.4
- `docker/login-action` → v3.7.0
- `docker/setup-buildx-action` → v3.12.0
- `docker/setup-qemu-action` → v3.7.0
- `docker/build-push-action` → v5.4.0
- `ncipollo/release-action` → v1.21.0
- `pypa/gh-action-pypi-publish` → v1.14.0 (was `release/v1` branch ref)
- `tj-actions/changed-files` → SHA-pinned to aa08304b (v42.1.0), since
  this action was the subject of a March 2025 supply-chain attack where
  version tags were force-pushed to malicious commits.
@github-actions
Copy link
Copy Markdown

📚 Artifacts deployed to GitHub Pages: https://evidentlyai.github.io/evidently/ci/#pr-1865-ci-pin-actions-1854

@emeli-dral emeli-dral requested a review from Liraim May 1, 2026 16:18
Copy link
Copy Markdown
Collaborator

@Liraim Liraim left a comment

Choose a reason for hiding this comment

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

Hi,
Thank you for your contribution!
All changes look good.

@Liraim Liraim merged commit 3d00af6 into evidentlyai:main May 2, 2026
21 checks passed
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.

2 participants