agentleFS
msoedovmsoedov/agentic_security/CLAUDE.md

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

Jan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 0 mentionsDec 2026: 0 mentions
Jan 2026Jul 2026Dec 2026
Mentions a month of the msoedov/agentic_security repository that our weekly crawl found: only 3 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

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
  1. Distinctive:

    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 …

    line 8
  2. Very specific:

    Changing the code or opening a PR?: Read CONTRIBUTING.md first.

    line 12
  3. Distinctive:

    Check where things stand before suggesting anything.

    line 20
  4. Very specific:

    Never print, echo or repeat the value of an API key you find in the environment, .env or the toml.

    line 36
  5. Very specific:

    Ask how their app is called (URL, auth header, JSON body).

    line 87

≈ “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.

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

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)

  1. Is Python 3.15 available (python3.15 --version)? If not, they need it first (uv python install 3.15 is the quickest route).
  2. Is the CLI installed (agentic_security --help)? If not, they need install.
  3. Does agentic_security.toml exist? If not, they haven't run agentic_security init.
  4. Does its llmSpec still point at http://127.0.0.1:8718/v1/self-probe? Then they're scanning the built-in mock, not their own model yet.
  5. Does agesec ls list 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 with agesec?"


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_security

For contributors working in this checkout:

poetry install --with dev && pre-commit install

Step 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 mock

The 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 ci runs only the configured modules and exits 1 above max_th. This is the one to put in CI (see docs/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.json

See 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

PathWhat lives there
agentic_security/__main__.pyagentic_security CLI (fire)
agentic_security/app.py, routes/FastAPI UI and API; routes/_specs.py holds provider presets
agentic_security/http_spec.pyParses 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.pyLogging config with the credential-redaction filter
agentic_security_harness/agesec CLI: loop, deciders, policy, run log, report
tests/unit, tests/integration, tests/systemTest tiers; tests/evals is opt-in
tests/fakes/fake_llm_api.pyLocalhost 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 tag

Rules that tests enforce

  • Tests never use real keys. tests/conftest.py swaps every *_API_KEY for a placeholder unless a test is marked live.
  • Model output sent to a judge goes through fence().
  • Logged text passes through RedactSecrets. Log through the standard logger, not print().

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.