Repository navigation
Conversation
🤖 GitHub commentsJust comment with:
|
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the labeling workflow hardening.
No open issues 🎉
What changed in this PR
Hardens the issue and pull-request labeling workflow while retaining its existing triggers and labeling logic.
Changes:
- Pins both actions to full commit SHAs with version comments.
- Moves permissions to the triage job and removes
contents: read. - Passes the repository through
REPOin shell commands and documents whypull_request_targetis retained without checking out PR code.
| File | Description |
|---|---|
.github/workflows/labeler.yml |
Pins action dependencies, narrows token permissions, and hardens shell variable handling. |
Review effort: Balanced
xrmx
approved these changes
Nov 9, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
harden labeler workflow
What
.github/workflows/labeler.yml, trigger unchanged.permissions: {}at workflow level).pull_request_targetis kept and that no PR code is checked out.actions/create-github-app-tokenv3.3.0 andelastic/oblt-actions/github/is-member-ofv1.43.0 pinned (was floatingv1).github.repositorygoes through an env var (REPO) instead of${{ }}inrun:.contents: read(not needed).Why
pull_request_targetis needed to label fork PRs (thepull_requesttoken is read-only for forks). The workflow checks out nothing and runs no PR code.AlexanderWert/issue-labelerloads its config through the contents API atgithub.context.sha, which forpull_request_targetis the base branch commit, so a PR cannot change the labeling rules. Hardening is limited to supply chain (mutable tags), token scope and script injection. Part of thepull_request_targetaudit: https://github.com/elastic/observability-robots/issues/5292Behaviour change
None.
Verification
Done:
dangerous-triggerson the keptpull_request_targettrigger (expected, covered by the org Actions policy allowlist); notemplate-injection,unpinned-usesorexcessive-permissionsfindings.gh api repos/<o>/<r>/git/ref/tags/<tag>(annotated tags dereferenced); each is the latest published non-draft release.AlexanderWert/issue-labelerhas no release newer than v2.3 (2020, node12 action).src/main.ts): config is fetched withrepos.getContentsatref: github.context.sha.Not done:
contents: readwas not tested.🤖 Generated with Claude Code