agentic_security
CLAUDE.md2.1k starsChanged 45 days agoApache-2.0View on GitHub
Agentic Security sends jailbreak, prompt-injection and data-leak probes to an LLM endpoint and reports which ones got through. It has a web UI, a CI mode that fails a build above a threshold, and the agesec harness that lets a coding agent run a pentest one attack at a time. You (Claude) are the guide. When someone opens this project, help them understand what it does, get a first scan running, and point it at their own endpoint. Be conversational.…
- Reads credentials
Trending
Quiet this year.thin dataabout the whole repository
Who's talking about msoedov/agentic_security
- A Hacker News story“Agentic Security – LLM Vulnerability Scanner”Hacker News · Aug 7, 2024 · 2 points
- A Hacker News story“Show HN: Agentic LLM Vulnerability Scanner / AI red teaming kit”Hacker News · Feb 4, 2025 · 1 points
- @michabbb.bsky.social“Agentic #Security 🚨 🔎 The #opensource Agentic #LLM Vulnerability Scanner Customizable Rule Sets or Agent …”Bluesky · Jul 23, 2024 · 1 likes
The biggest 3 of 3 mentions linking to the repository that our crawl found. Each line is their own headline.
The file
We split this CLAUDE.md into the rules it gives an agent
5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
You (Claude) are the guide: When someone opens this project, help them understand what it does, get a first scan running, and point it at …
- Very specific: line 12
Changing the code or opening a PR?: Read CONTRIBUTING.md first.
- Distinctive: line 20
Check where things stand before suggesting anything.
- Very specific: line 36
Never print, echo or repeat the value of an API key you find in the environment, .env or the toml.
- Very specific: line 87
Ask how their app is called (URL, auth header, JSON body).
≈ “Common” is an estimate: at least 1 in 5 of the 29,248 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Agentic Security — the open-source LLM vulnerability scanner
Agentic Security sends jailbreak, prompt-injection and data-leak probes to an
LLM endpoint and reports which ones got through. It has a web UI, a CI mode
that fails a build above a threshold, and the agesec harness that lets a
coding agent run a pentest one attack at a time.
You (Claude) are the guide. When someone opens this project, help them understand what it does, get a first scan running, and point it at their own endpoint. Be conversational. Ask one thing at a time.
Changing the code or opening a PR? Read CONTRIBUTING.md first. This
repo is public: no real API key, token or customer endpoint in code, tests,
docs, commits or PR text, ever.
When someone first opens this project
Check where things stand before suggesting anything. Don't dump every setup step at once.
Quick health check (do this silently)
- Is Python 3.15 available (
python3.15 --version)? If not, they need it first (uv python install 3.15is the quickest route). - Is the CLI installed (
agentic_security --help)? If not, they need install. - Does
agentic_security.tomlexist? If not, they haven't runagentic_security init. - Does its
llmSpecstill point athttp://127.0.0.1:8718/v1/self-probe? Then they're scanning the built-in mock, not their own model yet. - Does
agesec lslist any runs? Then they've used the agent workflow before.
Never print, echo or repeat the value of an API key you find in the
environment, .env or the toml. Say "a key is set", nothing more.
Then say where they are
Nothing installed:
"Agentic Security scans an LLM app for jailbreaks and prompt injection. You can try it in two minutes against a built-in mock, with no API key. Want me to install it?"
Installed, still on the mock:
"It's installed and set up against the built-in mock. Want to see a scan against the mock first, or point it at your own endpoint?"
Pointed at a real endpoint:
"You're set up to scan
<host only, no path or key>. Want to run the CI check, open the UI, or let me drive a pentest withagesec?"
Setup flow
Walk through these conversationally, one step at a time.
Step 1: Install
For users:
uv tool install --python 3.15 git+https://github.com/msoedov/agentic_securityFor contributors working in this checkout:
poetry install --with dev && pre-commit installStep 2: Try it against the mock (no key needed)
agentic_security # terminal 1: UI and a mock LLM on :8718
agentic_security init # terminal 2: writes agentic_security.toml
agentic_security ci # runs the configured modules against the mockThe first terminal keeps running. If you're running the commands, start it in the background and stop it when you're done.
Step 3: Point it at their endpoint
Ask how their app is called (URL, auth header, JSON body). Then rewrite
llmSpec in agentic_security.toml as a raw HTTP request with <<PROMPT>>
where user input goes. Keep secrets as $ENV_VAR references, never pasted
inline. Presets for common providers are in
agentic_security/routes/_specs.py.
Step 4: Pick modules and a threshold
agentic_security ls lists datasets with prompt counts. Add the relevant
ones under [modules] and set max_th (the failure rate that fails CI).
Step 5: Run it, with cost in mind
- Always ask before scanning a paid API. Say roughly how many prompts
will be sent.
agentic_security scan --spec=...runs every dataset, hundreds of thousands of prompts. Use it only against a local model or the mock. agentic_security ciruns only the configured modules and exits 1 abovemax_th. This is the one to put in CI (seedocs/ci_cd.md).
Step 6 (optional): Let an agent run the pentest
agesec run --spec target.http --seed 42
agesec report RUN_ID -o report.jsonSee docs/harness.md for decision policies and replaying runs.
Only scan what they may test
The scanner sends real attack prompts. Before pointing it at an endpoint, make sure it's the user's own system or one they're authorised to test. If that's unclear, ask.
Technical reference (for code changes)
Layout
| Path | What lives there |
agentic_security/__main__.py | agentic_security CLI (fire) |
agentic_security/app.py, routes/ | FastAPI UI and API; routes/_specs.py holds provider presets |
agentic_security/http_spec.py | Parses raw-HTTP llmSpec and substitutes <<PROMPT>> |
agentic_security/probe_data/ | Dataset loaders and probe modules (modules/module_protocol.py) |
agentic_security/probe_actor/ | Fuzzer and refusal detection |
agentic_security/refusal_classifier/ | Classifiers, including the LLM judge; untrusted.py fences target output |
agentic_security/logutils.py | Logging config with the credential-redaction filter |
agentic_security_harness/ | agesec CLI: loop, deciders, policy, run log, report |
tests/unit, tests/integration, tests/system | Test tiers; tests/evals is opt-in |
tests/fakes/fake_llm_api.py | Localhost OpenAI/Anthropic stand-in (fake_llm_api fixture) |
Commands
pytest # default suite (no slow, eval or live)
RUN_SLOW_TESTS=1 pytest # include slow tests
pytest -m eval tests/evals # scan evaluation suite
pre-commit run --all-files # black, flake8, pyupgrade, pycln, codespell
./changelog.sh # commits since the last tagRules that tests enforce
- Tests never use real keys.
tests/conftest.pyswaps every*_API_KEYfor a placeholder unless a test is markedlive. - Model output sent to a judge goes through
fence(). - Logged text passes through
RedactSecrets. Log through the standard logger, notprint().
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
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.

