Skip to content

FIX: Do not score write-only target deliveries as attack responses - #3757

Open
Dev3 ^~^ (shashank03-dev) wants to merge 2 commits into
microsoft:mainfrom
shashank03-dev:fix/write-only-target-false-success
Open

Dev3 ^~^ (shashank03-dev) wants to merge 2 commits into
microsoft:mainfrom
shashank03-dev:fix/write-only-target-false-success

Conversation

@shashank03-dev

@shashank03-dev Dev3 ^~^ (shashank03-dev) commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #3701

When a write-only target such as TextTarget returns no response, PromptNormalizer hands back the sent request, and attacks scored that request as if it were the target's reply. A scorer matching the objective then reported SUCCESS with no response at all. The normalizer now marks that case explicitly (PromptNormalizer.is_write_only_delivery()), and every caller that scores objective-target output uses it.

  • PromptSendingAttack, MultiPromptSendingAttack: a delivered request is never scored as response text and never becomes last_response. Scorers that judge side effects (FileWriteScorer, OtelToolCallScorer) still score the turn; with none configured the result is UNDETERMINED. Multi-prompt judges only the final send.
  • ChunkedRequestAttack: scores the chunks that were received; UNDETERMINED only when no chunk produced output.
  • RedTeamingAttack, CrescendoAttack, TreeOfAttacksWithPruningAttack: raise a clear error, since they need a response on every turn.
  • Backend chat send: a delivered request is not scored, whatever its role.

The fuzzer and the XPIA workflow also score target output; I left them out since they aren't attacks.

Tests: end-to-end runs of each attack with write-only targets (including assistant-role requests, mixed delivery/response sequences, and a FileWriteScorer agent that writes a file and returns nothing), normalizer and scoring contract tests, and a backend chat-scoring test.

@romanlutz Roman Lutz (romanlutz) self-assigned this Nov 1, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Write-only target can produce a false attack SUCCESS by scoring the request itself

2 participants