Open-source framework for AI-layer security testing — finds AI-agent weaknesses and writes the regression tests that close them.
Project description
Mylonite
Point it at your AI agent; it finds a real weakness and writes the regression test that closes it forever — in your repo, gating your CI.
Mylonite is an open-source framework for AI-layer security testing. It targets the AI/agentic part of an application — the system prompt, tools, RAG pipeline, agent planner — and emits validated regression tests that gate CI. It deliberately does not test the surrounding traditional code; that work belongs to SAST/DAST tools.
The full product thesis, market positioning, and phased build plan live in ROADMAP.md.
Status: Phases 0–3 shipped. v0.5.0 added multi-provider LLM support and custom MCP targets; v0.6.0 (Phase 3) shipped the end-to-end
scan → gating PRflow —mylonite gate, a reusable GitHub Action (Abidemialade/mylonite/gate-action@v1), and cost-tiered CI workflow templates (cheap per-PR gate + nightly discovery). Unreleased (onmain) is the depth release: a control-efficacy oracle that holds the model constant and proves which safeguard is actually load-bearing on a real target (validate --prove-control,mylonite ablate), the adaptive loop and tool-chaining synthesis on real/custom targets, and payload-obfuscation attack tiers. See CHANGELOG.md and the issue tracker for what is and isn't landed today.pip install mylonitelands with v0.6.0; install is still clone-first until then.
Try it in 60 seconds
(Once installed.) The real zero-second funnel is the GIF — watch Mylonite find four exploits against a deliberately vulnerable agent, offline, with no API key:
The mylonite demo playground running against the Quarry and its guarded
twin. (How this GIF is recorded.)
Neither mylonite nor mcp-kitchen-sink is published to PyPI yet —
pip install mylonite lands with the v0.6.0 release. Until then the
install is clone-first with two editable installs. Requires Python
3.11–3.13 — litellm (the model-agnostic LLM layer) has no 3.14 wheels yet,
so create your virtualenv with a 3.11–3.13 interpreter. The CLI prints a clear
note if it detects 3.14+.
git clone https://github.com/Abidemialade/mylonite.git
cd mylonite
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
pip install -e ./reference_targets/mcp_kitchen_sink
mylonite demo
git clone https://github.com/Abidemialade/mylonite.git
cd mylonite
python -m venv .venv
.venv\Scripts\Activate.ps1
pip install -e ".[dev]"
pip install -e ./reference_targets/mcp_kitchen_sink
mylonite demo
No API key needed — the demo replays recorded model behavior; add
--live to re-run for real.
The demo runs the real scan twice — once against the deliberately vulnerable reference agent ("the Quarry") and once against its guarded twin — and prints a safety banner, a weakness table, and the headline result:
SAFETY: in-process, loopback-only, no network egress.
W1 Tool-description smuggling OWASP LLM01 · ASI01 · AML.T...
W2 Poisoned-note → action OWASP LLM01 · ASI02 · AML.T...
W3 Unrestricted web_fetch OWASP LLM06 · ASI02 · AML.T...
W4 Unconfirmed send_email OWASP LLM06 · ASI05 · AML.T...
4 exploits on vulnerable, 0 on guarded
mode: replay (offline)
The Quarry runs entirely in-process and never binds to a network. Full walkthrough: docs/quarry.md.
Once you've seen it, point scan at a real target:
mylonite scan mcp:fetch --authorize fetch
(needs an LLM API key + uv installed)
From scan to a gating PR
mylonite gate runs the whole magic moment — find an exploit, write a regression
test, validate it against the differential oracle, and (opt-in) open a PR that
gates CI on it:
mylonite gate reference:vulnerable # find -> test -> validate -> print the PR command
mylonite gate --target-file target.yaml --authorize your-scope --open-pr # ...and open it
gate writes a validated regression test under .mylonite/gate/ plus two CI
workflows (a cheap per-PR gate + nightly discovery), then prints (or, with
--open-pr, opens) a PR carrying the finding, its OWASP/ASI/ATLAS/NIST tags, the
validation evidence, and a human-applied suggested fix. Full guide:
docs/ci-gating.md. Behind a corporate network, see
docs/enterprise-networking.md.
What works today (v0.6.0 + unreleased depth on main)
mylonite gate <target>— the end-to-end magic moment: scan → generate → validate → optionally open a gating PR. Writes the regression test and two CI workflow templates under.mylonite/gate/. Add--open-prto push a branch and open the PR viagh. Use--target-file target.yamlfor a custom MCP app.mylonite scan <target>— the async exploit-finding loop. Targets:reference:vulnerable/reference:guarded(the bundled Quarry twins), plus real open-source MCP servers —mcp:filesystem:<sandbox>,mcp:fetch, andmcp:github:<owner/repo>(these need an LLM API key,uv/uvx, and an explicit--authorize). Custom MCP apps: pass--target-file target.yaml --authorize <scope>. Depth flags:--adaptive(multi-step session loop on real targets),--obfuscate <strategy>(unicode-tag / split / multilingual / base64-wrapper attack tiers), and--synthesize(tool-chaining synthesis; now works on--target-filetoo).mylonite generate [SCAN_PATH]— emit apytestregression test from a confirmed exploit (offline, no LLM). Pass--latestto auto-pick the newest scan, or--target-filewhen the scan was against a custom target. Emitted tests carry OWASP/ASI/ATLAS/NIST tags (NIST auto-derived) and the attack tier.mylonite validate <generated-dir>— run the differential-oracle validator live (real LLM, Haiku) to prove the test is meaningful: it must fail on the vulnerable twin and pass on the guarded one across multiple runs. Pass--target-filefor custom targets (re-drives the real app).mylonite validate --prove-control [--adaptive]— the control-efficacy oracle (the deepened moat). Holds the model constant and varies only the safeguard: the attack must fire on the raw target and be resisted once a canonical control is applied at the adapter boundary (a synthetic guarded twin), proving the control — not the model — carries the security. Add--adaptiveto grade whether the control holds under an adaptive attacker vs. only static ones.mylonite ablate <target>— the control-ablation matrix: scores each safeguard's marginal contribution (load-bearing vs. security-theater), with--redundancyto find controls another control already covers and--max-seedsto probe multiple seeds per weakness.mylonite demo— zero-config, offline, deterministic playground that replays committed LLM fixtures to find four exploits on the Quarry and none on its guarded twin.--livere-runs for real (needs a key).mylonite doctor— diagnose provider connectivity before a live scan; classifies failures as auth / TLS / network / rate-limit with a concrete remedy.mylonite init-target— scaffold atarget.yamlfor a custom MCP app by launching it once (no LLM call), listing its tools, and writing a commented starter with suggestedweakness_classes,seed_arm, andeffect_probetemplate.mylonite taxonomy list— the bundled threat taxonomy: OWASP LLM Top 10 (2025), OWASP Agentic Security Initiative (2026), MITRE ATLAS, and NIST AI RMF, all as data files with provenance.- Custom MCP targets via
--target-file— declare your MCP server'scommand,weakness_classes,seed_arm, andeffect_probein a YAML file; Mylonite drives indirect injection and validates effect end-to-end. - Versioned extension contracts + plugins — five Python Protocols (attack modules, target adapters, test generators, validators, compliance mappers) with reference implementations and entry-point-based plugin loading.
Documentation
- docs/ci-gating.md — the
mylonite gateend-to-end guide (scan → gating PR). - docs/enterprise-networking.md — TLS/proxy setup for corporate networks.
- docs/quarry.md — the Quarry playground walkthrough.
- docs/validation.md — the validation engine (the moat) in depth.
- ROADMAP.md — phased build plan, architecture, and engineering standards.
- CONTRIBUTING.md — dev setup, how to author a plugin.
- GOVERNANCE.md — decision-making, registry acceptance.
- SECURITY.md — responsible-disclosure + dual-use policy.
- Docs site (mkdocs-material):
mkdocs servefrom a checkout. Hosted docs land with the Phase 4 launch.
Responsible use
Mylonite reproduces working weaknesses in AI agents. Use it only against
targets you control or are contractually authorized to test. The scan
command refuses to run against real targets without an explicit --authorize
flag naming the target. The bundled vulnerable reference agent runs
in-process and binds to nothing.
Full policy: SECURITY.md.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mylonite-0.7.0.tar.gz.
File metadata
- Download URL: mylonite-0.7.0.tar.gz
- Upload date:
- Size: 292.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
60d95b867eb72386700d16cb4c9b6055044f9a1a5a4e02c06810808720dbbee3
|
|
| MD5 |
e277c23b83fd1d015b0059245e30522e
|
|
| BLAKE2b-256 |
b1d0e312bf3cb41fdbee6566ef020e30242ac4b1e1db0347c51748a8159ca24e
|
Provenance
The following attestation bundles were made for mylonite-0.7.0.tar.gz:
Publisher:
release.yml on Abidemialade/mylonite
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mylonite-0.7.0.tar.gz -
Subject digest:
60d95b867eb72386700d16cb4c9b6055044f9a1a5a4e02c06810808720dbbee3 - Sigstore transparency entry: 1859236747
- Sigstore integration time:
-
Permalink:
Abidemialade/mylonite@e047f47fc3a640b1b0ecced52f143a0cf624ecd9 -
Branch / Tag:
refs/tags/v0.7.0 - Owner: https://github.com/Abidemialade
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e047f47fc3a640b1b0ecced52f143a0cf624ecd9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file mylonite-0.7.0-py3-none-any.whl.
File metadata
- Download URL: mylonite-0.7.0-py3-none-any.whl
- Upload date:
- Size: 325.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
febac81c4e5a77d773fec3fe1d50ed79428735da0af32b5ec4aa6d60066ba8de
|
|
| MD5 |
8107d2cb656f80ba755db7d125ef6ee3
|
|
| BLAKE2b-256 |
e250e574fa16e05bb0a6ce7ecb13aaeba623563d90e39fb021a528c4cba2d083
|
Provenance
The following attestation bundles were made for mylonite-0.7.0-py3-none-any.whl:
Publisher:
release.yml on Abidemialade/mylonite
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mylonite-0.7.0-py3-none-any.whl -
Subject digest:
febac81c4e5a77d773fec3fe1d50ed79428735da0af32b5ec4aa6d60066ba8de - Sigstore transparency entry: 1859236933
- Sigstore integration time:
-
Permalink:
Abidemialade/mylonite@e047f47fc3a640b1b0ecced52f143a0cf624ecd9 -
Branch / Tag:
refs/tags/v0.7.0 - Owner: https://github.com/Abidemialade
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e047f47fc3a640b1b0ecced52f143a0cf624ecd9 -
Trigger Event:
push
-
Statement type: