Skip to content

ci: pin third-party GitHub Actions to commit SHA in IO_Iceberg_Unit_Tests.yml - #39917

Open
2akouwu wants to merge 1 commit into
apache:masterfrom
2akouwu:fix/pin-iceberg-unit-test-actions
Open

ci: pin third-party GitHub Actions to commit SHA in IO_Iceberg_Unit_Tests.yml#39917
2akouwu wants to merge 1 commit into
apache:masterfrom
2akouwu:fix/pin-iceberg-unit-test-actions

Conversation

@2akouwu

@2akouwu 2akouwu commented Aug 29, 2026

Copy link
Copy Markdown

What

Pins the third-party GitHub Actions used in IO_Iceberg_Unit_Tests.yml to their exact commit SHA instead of a mutable version tag:

  • actions/checkout@v7@3d3c42e... (# v7)
  • actions/upload-artifact@v7 (both usages) → @043fb46... (# v7)
  • EnricoMi/publish-unit-test-result-action@v2@d0a4676... (# v2)
  • jwgmeligmeyling/spotbugs-github-action@v1.2@b8e2c35... (# v1.2)

Why

A tag like @v7 can be moved to point at different code after the fact (by the action's own maintainer, or if their account/repo is compromised), so a workflow pinned only to a tag can silently start running different code than what was reviewed when the workflow was written. Pinning to a full commit SHA (keeping the version as a trailing comment for readability) is the mitigation GitHub's own Actions security hardening guide and OpenSSF Scorecard's Pinned-Dependencies check both recommend.

This only touches the one workflow file that had unpinned references; the local composite actions under ./.github/actions/... are untouched since they aren't external and don't carry this risk.

Testing

This is a CI-workflow-only change with no code path to unit test. I verified each SHA by resolving the exact commit each tag currently points to via the GitHub API (git/refs/tags/..., dereferencing the annotated tag object for EnricoMi/publish-unit-test-result-action), and confirmed the file is still valid YAML. The real verification is that the workflow keeps running identically on its next trigger, since each SHA is exactly the commit its tag currently resolves to.

…ests.yml

Pins actions/checkout, actions/upload-artifact (both usages),
EnricoMi/publish-unit-test-result-action, and
jwgmeligmeyling/spotbugs-github-action to their exact current commit
SHA instead of a mutable version tag, keeping the version as a
trailing comment for readability.

A tag can be moved to point at different code after the fact (by the
action's own maintainer, or if their account/repo is compromised), so
a workflow pinned only to a tag can silently start running different
code than what was reviewed when the workflow was written. Pinning to
a full commit SHA is the mitigation recommended by GitHub's Actions
security hardening guide and OpenSSF Scorecard's Pinned-Dependencies
check. Only this one workflow file is touched; local composite
actions under ./.github/actions/... are unaffected since they are not
external and do not carry this risk.
@github-actions github-actions Bot added the build label Aug 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Assigning reviewers:

R: @Abacn for label build.

Note: If you would like to opt out of this review, comment assign to next reviewer.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants