Skip to content

fix: pin GitHub Actions to ASF-approved commit hashes - #15523

Merged
jamesfredley merged 1 commit into
7.0.xfrom
fix/approved-github-actions-compliance
Mar 21, 2026
Merged

jamesfredley merged 1 commit into
7.0.xfrom
fix/approved-github-actions-compliance

Conversation

@jamesfredley

Copy link
Copy Markdown
Contributor

Summary

Pin all third-party GitHub Actions to commit hashes listed in apache/infrastructure-actions approved_patterns.yml to comply with ASF infrastructure gateway requirements.

Changes

gradle/actions/setup-gradle (11 files, ~32 occurrences)

  • @v4 -> @4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 (v5.0.0) - closest approved commit to v4
  • @v5 -> @0723195856401067f7a2779048b490ace7a47d7c (v5.0.2) - IS the v5 floating tag

Affected: gradle.yml, groovy-joint-workflow.yml, rat.yml, codestyle.yml, all 5 forge-deploy-*.yml, release.yml, release-publish-docs.yml

google-github-actions/auth (5 files, 10 occurrences)

  • @140bb5113ffb6b65a7e9b937a81fa96cf5064462 (v2.1.11) -> @7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 (v3.0.0) - only approved option

Affected: all 5 forge-deploy-*.yml (deploy + deployAnalytics jobs)

google-github-actions/setup-gcloud (5 files, 10 occurrences)

  • @6a7c903a70c8625ed6700fa299f5ddb4ca6022e9 (v2.1.5) -> @aa5489c8933f4cc7a4f7d45035b3b1440c9c10db (v3.0.1) - only approved option

Affected: same 5 forge-deploy-*.yml files

Compatibility

  • gradle/actions v5: Gradle 8.14.x is well within the supported range
  • google-github-actions/auth v3: Verified credentials_json and create_credentials_file inputs still supported (v3 bumps to Node 24, removes old deprecated params not used by our workflows)
  • google-github-actions/setup-gcloud v3: Verified project_id input still supported

Actions Already Compliant (no changes needed)

