owasp-llm-top10

owasp-llm-top10 is a cursor rule for Cursor from adonai-labs/agent-runway. It costs 818 tokens per session, scanned A, original, MIT.

A set of code-review checks for applications that use large language models (LLMs), such as chatbots and AI agents. It applies OWASP security guidance to prompts, model output, data, limits, and tool use.

In plain words
What is it for?
Use it to review AI features and agent tools for unsafe input handling, output validation, data provenance, rate limits, timeouts, retries, and security controls.
Why use it?
It helps catch risks such as prompt injection, unsafe commands from model output, poisoned training data, excessive usage, and weak limits.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit Use it to review AI features and agent tools for unsafe input handling, output validation, data provenance, rate limits, timeouts, retries, and security controls.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/adonai-labs/agent-runway/owasp-llm-top10
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/adonai-labs/agent-runway

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for owasp-llm-top10

README.md
[![agentmods](https://agentmods.dev/badge/rules/adonai-labs/agent-runway/owasp-llm-top10/github.svg)](https://agentmods.dev/rules/adonai-labs/agent-runway/owasp-llm-top10)
Your own site
<a href="https://agentmods.dev/rules/adonai-labs/agent-runway/owasp-llm-top10"><img src="https://agentmods.dev/badge/rules/adonai-labs/agent-runway/owasp-llm-top10/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for owasp-llm-top10

Your own site · 80×15
<a href="https://agentmods.dev/rules/adonai-labs/agent-runway/owasp-llm-top10"><img src="https://agentmods.dev/badge/rules/adonai-labs/agent-runway/owasp-llm-top10.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 818 This file is loaded in full into every session.
When invoked 818 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00818 $0.00818
Opus 5 $0.00409 $0.00409
Sonnet 5 $0.00164 $0.00164
Haiku 4.5 $0.00082 $0.00082

Measured 10d ago against content hash 15c39a66ec9e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

owasp-llm-top10 scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

src/core/rules/owasp-llm-top10.mdc · 74 lines

How it starts

The opening of the file, as written. The whole thing — 74 lines — stays where its author put it; the contents beside it link to each section on GitHub.

OWASP LLM Top 10 – PR Review Rules

These rules translate the OWASP Top 10 for LLM Applications into concise checks for code reviews.

LLM01 – Prompt Injection

  • Treat all user/model-bound input as untrusted; validate and escape dynamic prompt parts.
  • Isolate system, developer, and user messages; never allow user input to modify system policies.
  • Block prompt string concatenation that mixes policy with user content; prefer templating with explicit placeholders and escaping.

LLM02 – Insecure Output Handling

  • Never execute model output directly (shell/SQL/http/file ops) without explicit allowlists and parsing.
  • Enforce strict schemas for tool outputs; use robust parsing with rejection on violations.
  • Sanitize URLs, file paths, and commands; disable dangerous flags by default.

LLM03 – Training Data Poisoning

  • Verify provenance for any PR-introduced datasets/prompts/examples; require source docs and checksums.
  • Disallow auto-learning from user content in production unless gated and audited.

LLM04 – Model DoS

  • Enforce token/size limits, timeouts, and exponential backoff with max retries.
  • Apply rate limiting and budget accounting per user/key.

LLM05 – Supply Chain

  • Pin SDK/model/tool versions; verify model/weights origin (hash or publisher signature when available).
  • Disallow unreviewed dynamic plugin/tool loading.

LLM06 – Sensitive Information Disclosure

  • Mask secrets/PII in logs and prompts; prohibit printing keys/tokens.
  • Minimize data in prompts; prefer identifiers to raw payloads; redact before send.

LLM07 – Insecure Plugin/Tool Design

  • Validate and type-check all tool parameters; reject on validation failure.
  • Enforce authZ and least privilege for tools (scoped tokens, read-only by default).
  • Restrict filesystem/network via allowlists; block wildcard writes and arbitrary hosts.

LLM08 – Excessive Agency

  • Require human-in-the-loop for high-risk actions (writes, network posts, privileged ops).
  • Default to disabled for destructive tools; require explicit enabling per environment.

Read the full file on GitHub · 74 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 74 lines · 818 tokens per session scan A 15c39a66ec9e

Subscribe to this mod's changes

owasp-llm-top10 is a cursor rule published in the GitHub repository adonai-labs/agent-runway (2 stars, last pushed 20d ago), licensed MIT. It adds 818 tokens to every session, about $0.0041 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.