Skip to content

build: pin peter-evans/repository-dispatch to commit SHA#29554

Closed
XananasX7 wants to merge 1 commit into
bazelbuild:masterfrom
XananasX7:patch-2
Closed

build: pin peter-evans/repository-dispatch to commit SHA#29554
XananasX7 wants to merge 1 commit into
bazelbuild:masterfrom
XananasX7:patch-2

Conversation

@XananasX7

Copy link
Copy Markdown
Contributor

Pin peter-evans/repository-dispatch to full commit SHA instead of mutable
v4 tag. This workflow has access to secrets.BAZEL_DOC_TRIGGER_TOKEN
(a fine-grained PAT with write access to bazel-contrib/bazel-docs).

Pinning to SHA ensures immutability and prevents supply chain attacks
via tag manipulation of the third-party action.

Ref: https://docs.github.com/en/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions#using-third-party-actions

Pin `peter-evans/repository-dispatch` to full commit SHA instead of mutable
  `v4` tag. This workflow has access to `secrets.BAZEL_DOC_TRIGGER_TOKEN`
  (a fine-grained PAT with write access to bazel-contrib/bazel-docs).

  Pinning to SHA ensures immutability and prevents supply chain attacks
  via tag manipulation of the third-party action.

  Ref: https://docs.github.com/en/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions#using-third-party-actions
@github-actions github-actions Bot added team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website awaiting-review PR is awaiting review from an assigned reviewer labels May 16, 2026
@XananasX7

Copy link
Copy Markdown
Contributor Author

Summary

This PR pins peter-evans/repository-dispatch to a full commit SHA instead of a mutable version tag.

Why this matters

The workflow using this action runs on push and pull_request events. The peter-evans/repository-dispatch action is used to trigger downstream CI workflows. A supply chain attack via tag manipulation on this action could be used to trigger arbitrary repository dispatch events or interfere with CI pipelines.

Fix

peter-evans/repository-dispatch@v3 → pinned to its exact commit SHA, with the version annotated in a comment for human readability. This ensures the workflow always uses an immutable, auditable version of the action.

This is a minimal, one-line change. Ready for review.

@Wyverald Wyverald added awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally and removed awaiting-review PR is awaiting review from an assigned reviewer labels May 20, 2026
@github-actions github-actions Bot removed the awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally label May 20, 2026
kapunahelewong pushed a commit to kapunahelewong/bazel that referenced this pull request May 27, 2026
…#29554)

Pin `peter-evans/repository-dispatch` to full commit SHA instead of mutable
  `v4` tag. This workflow has access to `secrets.BAZEL_DOC_TRIGGER_TOKEN`
  (a fine-grained PAT with write access to bazel-contrib/bazel-docs).

  Pinning to SHA ensures immutability and prevents supply chain attacks
  via tag manipulation of the third-party action.

  Ref: https://docs.github.com/en/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions#using-third-party-actions

Closes bazelbuild#29554.

PiperOrigin-RevId: 918468468
Change-Id: I3dc6a7f78d07b3584908c5f7e6d0e6d4747ce6c5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants