Skip to content

build: pin actions/github-script to commit SHA in pull_request_target workflow#4571

Closed
XananasX7 wants to merge 1 commit into
agones-dev:mainfrom
XananasX7:patch-1
Closed

build: pin actions/github-script to commit SHA in pull_request_target workflow#4571
XananasX7 wants to merge 1 commit into
agones-dev:mainfrom
XananasX7:patch-1

Conversation

@XananasX7
Copy link
Copy Markdown

Pin actions/github-script to full commit SHA instead of mutable v6 tag
in the label-pr.yml workflow.

This workflow uses pull_request_target trigger which runs with write
permissions on every PR from forks. Pinning to SHA ensures immutability
and prevents supply chain attacks via tag manipulation.

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

@XananasX7
Copy link
Copy Markdown
Author

Summary

This PR pins actions/github-script to a full commit SHA in the pull_request_target workflow.

Why this matters

The pull_request_target trigger runs with base-repository context and access to secrets. The unpinned actions/github-script@v7 tag is a mutable pointer — a compromised upstream tag could inject malicious code into every workflow run that processes PRs from forks.

Fix

Pinned to the exact commit SHA, with the version annotated as a comment. One-line change, no logic changes. Ready for review.

@markmandel
Copy link
Copy Markdown
Member

actions/github-script@00f12e3 is not a commit.

Closing due to security concerns.

@markmandel markmandel closed this May 20, 2026
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