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
- 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.
- 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.
- 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.
- 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.
Related tasks in this category
See all in Skill Security, Injection & Permission Audits-
Scan third-party SKILL.md packages and reference files for covert prompt injection
Community skill bundles can hide Unicode tag characters, poisoned reference docs, or stealth instructions inside helper scripts.
-
Audit MCP server OAuth scopes, API token handling, and credential storage hygiene
Many community MCP connectors ask for full repo admin or Gmail read/write/delete scopes when your workflow only needs read access.
-
Test agent skills for covert data exfiltration via Markdown images, DNS, or webhooks
Even without write tools, a compromised skill or untrusted webpage can exfiltrate workspace secrets via rendered Markdown URLs or query strings.
-
Verify destructive command blocking and sandboxing in Bash-enabled agent skills
Check whether CLI-driven skills block force-pushes, recursive deletes, prod profile mutations, and subshell bypasses cleanly.
-
Check commit pinning, lockfile hashes, and maintainer provenance in community skill packs
Installing skills from floating GitHub branches or unpinned uvx/npx commands exposes developer laptops to upstream repo takeovers.
-
Benchmark PII and secret redaction skills that scrub sensitive payloads before LLM or API calls
Compare local presidio, regex+NER, and reversible tokenization skills on catching API keys, SSNs, and patient IDs without mangling code.