PDP-1182 SECCMP-1797: Switch to pull_request trigger and add top-level permissions#584
Open
GAdityaVarma wants to merge 1 commit intomainfrom
Open
PDP-1182 SECCMP-1797: Switch to pull_request trigger and add top-level permissions#584GAdityaVarma wants to merge 1 commit intomainfrom
GAdityaVarma wants to merge 1 commit intomainfrom
Conversation
This workflow only validates JIRA IDs in the PR title. It does not need write permissions or secrets access. Switching to pull_request eliminates the PwnRequest attack surface entirely for this repo. Also adds explicit top-level permissions: contents: read.
There was a problem hiding this comment.
Pull request overview
This PR hardens the JIRA ID validation workflow by switching its trigger from pull_request_target to pull_request, eliminating write-token/secrets exposure for forked PRs while keeping the workflow’s behavior focused on PR title validation.
Changes:
- Switch workflow trigger from
pull_request_targettopull_request. - Add explicit top-level
permissions: contents: readto minimizeGITHUB_TOKENscope.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
|
@GAdityaVarma We can remove these workflows. Also, please create PRs to develop branch instead. |
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.
SECCMP-1797: Switch from pull_request_target to pull_request
This workflow only validates JIRA IDs in the PR title. It does not need write permissions or secrets access.
Switching to
pull_requesteliminates the PwnRequest attack surface entirely - no write token, no secrets exposure, regardless of what input is provided.Also adds explicit
permissions: contents: readat the workflow level.Ref: Preventing pwn requests