Mitigate privileged PR follow-up workflows by bschnurr · Pull Request #11900 · microsoft/pyright · GitHub
Skip to content

Mitigate privileged PR follow-up workflows - #11900

Merged
Bill Schnurr (bschnurr) merged 1 commit into
microsoft:mainfrom
bschnurr:ci/pin-github-actions
Oct 21, 2026
Merged

Bill Schnurr (bschnurr) merged 1 commit into
microsoft:mainfrom
bschnurr:ci/pin-github-actions

Conversation

@bschnurr

Copy link
Copy Markdown
Member

Summary

  • Remove pull_request_target from pr_follow_up_checks.yml; queue follow-up checks from Validation's requested and in_progress events, and mark queued checks skipped when Validation fails or is cancelled.
  • Check out the trusted workflow SHA without persisting credentials in the queue and primer-comment workflows.
  • Verify the source primer run, successful Validation, and complete artifact inventory using the existing loadSource validation. Resolve the target PR from trusted Validation metadata instead of artifact-provided pr_number.txt, and recheck the PR head immediately before commenting.
  • Read only the eight expected, bounded diff entries from ZIP archives without extracting archive paths. Add focused regression coverage and document the trust boundaries.

Behavior change

Follow-up checks now appear when Validation is requested or starts, rather than immediately when a PR opens or updates. Existing check reporting, fork PR resolution, and stale-head rejection are preserved. Generated advisory-analysis workflows are unchanged.

Verification

  • Five focused Python unittest cases pass, including executable YAML-reading guards for queue/report behavior, validated PR resolution, read-only candidate execution, primer provenance, artifact inventory rejection, stale PRs, and bounded archive contents.
  • ESLint passes for the changed JavaScript helper.
  • Prettier passes for the changed workflows, JavaScript helper, and documentation; git diff --check passes.

Live GitHub Actions execution has not been verified locally; the Validation-driven triggers require the updated workflow on the default branch.

Replace pull_request_target check queuing with Validation workflow_run events. Validate primer run provenance and artifact inventory, derive comment targets from trusted Validation metadata, and read only bounded expected archive entries.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@rchiodo

Rich Chiodo (rchiodo) commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

@github-actions

Copy link
Copy Markdown
Contributor

@rchiodo Rich Chiodo (rchiodo) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved via Review Center.

@rchiodo Rich Chiodo (rchiodo) added the review-auto:approved Automated review: no blocking findings (approval posted). label Oct 20, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved via Review Center.

@bschnurr
Bill Schnurr (bschnurr) merged commit d69be86 into microsoft:main Oct 21, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review-auto:approved Automated review: no blocking findings (approval posted).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants