Security tests for LLM apps, written in pytest.
Tell your app to ignore its instructions. It says no. Now hide that same line in a document
it retrieves. Quite often it goes along with it.
You can't see that by reading the code. You have to try it. LLMSecTest tries it, a few hundred
ways, across all ten OWASP LLM Top 10 categories, then tells you what came
back out. MIT, on PyPI, built in the open.
pip install llmsectest
Run your first scan »
Just pytest
No separate scanner to run. Your security checks are pytest tests. Same command, same build gate, same plumbing as the rest of your suite.
How it works »Mapped & scored
Every probe maps to an OWASP LLM Top 10 category and carries a CVSS v4.0 base score. So a finding arrives already triaged.
The coverage map »CI-native
SARIF v2.1.0 out of the box, which your code-scanning dashboard already reads. HTML, JSON and Markdown too. Scan twice and your alerts get updated, because every result carries a fingerprint that survives a new port number.
A sample finding »Quick-start
Get a scan running in seconds.
One line to install, then point it at a model or at your running app. Read the SARIF. There's a full walkthrough in the docs.
~ $ pip install llmsectest
~ $ llmsectest # offline demo, no key needed
~ $ llmsectest --target app:http://localhost:8000/chat # your live app
~ $ pip install "llmsectest[anthropic]" # for a hosted model
~ $ ANTHROPIC_API_KEY=... llmsectest --target anthropic:claude-3-5-haiku
~ $ llmsectest --target app:http://localhost:8000/chat \
--report-formats=sarif,html,json,markdown
# => OWASP LLM Top 10 categories probed · findings written to results/<target>.sarif
OWASP LLM Top 10 · honest status
Where the coverage stands
All ten OWASP LLM Top 10 (2026) categories are implemented and tested today. Nine of them cover the whole category. LLM08 covers the part of its 2026 scope we probe, which its row says. The work ahead is depth. A category a run can't reach, for want of a repo, a model path or an app marker, comes back as an explicit skip with the missing input named.
A scan reads the whole response, not just the reply field. An answer can come back in a
sibling field. One application returned a planted secret in message.reasoning
while message.content held a refusal. Probes that plant their marker in your
application are scored against the whole body. The finding says where the value turned up.
The numbering below is the 2026 edition, which this tool moved to on 20 October 2026. Eight of the ten categories changed number between 2025 and 2026, so a number from an older list won't line up with what this page says. Each row below carries its 2025 number too. A report the tool writes from version 0.4.0 onward carries the edition it was scored under; the reports already on this site came out of 0.3.0 and do not.
What happened to the reports that already said 2025. Nothing. They still say it. That's deliberate. A report records a scan on a date. Rewriting the category numbers inside one would change what it measured.
The 2026 edition added nothing, dropped nothing, merged nothing. It renumbers. It also renames one category: System Prompt Leakage is now Hidden Context Exposure, with a wider remit. So a lookup table can do this move honestly. The numbering lives in one place in the code. Every published value resolves through it. From version 0.4.0 the tool stamps the edition onto every finding it writes, so you can date a report it produces. The 49 reports on this site predate that: version 0.3.0 rendered them and they say so in their own header, and I do not re-render a report after the fact.
- LLM01Prompt Injection was LLM01done
- LLM02Sensitive Information Disclosure was LLM02done
- LLM03Excessive Agency was LLM06done
- LLM04Supply Chain (Python, npm and Go manifests, OSV) was LLM03done
- LLM05Data & Model Poisoning was LLM04done
- LLM06Unbounded Consumption was LLM10done
- LLM07Misinformation was LLM09done
- LLM08Hidden Context Exposure was LLM07, System Prompt Leakagepartial
- LLM09Vector & Embedding Weaknesses was LLM08done
- LLM10Improper Output Handling was LLM05done
LLM08 retains partial coverage.
The application probes cover system prompts and exact private retrieved-policy or tool-schema
excerpts. The --app-policy and --app-tool-schema options require text
the application already holds. Each source enables two extraction probes. The scanner never
puts the private excerpt in the attack. The detector requires the complete, case-sensitive
excerpt in a reply or another string-valued response field. It does not detect paraphrased,
encoded or partial exposure. An absent match does not establish complete protection.
Reports contain matched private text and need the same access controls as the input.
done implemented & tested, 9/10 · partial implemented for part of the category's 2026 scope, 1/10 · depth improvements continue on the roadmap
What "done" still doesn't tell you.
Read this before you trust a clean row.
LLM03 (excessive agency) can only report what
your app says. Your app may describe an action in prose, with no sign of the signature you
passed in. A clean row then means "we didn't see it". Read it that way. We write every
limitation we find into the changelog. It comes
out again when it's fixed. The docs page for each category keeps the address it was first
published at. So that link reads llm06 while the category now numbers LLM03.
Renaming the pages would break every link anybody has already saved.
So the coverage footer names how many cases each category ran.
An app-target scan prints exercised: LLM01 (13 cases), LLM10 (3 cases), …, because
the two ways in send different amounts: --target app:<url> runs the packaged
suite and delivers 38 attacks at full inputs, where the Python API sends 23. Thirteen cases are
a different result from one case. A row that renders both the same way is the thing this tool
exists to catch.
Roadmap · shipped, building, planned
Where it's going
The funding period runs to 31 March 2027 after the Second Stage extension. The v1.0 release commitment remains 30 November 2026. Each phase ships before the project claims the next one. The status here tracks what the code does today.
-
01
Foundation
shipped- pytest-native framework & plugin
- One adapter for OpenAI · Anthropic · Hugging Face · Ollama & LM Studio (local), with a fail-fast
--preflighthealth check - Reports in SARIF v2.1.0 · HTML · JSON · Markdown
- CVSS v4.0 scoring with OWASP mapping
- CLI & documentation site
-
02
OWASP coverage
shipped- All 10 of 10 categories live: LLM01 to LLM10, the complete OWASP LLM Top 10 (2026)
- Black-box testing of a running application,
--target app:<url>, reaching 8 categories once you name what the app holds (--app-prompt/-secret/-action/-canary/-rag-poison); LLM01/10/07/06 need nothing - White-box scans: dependency manifests with an OSV known-CVE lookup (
--repo,--osv, LLM04), and an offline serialization-opcode scan of model files that never unpickles them (--model-scan, LLM05) - A white-box LLM09 read of your persisted vector store (
--vector-store), reporting how much of the corpus anybody with read access already holds. It leaves your embeddings uninverted - LLM02 and LLM03 attack along four distinct mechanisms each, so four rewordings of one trick count once. A leaked secret counts encoded, Unicode-disguised or split character by character
- RAG-specific LLM09: retrieval exposure (
--app-canary) and indirect prompt injection through a poisoned retrieved document (--app-rag-poison), scored so one probe's marker cannot void the other's row - Guardrails under load (
--app-stress N): N probes at once, reporting only a guardrail that held singly and stopped holding together. The numbers say so whenever the requests never overlapped - Red-team jailbreak set (JailbreakBench / AdvBench,
--redteam-set) plus a false-refusal rate on the benign twins (--redteam-benign) - Reports that can't flatter your app: a probe that got no answer is inconclusive and never a pass, the status reads
INCOMPLETE, and a reply identical to what we sent stops with an error and is never scored. See it on our whole test cohort » and on one result written up alone: your secret-disclosure test passed, the secret still left » - Attacks the model writes itself (
--redteam-generate N), added to the hand-written set, which stays. Every rewrite that lost its marker, or that a hardened target also answers, is thrown out and counted - A PDF report with no dependency at all (
--render-pdf), written straight out of the SARIF, so a 60-finding report is 7 pages and 8 KB, with anything that stops it being a pass on page one - Standalone HTML from any SARIF file (
--render-sarif), proven against committed output from ruff, Bandit and Semgrep
Release-by-release detail lives in the changelog.
-
03
Depth & reports
shipped- The rest of LLM08's 2026 scope, retrieved policy text and exposed tool schemas. You declare the private excerpt with
--app-policyand--app-tool-schema, we never put it in the request, so a hit is your application producing it unprompted. Each report row names the kinds of hidden context that run probed - A refusal is scored on what it says, not only on whether it happened. A target can decline your request and still quote the system prompt it is protecting, name the secret it was holding, or spell out a capability it claims not to have. That gets reported as a refusal that leaked. We only match what the scan planted, so you can trace every verdict to something we put there
- CycloneDX SBOM generation,
--sbom <path>(LLM04) - LLM09 multi-tenant namespace isolation, read from a persisted store with
--vector-store <path>: one store holding several tenants' vectors, where a forgotten retrieval filter returns the union - LLM09 embedding-store poisoning, read from the same persisted store. An indexed chunk can carry an instruction addressed to the model. The scan matches four documented shapes of such an instruction. An ordinary imperative is not one of the four, so a corpus of runbooks stays quiet
- A remediation database: every OWASP category carries its own fix steps, CWE ids, compliance mappings and a representative CVSS v4.0 vector, written into the HTML report beside the failures they answer
- A plugin API — the tool is a
pytest11plugin, so your own probes and oracles register the way any pytest plugin does - PDF reports with no dependency at all,
--render-pdf, written straight from SARIF - Donating the tool to OWASP: the Board accepted the repository donation in principle on 18 September 2026, and the formal process is under way
Everything in this phase is in the code today. Four of these items were planned for after v1.0. They arrived during the funding period instead. Two items stood here until 23 November and now sit in phase 05. The classifier refusal oracle is one. The deeper supply-chain analysis is the other. Both change how a verdict is reached. The 1.0 release does not wait on either.
- The rest of LLM08's 2026 scope, retrieved policy text and exposed tool schemas. You declare the private excerpt with
-
04
Integrations & v1.0
shipped- CI/CD templates for GitHub Actions · GitLab CI · Jenkins, each one a file you copy from
examples/ci/and edit in two places - v1.0.0 is on PyPI, published on 27 November 2026, three days before the date Mark set. The release carries 1175 passing tests at 88% coverage with branch measurement enabled. Every item in phases 01 to 04 is shipped.
- CI/CD templates for GitHub Actions · GitLab CI · Jenkins, each one a file you copy from
-
05
Past v1.0
planned, beyond this funding period- A classifier refusal oracle (GLiGuard / Llama-Guard), replacing the substring rule
- Deeper supply-chain analysis and stress tests
- Hardening & independent security audit
- Broader ecosystem integrations beyond the CI templates in phase 04
The first two items moved here from phase 03 on 23 November. Both are depth work on how a verdict is reached. The 1.0 release does not wait on either, so they belong on this side of it. Three things that sat here until October 2026 shipped early instead. PDF reports, the remediation database and the plugin API are now in phase 03. So is the OWASP community submission.
shipped in the code today · in progress being built now · planned ahead. The last two phases say which side of the funding period they sit on.
Output · the target format
Findings you can act on
A run gives you SARIF that drops straight into GitHub code scanning, GitLab, or any SARIF viewer. Each finding carries its OWASP category, a CVSS vector and a pointer to the fix. Here's the shape of it.
This is an illustration, with the property names a real report carries.
owasp-edition is on every finding the tool writes from version 0.4.0 on, so a
stored SARIF carries the numbering it was scored under.
Read a finding » The secret-disclosure probes found one thing across the 52 applications scanned on 31 August 2026; 32 of them gave the credential up anyway.
Read another » An output filter that holds only the hash of the credential has to guess where the credential ends. Twelve spellings of one value, seven of them straight through. All five write-ups »
See real ones » Every report from our own regression cohort, unedited: dozens of LLM applications scanned black-box, including the categories that found nothing.
{
"ruleId": "LLM01-prompt-injection",
"level": "error",
"properties": {
"owasp-category": "LLM01",
"owasp-name": "Prompt Injection",
"owasp-edition": "2026",
"cvss_vector": "CVSS:4.0/AV:N/AC:L/.../VC:H",
"security-severity": "9.2"
},
"message": {
"text": "System prompt recovered via instruction override."
}
}
Built in the open, for the people shipping LLM features.
App developers, security leads, researchers. The repo is public and the roadmap is honest. Watch it, try the adapter, or open an issue.
github.com/wehnsdaefflae/llmsectest »