testing-agents-for-indirect-prompt-injection

Solid

Test whether an AI agent obeys instructions hidden in the content it ingests, rather than only the user's. Enumerate every channel through which untrusted content reaches the model context (retrieved docs, fetched pages, uploaded files, emails, tool outputs, filenames, images and PDFs, other agents), plant channel-appropriate payloads, and measure whether they change the agent's actions. Use when reviewing any agent or LLM app that reads external content and can act. Covers channel enumeration, overt and covert payloads, canary observables, and impact via the trifecta.

AI & Automation 4 stars 1 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 80/100

Stars 20%
23
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Testing agents for indirect prompt injection Direct prompt injection is the user attacking the model. *Indirect* prompt injection is a third party planting instructions in content the agent later ingests, so the agent follows an attacker who never touched the prompt. It is the central agent vulnerability because agents exist to read external content and act on it, and models do not reliably separate "data to process" from "instructions to obey" when both share one context. ## When to use - An agent or LLM app ingests any content it did not fully author: web pages, documents, RAG results, emails, tickets, files, tool responses, other agents. - You are reviewing an assistant that can call tools, browse, or send messages. - You need to know if a channel is a data channel or an instruction channel. ## Scope check Test agents and content channels you own or are authorized to test. Use benign, clearly-marked payloads and canaries; never exfiltrate real data or act against systems you do not control. If you can't name the authorization, stop. ## The loop 1. **Enumerate ingestion channels.** List every path by which content the agent does not control enters its context: retrieved/RAG documents, fetched web pages, uploaded or attached files, email and ticket bodies, tool and API responses, filenames and metadata, image and PDF text (via vision or OCR), source code and comments, and messages from other agents. Each is a candidate injection channel. 2. **Deter...

Details

Author
UnboundCompute
Repository
UnboundCompute/security-agent-skills
Created
5 days ago
Last Updated
yesterday
Language
N/A
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Listed

rt1-prompt-injection

Red-team an AI agent for prompt injection — does content the agent is asked to process (email, page, ticket, tool result) override its actual task? Authorized testing of agents you own or are permitted to test.

1 Updated 1 months ago
William2333ZZ
AI & Automation Listed

prompt-injection

Expert methodology for testing direct and indirect prompt injection vulnerabilities in LLM-powered applications, agents, and pipelines. Covers payload construction, context manipulation, cross-agent propagation, and exfiltration triggers.

1 Updated yesterday
sunilgentyala
AI & Automation Listed

defending-against-prompt-injection

Keep an agent from obeying instructions hidden in the content it reads. Covers placing fetched pages, emails, and API responses in tool_result blocks instead of the system prompt; wrapping that content as JSON with explicit source fields; labeling its provenance; screening tool output with a fast classifier before the agent acts; and stating an untrusted-content policy in the system prompt. Use this when someone builds an agent that reads the web, email, shared files, or any third-party text, asks how to stop indirect or cross-content prompt injection, or finds an agent following instructions buried in a fetched page. Trigger on "indirect prompt injection," "agent followed instructions in a web page," "untrusted tool output," and similar. This is content handling inside the context window; limiting the damage once an attack lands is environment containment (sandboxing-agentic-systems), and gating outbound commands is action gating.

1 Updated 4 weeks ago
Hoja-Solutions