Skip to content
This repository was archived by the owner on May 24, 2026. It is now read-only.

fix: harden review workflows — PR guard + prompt injection defense#716

Merged
PureWeen merged 1 commit into
mainfrom
fix/review-hardening
Apr 22, 2026
Merged

fix: harden review workflows — PR guard + prompt injection defense#716
PureWeen merged 1 commit into
mainfrom
fix/review-hardening

Conversation

@PureWeen
Copy link
Copy Markdown
Owner

Two improvements from dotnet/maui-labs#118:

  1. PR-only guardgithub.event.issue.pull_request check prevents /review on non-PR issues
  2. Prompt injection defense<untrusted-pr-content> delimiters + security preamble in sub-agent prompts

3-model consensus: 2/3 approved both changes.

Two improvements from dotnet/maui-labs#118 learnings:

1. PR-only guard on review.agent.md: prevents /review on non-PR
   issues (wastes 90min of 3-model review). Approved 2/3 — Sonnet
   called it redundant with checkout_pr_branch.cjs but Opus confirmed
   it kills the run before agent job starts (cheaper than failing
   at checkout).

2. Prompt injection defense-in-depth for sub-agents: security
   preamble + <untrusted-pr-content> delimiters + review instructions
   placed AFTER untrusted content. Approved 2/3 — Sonnet called it
   'security theater' but Opus noted the 3-model adversarial consensus
   is the real defense; delimiters add a layer without cost.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@PureWeen PureWeen merged commit 39b5cf5 into main Apr 22, 2026
5 of 6 checks passed
@PureWeen PureWeen deleted the fix/review-hardening branch April 22, 2026 15:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant