Skip to content

ci: pin every action to an ASF-approved SHA - #16308

Merged
sbglasius merged 1 commit into
7.0.xfrom
ci/asf-approved-action-pins
Sep 3, 2026
Merged

sbglasius merged 1 commit into
7.0.xfrom
ci/asf-approved-action-pins

Conversation

@sbglasius

Copy link
Copy Markdown
Contributor

Problem

Every workflow in this repo is currently failing at startup, before any job runs:

The action gradle/actions/setup-gradle@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e is not allowed in apache/grails-core because all actions must be from a repository owned by your enterprise, created by GitHub, or match one of the patterns: 1Password/load-secrets-action/configure@3a12b0ab…, …

The 1Password/… entries at the front of that message are just the alphabetically-first patterns in the ASF allowlist — they are not the failing action. The failing action is gradle/actions/setup-gradle pinned to 50e97c2 (v6.1.0), which is not in apache/infrastructure-actions/actions.yml.

Affected: CI, Code Style, Code Analysis, Coverage, End to End, Licensing (RAT), Vulnerability Scan, Groovy Snapshot Canary, and every release workflow.

Changes

Action Before After
gradle/actions/setup-gradle (29×) 50e97c2 v6.1.0 — not approved 9c971963 v6.3.0 — approved, no expiry
aws-actions/configure-aws-credentials e7f100cf v6.2.0 — approved, expires 2026-09-20 e6de0542 v6.2.3 — approved, no expiry
actions/cache (12×, gradle.yml) @v4 floating 0057852b v4.3.0
actions/checkout (3×, vulnerability-scan.yml) @v6 floating de0fac2e v6.0.2
actions/setup-java (2×, vulnerability-scan.yml) @v4 floating be666c2f v5.2.0

gradle/actions/setup-gradle@9c971963 is v6.3.0, the newest approved entry and the only v6 entry with no expires_at. v6.1.1 (5e2ebd06) is also approved but expires 2026-09-05, so pinning to it would have re-broken CI in two days.

The actions/* refs were allowed by namespace and were not breaking anything; they are pinned here for the supply-chain consistency CLAUDE.md asks for, using the same versions already in use elsewhere in the repo. apache/grails-github-actions/*@asf is deliberately left on the branch ref — that floating pin is intentional and ASF-owned.

Verification

Every uses: in .github/workflows/ was checked against actions.yml; all third-party actions now resolve to an approved SHA with no expiry date, and each SHA was confirmed against its upstream tag via the GitHub API. All workflow YAML parses.

Note

8.0.x carries the same unapproved 50e97c2 pin and is failing identically; it needs the same fix.

`gradle/actions/setup-gradle@50e97c2` (v6.1.0) is not on the ASF
allowlist, so every workflow that used it — CI, Code Style, End to End,
Coverage, RAT, Vulnerability Scan, the Groovy canary and the release
workflows — failed at startup before any job ran:

    The action gradle/actions@50e97c2
    is not allowed in apache/grails-core because all actions must be
    from a repository owned by your enterprise, created by GitHub, or
    match one of the patterns: ...

Move it to `9c971963` (v6.3.0), the current approved entry with no
expiry date. v6.1.1 is also approved but expires 2026-09-05.

Also, so the same class of failure does not come back:

- `aws-actions/configure-aws-credentials` → v6.2.3 (`e6de0542`). The
  v6.2.0 pin it replaces expires from the allowlist on 2026-09-20.
- SHA-pin the three floating `actions/*` refs left in
  `vulnerability-scan.yml` and the twelve `actions/cache@v4` refs in
  `gradle.yml`, matching the versions already used everywhere else in
  the repo. These are allowed by namespace, so they were not breaking
  anything, but CLAUDE.md asks for SHA pins for supply-chain
  consistency.

`apache/grails-github-actions/*@asf` is left on the branch ref
deliberately — it is the ASF-owned, intentionally floating pin.

Approved SHAs verified against
https://github.com/apache/infrastructure-actions/blob/main/actions.yml

@jdaugherty jdaugherty 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.

historically we have pinned the shas for github owned actions but itherwise if it runs i am good

@testlens-app

testlens-app Bot commented Sep 3, 2026

Copy link
Copy Markdown

✅ All tests passed ✅

🏷️ Commit: ecb4a4d
▶️ Tests: 49467 executed
⚪️ Checks: 51/51 completed


Learn more about TestLens at testlens.app/docs.

@sbglasius
sbglasius merged commit 3b66822 into 7.0.x Sep 3, 2026
51 of 52 checks passed
@sbglasius
sbglasius deleted the ci/asf-approved-action-pins branch September 3, 2026 20:28
@sbglasius
sbglasius restored the ci/asf-approved-action-pins branch September 3, 2026 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants