agentleFS
awarexoneawarexone/AXguard/prompt-injection/SKILL.md

prompt-injection

Skill18 starsChanged 3 months agoMITView on GitHub

Assess direct and indirect prompt-injection risks in LLM/AI features — use for chatbots, RAG, agents, and tool-calling apps.

8 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    After agent.* rule hits

    line 39
  2. Distinctive:

    Ask: can retrieved content instruct “ignore previous” / exfiltrate secrets / trigger tools?

    line 57
  3. Distinctive:

    Check trust boundaries: is tool execution allowlisted?

    line 58
  4. Very specific:

    Never execute model output as code (eval, shell) — cross-check agent.* rules.

    line 59

“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Prompt Injection

Purpose

Reason about attacks where untrusted text steers model behavior — including indirect injection via retrieved documents or tool outputs.

When to Use

  • LLM chat, RAG, copilots, agents with tools
  • After agent.* rule hits
  • Features that concatenate user/doc content into system prompts

When Not to Use

  • Apps with no model/prompt component

Security Concepts

Models follow instructions in context. If attacker content is mixed into trusted instructions, the model may exfiltrate data or invoke tools unsafely.

Mapped to OWASP LLM01:2026 Prompt Injection and MITRE ATLAS AML.T0051 (related: jailbreak AML.T0054, system-prompt extraction AML.T0056).

Analysis Workflow

  1. Inventory prompts: system, developer, user, tool, retrieved chunks.
  2. Find concatenation / template assembly of untrusted content into privileged prompts.
  3. List tools the model can call (shell, HTTP, DB, file, email).
  4. Ask: can retrieved content instruct “ignore previous” / exfiltrate secrets / trigger tools?
  5. Check trust boundaries: is tool execution allowlisted? Human approval for mutate/egress?
  6. Never execute model output as code (eval, shell) — cross-check agent.* rules.

Evidence Requirements

  • Prompt assembly locations
  • Untrusted content sources (user, web, uploads, tickets)
  • Privileged actions reachable via model decisions

False Positive Controls

  • Model used only for offline classification with no tools and no sensitive context
  • Strict output schema with server-side enforcement (not just prompt requests)

Remediation

  • Separate trusted instructions from untrusted content; treat docs as hostile.
  • Tool allowlists + typed args; no raw shell from model text.
  • Output encoding / server-side authorization independent of model claims.
  • Least-privilege credentials for tools.

Verification

Re-test with hostile document/user content; confirm tools cannot be coerced; re-run axguard audit.

Related Skills

ai-agent-security, mcp-security, secrets-detection, security-remediation

Framework Mapping

  • OWASP LLM Top 10:2026 — LLM01:2026 Prompt Injection
  • MITRE ATLAS 2026.08 — AML.T0051, AML.T0054, AML.T0056
  • NIST AI RMF 1.0 — GOVERN/MAP/MEASURE/MANAGE (conceptual)

References

Research Provenance

Primary: OWASP GenAI LLM Top 10 2026 publication; MITRE ATLAS 2026.08 YAML (AML.T0051 et al.); NIST AI RMF 1.0 (accessed 2026-09-15).
Internal: AXGuard rules/agent.json, /axguard-agent.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.