Repository navigation
Mitigate pull_request_target alert for template validation - #758
Merged
Fang Liu (fhljys) merged 1 commit intoOct 29, 2026
Merged
Fang Liu (fhljys) merged 1 commit into
Fang Liu (fhljys) merged 1 commit into
Conversation
Use a read-only pull_request workflow while preserving base-commit validation and informational findings. Replace PR comments with run summaries and migrate action outputs to GITHUB_OUTPUT. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Fang Liu (fhljys)
approved these changes
Oct 29, 2026
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.
Purpose
Address the announced execution restriction on
pull_request_targetfor.github/workflows/validate-template.ymlwithout changing the existing main-branch validation scope or making validation findings a new merge gate. No event-policy exception or repository policy change is requested.Changes
pull_request_targetwithpull_request, retaining themaintarget filter and manualworkflow_dispatchtrigger.github.event.pull_request.base.shafor PR runs, preserving validation of the base commit onmain, not PR-provided code. Manual runs fall back togithub.shafor the selected ref.contents: readand disable persisted checkout credentials. Existing third-party action SHA pins are retained; no secrets are referenced.::set-outputwith$GITHUB_OUTPUT, and pass quoted action arguments through environment variables so summary output works reliably without shell expression interpolation.CONTRIBUTING.md.Deliberate behavior differences and limits
pull_requestfork-approval and merge-conflict restrictions apply.Self-review and validation
Reviewed the full diff and checked that no upstream changes affect the touched workflow/action/documentation. No additional issues were identified in this scoped review.
Passed local checks for trigger/checkout/permission invariants, action SHA pins, Bash syntax, success and informational-finding summaries, explicit invalid-status failures, literal multiline/metacharacter-containing details, quoted arguments, JSON output round-trips, validator command failure propagation, and
git diff --check.Deno was stubbed for the shell/output tests. The actual Deno validator, a hosted GitHub Actions run, repository Policy insights, and CodeQL were not run as part of this local review.