Repository navigation
Conversation
dhruvkb
requested review from
krysal and
obenland
and removed request for
Copilot
October 15, 2026 04:35
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.
Fixes
Related to #5621 and #5622
Description
This PR hardens the two workflows that run on
pull_request_target(and so have access to secrets while being triggered by untrusted PRs).#5621 and #5622 tried to exploit
pr_limit_reminders.ymlby replacingcount_user_reviewable_prs.jswith a script that exfiltrates secrets. The attempt failed becauseactions/checkoutchecks out the base branch underpull_request_target, so the PR's code never ran (the run logs show the legitimate script'sSlack username not foundwarning). However, a singleref:line would make the workflow exploitable, so this PR adds defence in depth:pr_limit_reminders.ymlACCESS_TOKENPAT with the built-inGITHUB_TOKEN, scoped tocontents: readandpull-requests: read. The script only reads open PRs and their labels in this public repo, so the PAT is unnecessary, and a future compromise would no longer leak it.persist-credentials: falseso the token is not written to.git/config.automations/js/src, which is all the step needs.permissions: {}for the Slack job, which needs no token.pr_ping.ymlpermissions: {}, as the job makes no GitHub API calls.&,<and>in the PR title and author before interpolating them into Slack mrkdwn. Currently, a PR titled e.g.<!channel>pings the whole channel, and<https://example.com|text>renders a disguised link.pr_automations.ymlandpr_automations_init.ymlwere also reviewed and need no changes: the former already checks outmainwithout credentials and validates the PR-built artifacts, and the latter runs onpull_requestwithout secrets.Testing Instructions
These workflows run from
mainonpull_request_target, so they can only be fully verified after merging. After merge:<,>or&.GH_SLACK_USERNAME_MAP. If the GraphQL query fails with a permissions error onGITHUB_TOKEN, that is the change to revisit.Locally,
just lintpasses on the changed files (actionlint, prettier, codespell) and the escape helper was checked in Node against a malicious title.Checklist
Update index.md).main) or a parent feature branch.ov just catalog/generate-docsfor catalogPRs) or the media properties generator (
ov just catalog/generate-docs media-propsfor the catalog or
ov just api/generate-docsfor the API) where applicable.Developer Certificate of Origin
Developer Certificate of Origin
🤖 Generated with Claude Code