Skip to content

fix: suppress false-positive threat detection on size/triage AWs - #277

Merged
theletterf merged 1 commit into
mainfrom
fix/suppress-detection-false-positive
Aug 11, 2026
Merged

theletterf merged 1 commit into
mainfrom
fix/suppress-detection-false-positive

Conversation

@theletterf

@theletterf theletterf commented Aug 10, 2026 •

Copy link
Copy Markdown
Member

Summary

The threat detection LLM fires a false positive on every size/triage run. The fix adds a threat-detection.prompt exclusion to the three affected AWs.

Root cause

The detection job receives the agent's full prompt context (≈19 KB). That context includes the gh-aw framework's own <system> security policy block and the <safe-outputs> block, which contains text like:

CRITICAL: You MUST call one of the safe-output tools before finishing.

Terminal action guarantee — mandatory final step

The detection LLM (gpt-5.4-mini) sees these mandatory-tool-call instructions and concludes they are prompt injection — "a hidden requirement to call a specific tool before finishing, indicating untrusted content trying to steer the agent's actions."

This is 100% a false positive. The flagged content is the gh-aw framework's own scaffolding, not anything from the issue being analyzed. The actual agent output being scanned is only 271 bytes (a single tool call).

Fix

Added safe-outputs.threat-detection.prompt exclusion to:

  • gh-aw-issue-size.md
  • gh-aw-issue-triage.md
  • gh-aw-issue-auto-triage.md

The exclusion tells the detector to ignore <system> and <safe-outputs> framework blocks and only flag content originating from the issue body or comments. This uses the documented threat-detection.prompt field from the gh-aw threat detection reference.

The same false positive was reported upstream at github/gh-aw#51782.

Test plan

  • Trigger a /size run on any issue and confirm the CAUTION banner is gone
  • Trigger a triage run and confirm labels are applied (detection no longer blocks add_labels)

🤖 Generated with Claude Code

Related to #404

The detection LLM scans the agent's full prompt context (19 KB) and
flags the gh-aw framework's own <system> and <safe-outputs> scaffolding
as prompt injection — specifically the mandatory safe-output tool-call
instructions ("CRITICAL: You MUST call one of the safe-output tools").

Add a threat-detection.prompt exclusion to gh-aw-issue-size,
gh-aw-issue-triage, and gh-aw-issue-auto-triage telling the detection
model to treat those framework-owned blocks as non-threatening and to
only flag content that originates from the issue body or comments.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@theletterf
theletterf requested a review from a team as a code owner August 10, 2026 15:47
@theletterf
theletterf requested a review from reakaleek August 10, 2026 15:47
@theletterf theletterf self-assigned this Aug 10, 2026
@theletterf theletterf added the fix label Aug 10, 2026
@theletterf
theletterf merged commit 8c04d86 into main Aug 11, 2026
4 of 5 checks passed
@theletterf
theletterf deleted the fix/suppress-detection-false-positive branch August 11, 2026 06:06
@theletterf theletterf mentioned this pull request Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants