Skip to content

Add intelligent, security-first PR sweeper automation - #483

Merged
soyalejolopez merged 1 commit into
microsoft:masterfrom
soyalejolopez:upstream-pr-sweeper
Jul 22, 2026
Merged

Add intelligent, security-first PR sweeper automation#483
soyalejolopez merged 1 commit into
microsoft:masterfrom
soyalejolopez:upstream-pr-sweeper

Conversation

@soyalejolopez

Copy link
Copy Markdown
Member

A two-stage, pwn-request-safe automation that helps maintainers triage community PRs quickly while keeping untrusted fork code away from secrets.

Stage 1 (pull_request_target, no checkout of PR code): deterministic guardrails

  • size/scope caps, path/secret/binary heuristics, license & DCO checks, and label routing. Never executes PR code. Stage 2 (workflow_run, read-only token): optional AI review summary posted as a
    sticky comment. Models are configurable (default GitHub Models: gpt-5 + o3, with
    an Azure OpenAI fallback for Opus-class review); no auto-merge.

Includes: CODEOWNERS (placeholder maintainer team, documented), Dependabot for GitHub Actions with SHA-pin awareness, config in .github/pr-sweeper.config.mjs, helper libs under .github/scripts/pr-sweeper/, and a README explaining setup + required secrets. Entirely opt-in and least-privilege by design.

Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com

Copilot-Session: cecb163d-04c4-4b01-ab7a-14d25f7ec690

A two-stage, pwn-request-safe automation that helps maintainers triage community PRs quickly while keeping untrusted fork code away from secrets.

Stage 1 (pull_request_target, no checkout of PR code): deterministic guardrails
- size/scope caps, path/secret/binary heuristics, license & DCO checks, and label
  routing. Never executes PR code.
Stage 2 (workflow_run, read-only token): optional AI review summary posted as a
  sticky comment. Models are configurable (default GitHub Models: gpt-5 + o3, with
  an Azure OpenAI fallback for Opus-class review); no auto-merge.

Includes: CODEOWNERS (placeholder maintainer team, documented), Dependabot for
GitHub Actions with SHA-pin awareness, config in .github/pr-sweeper.config.mjs,
helper libs under .github/scripts/pr-sweeper/, and a README explaining setup +
required secrets. Entirely opt-in and least-privilege by design.

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

Copilot-Session: cecb163d-04c4-4b01-ab7a-14d25f7ec690
@soyalejolopez
soyalejolopez merged commit 9a18f56 into microsoft:master Jul 22, 2026
1 check failed
@soyalejolopez
soyalejolopez deleted the upstream-pr-sweeper branch July 22, 2026 14:19
@github-actions

Copy link
Copy Markdown
Contributor

🛰️ PR Sweeper report

Risk: 🟠 MEDIUM · Security gate: ✅ passing · Files: 10

🔒 Automated guardrails (authoritative)

Category Location Finding
⚠️ secret .github/pr-sweeper.config.mjs:123 Possible Certificate block detected in added content. (evidence: [redacted])
⚠️ scope Touches security-sensitive path(s): .github/CODEOWNERS, .github/dependabot.yml, .github/pr-sweeper.config.mjs, .github/scripts/pr-sweeper/README.md, .github/scripts/pr-sweeper/ai-review.mjs, .github/scripts/pr-sweeper/guardrails.mjs, .github/scripts/pr-sweeper/lib.mjs, .github/scripts/pr-sweeper/report.mjs, .github/workflows/pr-sweeper-report.yml, .github/workflows/pr-sweeper.yml. Maintainer + security review required.

🤖 Dual-model AI review (advisory)

AI review unavailable for this run (models not reachable or no diff). Guardrails above are unaffected.

  • GPT-class reviewer (openai/gpt-5): skipped — GitHub Models HTTP 413: {"error":{"code":"tokens_limit_reached","message":"Request body too large for gpt-5 model. Max size: 4000 tokens.","details":"Request body too large for gpt-5 model. Max size: 4000 tokens."}}
  • Deep-reasoning reviewer (openai/o3): skipped — GitHub Models HTTP 413: {"error":{"code":"tokens_limit_reached","message":"Request body too large for o3 model. Max size: 4000 tokens.","details":"Request body too large for o3 model. Max size: 4000 tokens."}}

The automated guardrails are authoritative and gate the security status. The AI review is advisory and never auto-merges. Thanks for contributing to FastTrack! 🛩️

@github-actions github-actions Bot added sweeper:risk-medium PR Sweeper: medium risk sweeper:scope-review PR Sweeper: scope/sensitive-path review sweeper:security-review PR Sweeper: needs security review labels Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sweeper:risk-medium PR Sweeper: medium risk sweeper:scope-review PR Sweeper: scope/sensitive-path review sweeper:security-review PR Sweeper: needs security review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants