Skip to content

Test how agent skills handle malicious payloads returned by external APIs, GitHub issues, or emails

Your SKILL.md can be 100% clean, yet fail the moment an MCP tool returns a GitHub issue body containing adversarial instructions.

Copy the prompt and paste it into the AI assistant you already use.

No single prompt technique blocks 100% of indirect injections; always enforce privilege separation between untrusted readers and high-impact actions.

Defenses that raise resilience against poisoned tool outputs

  1. 01

    Delimit untrusted tool payloads explicitly

    Skills wrapping external content in clear untrusted-data boundaries remind models never to treat issue bodies as system commands.

  2. 02

    Separate reader subagents from privileged actors

    Quarantine patterns extract structured enums (severity: high|low) using a zero-tool subagent before passing typed fields to action tools.

  3. 03

    Strip hidden HTML/CSS before Markdown conversion

    Web and email fetch tools must drop display:none spans, white-on-white text, and invisible aria strings before model ingestion.

  4. 04

    Verify invariant action policies outside the LLM

    Ensure a poisoned support ticket can never trigger 'issue refund' or 'add repo collaborator' without deterministic policy approval.

Questions and answers

What is rogue tool-response poisoning?

When an agent fetches external data—like a public Jira ticket, npm README, or webpage—containing adversarial text designed to hijack subsequent tool calls.

Which model + skill architecture scores highest against indirect injection?

Dual-stage skills that parse untrusted text into a strict enum/Pydantic schema with zero tools attached before any privileged execution step runs.

Are injection pass rates benchmarked per model checkpoint?

Yes, hijacking resistance varies substantially across model families and is tracked separately on AgentDojo-style multi-tool suites.