Action Reason
actions/checkout@v6, actions/setup-java, actions/cache, actions/upload-artifact GitHub-official (implicitly approved)
github/codeql-action/*@v4 GitHub-official (implicitly approved)
apache/grails-github-actions/*@asf Apache org (implicitly approved)
testlens-app/setup-testlens@v1 Wildcard approved (@*)
nick-fields/retry@ce71cc... Wildcard approved (@*)
softprops/[email protected] Wildcard approved (@*)
release-drafter/release-drafter@v7 Wildcard approved (@*)

Pin all third-party GitHub Actions to commit hashes listed in
apache/infrastructure-actions approved_patterns.yml to comply with
ASF infrastructure gateway requirements.

Changes:
- gradle/actions/setup-gradle: @v4 -> @4d9f0ba (v5.0.0),
  @v5 -> @0723195 (v5.0.2)
- google-github-actions/auth: @140bb51 (v2.1.11) -> @7c6bc77 (v3.0.0)
- google-github-actions/setup-gcloud: @6a7c903 (v2.1.5) -> @aa5489c (v3.0.1)

Assisted-by: Claude Code <[email protected]>
Copilot AI review requested due to automatic review settings March 21, 2026 03:29
@jamesfredley
jamesfredley merged commit 33951b0 into 7.0.x Mar 21, 2026
27 of 28 checks passed
@jamesfredley
jamesfredley deleted the fix/approved-github-actions-compliance branch March 21, 2026 03:32

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 third-party GitHub Actions used by this repository’s CI/release/deploy workflows to ASF-approved commit hashes to satisfy Apache infrastructure gateway requirements.

Changes:

  • Replace gradle/actions/setup-gradle@v4/v5 with approved commit SHAs across CI, release, and deploy workflows.
  • Update google-github-actions/auth and google-github-actions/setup-gcloud usages in Forge deploy workflows to approved commit SHAs.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
.github/workflows/release.yml Pins gradle/actions/setup-gradle to an approved SHA for release-related jobs.
.github/workflows/release-publish-docs.yml Pins gradle/actions/setup-gradle to an approved SHA for docs publishing.
.github/workflows/rat.yml Pins gradle/actions/setup-gradle to an approved SHA for RAT auditing.
.github/workflows/groovy-joint-workflow.yml Pins gradle/actions/setup-gradle to an approved SHA for Groovy/Grails joint validation.
.github/workflows/gradle.yml Pins gradle/actions/setup-gradle to an approved SHA across CI jobs.
.github/workflows/forge-deploy-snapshot.yml Pins Gradle setup + updates Google auth/setup-gcloud actions to approved SHAs for snapshot deploy.
.github/workflows/forge-deploy-release.yml Pins Gradle setup + updates Google auth/setup-gcloud actions to approved SHAs for release deploy.
.github/workflows/forge-deploy-prev.yml Pins Gradle setup + updates Google auth/setup-gcloud actions to approved SHAs for “prev” deploy.
.github/workflows/forge-deploy-prev-snapshot.yml Pins Gradle setup + updates Google auth/setup-gcloud actions to approved SHAs for “prev-snapshot” deploy.
.github/workflows/forge-deploy-next.yml Pins Gradle setup + updates Google auth/setup-gcloud actions to approved SHAs for “next” deploy.
.github/workflows/codestyle.yml Pins gradle/actions/setup-gradle to an approved SHA for code style checks.

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

jdaugherty pushed a commit to codeconsole/grails-core that referenced this pull request Jun 3, 2026
Fixes a long-standing set of issues with the Release - Drafter workflow that
collectively prevented per-branch draft releases from working correctly
across 7.0.x, 7.1.x, 7.2.x, and 8.0.x. Symptoms included drafter runs queued
for hours behind the release pipeline, the 8.0.x draft never being created,
and release notes silently bumping from stale baselines.

Root causes addressed:

1. Concurrency lock with release.yml: release-notes.yml shared the
   "release-pipeline-${branch}" concurrency group with release.yml, whose
   manual approval gates routinely keep release runs in the "waiting" state
   for days. Drafter runs queued behind those gates routinely lasted
   1400-2000+ minutes before being cancelled, leaving drafts stale. Fix:
   switch to "release-drafter-${branch}" group with cancel-in-progress so
   the latest push wins. Drafter and release.yml never touch the same
   release object: drafter targets the next-version draft, release.yml the
   currently-published tag, so splitting the groups is safe.

2. Prereleases excluded from "last release" detection: every Apache Grails
   release (v7.0.11, v7.1.1, v8.0.0-M1, ...) is published with
   prerelease=true on GitHub during the ASF vote process. With
   release-drafter's default include-pre-releases=false, those releases
   were filtered out when looking for the "last release", so 7.0.x bumped
   from v7.0.10 instead of v7.0.11 and 8.0.x reported "No last release
   found" (because v8.0.0-M1 was the only release on that branch and was
   excluded), falling back to walking the entire 265-release commit
   history and exhausting the GitHub API rate limit. Fix: set
   include-pre-releases: true.

3. Unbounded git history walk on rate-limit exhaustion: when no last
   release was found, release-drafter walked unbounded parent commit
   history calling the GraphQL API per commit. Fix: set
   initial-commits-since to bound the walk to a recent date floor for
   branches with no prior matching release (e.g. 7.2.x today).

4. Release-drafter v7.2.0 bug: initial-commits-since was silently ignored
   when set only in release-drafter.yml (not also as a workflow input).
   Fix: pin to v7.2.1 (commit 563bf132657a13ded0b01fcb723c5a58cdd824e2)
   which ships the fix from upstream PR apache#1593.

5. Floating action tag on 7.0.x: 7.0.x used release-drafter@v7 while
   8.0.x was pinned to a SHA. Fix: pin all branches to the v7.2.1 commit
   SHA per ASF security policy (PR apache#15523).

6. continue-on-error swallowed all failures silently: a transient or
   permanent drafter failure looked identical to a successful run, which
   is why the broken state went unnoticed for so long. Fix: keep
   continue-on-error so PR checks stay green for transient API blips, but
   add an explicit verification step that loudly logs a workflow-summary
   warning and a GitHub Actions annotation when no draft id was produced.

7. Workflow ran on PRs targeting any branch, including feature-to-feature
   PRs that can never affect a release. Fix: restrict the pull_request
   trigger to PRs whose base ref is a release branch.

8. issues trigger ran on every issue close/reopen even though release
   drafting has nothing to do with issue lifecycle. Fix: removed.

9. Cross-branch leakage prevention: combine filter-by-commitish: true,
   filter-by-range: ~MAJOR.MINOR.0 (derived dynamically from the branch
   name) and tag-prefix: v so release-drafter can never match a release
   from a different release line when looking for either the "last
   release" to bump from or an existing draft to update.

The fix is being landed on 7.0.x and will be merged forward into 7.1.x,
7.2.x, and 8.0.x. The 8.0.x branch's existing release-drafter@5de93583
pin (v7.2.0) will be superseded by the new v7.2.1 pin during merge.

Assisted-by: claude-code:claude-4.6-opus
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.

2 participants