Skip to content

Pin actions in caller templates and composite action - #39

Merged
lubomirw merged 1 commit into
mainfrom
pin-template-and-composite-actions
Jul 31, 2026
Merged

Pin actions in caller templates and composite action#39
lubomirw merged 1 commit into
mainfrom
pin-template-and-composite-actions

Conversation

@lubomirw

Copy link
Copy Markdown
Contributor

Summary

#37 SHA-pinned every action in .github/workflows/, but that scan covered only workflow files. Two other file classes in this repo reference external actions and were missed:

  • .github/actions/**/action.yml — composite action definitions
  • templates/caller-workflows/*.yml — the caller workflows distributed to every org repo by repo-template-sync

This PR closes that gap and stops it reopening.

Changes

File Action Previous Updated to
.github/actions/auto-add-to-project/action.yml actions/add-to-project v1.0.2 5afcf9...57fd # v2.0.0
templates/caller-workflows/issue-automation.yml actions/create-github-app-token (2x) v1 bcd2ba...3eb1 # v3.2.0
templates/caller-workflows/release-automation.yml actions/create-github-app-token (1x) v1 bcd2ba...3eb1 # v3.2.0
renovate.json config:recommended + helpers:pinGitHubActionDigests

After this, the only unpinned uses: refs left in the repo are the intentional org-internal moving tags: resolve-trivy-config@main and the @issue-automation-v1 / @release-automation-v1 composite action pins.

Why add-to-project v2.0.0 is safe

Diffing the upstream action.yml between v1.0.2 and v2.0.0, the entire difference is the runtime:

-  using: 'node20'
+  using: 'node24'

Inputs (project-url, github-token, labeled, label-operator) and outputs (itemId) are byte-identical. node24 needs Actions Runner >= 2.327.1; the caller template runs ubuntu-latest, GitHub-hosted, so that is satisfied. v2.0.0 has been out since 2026-05-04.

The bundled dist/index.js did absorb sizeable octokit bumps (@octokit/request 8 -> 10, plugin-paginate-rest 9 -> 13). The action contract is unchanged, but that internal churn is not visible from the manifest.

Supersedes #22, which proposed the same bump as a bare @v2.0.0 tag rather than a digest.

Why create-github-app-token v3.2.0 is safe

Identical reasoning to #37, applied to the template copies. v2 removed the deprecated app_id / private_key / skip_token_revoke inputs — all three call sites already pass the hyphenated app-id / private-key. v3's breaking changes are node24 (hosted runners) and requiring NODE_USE_ENV_PROXY for proxy support (no proxy in use). Both templates run ubuntu-latest.

This also removes a live inconsistency: #37 moved this repo onto v3.2.0 while the template shipped to ~60 org repos still carried the unmaintained v1 line.

Renovate preset

config:recommended does not include digest pinning, which is why Renovate proposed @v2.0.0 rather than a SHA. Adding helpers:pinGitHubActionDigests makes Renovate pin new action refs to digests and keep existing pins updated with their # tag comments intact, so the posture #37 established does not erode.

Rollout notes

Two follow-on steps are needed for these changes to reach org repos — neither happens on merge:

  1. issue-automation-v1 must be moved. Consuming repos reference auto-add-to-project@issue-automation-v1, and that tag currently points at 379a25a, well behind main. The add-to-project bump is inert until the tag is moved.
  2. repo-template-sync must be dispatched to propagate the two caller-workflow templates. Worth a dry_run: true pass first — it also exercises the app-token v3 and checkout v7 changes from Update GitHub Actions to latest versions #37 without opening PRs anywhere.

PR #37 SHA-pinned every action in .github/workflows/, but the scan
missed two file classes that also reference external actions: the
composite action definitions under .github/actions/ and the caller
workflow templates distributed to org repos.

actions/add-to-project v1.0.2 -> v2.0.0 in auto-add-to-project. The
only difference between the two upstream action.yml files is the
runtime (node20 -> node24); inputs and outputs are identical, and
the caller template runs on ubuntu-latest. Supersedes the Renovate
PR #22. Drops the adjacent comment about pinning to a specific
release, which the SHA pin makes redundant.

actions/create-github-app-token v1 -> v3.2.0 in both caller
workflow templates (3 refs). Same upgrade already applied to this
repo's own workflows: all call sites pass the hyphenated app-id and
private-key inputs that v2 made mandatory, and no proxy is in play
for the v3 NODE_USE_ENV_PROXY change.

Adds helpers:pinGitHubActionDigests to renovate.json so Renovate
maintains digest pins instead of proposing bare tag refs, which
config:recommended alone does not do.
@sonarqubecloud

Copy link
Copy Markdown

@lubomirw lubomirw added the dependencies Dependency updates label Jul 31, 2026
@lubomirw
lubomirw merged commit c89a3ff into main Jul 31, 2026
8 checks passed
@lubomirw
lubomirw deleted the pin-template-and-composite-actions branch July 31, 2026 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Dependency updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants