Skip to main content Switch to mobile version taintline 0.2.0 Red team for AI agents and MCP tool integrations: leaks proven at a sink, not judged by an LLM
pip install taintline==0.2.0 Copy PIP instructions
Red team for AI agents and the MCP servers they connect to. Taintline plants prompt injection and tool poisoning in what an agent reads, then decides success with deterministic checks, no LLM judge: did a unique canary secret actually arrive at a sink you control? It reports attack success with confidence intervals, a benign baseline (false alarms), and counts errors instead of treating them as "secure".
Status: v0.2.0, an early release. Authorized testing only. Read THREAT_MODEL.md first.
uv tool install taintline # or: pipx install taintline taintline demo # one minute: a leak happens and is proven at a sink; no model, key or network Or with Docker, no install:
docker run --rm --network none ghcr.io/deep60/taintline What works today
Run on real models. These have produced results with local models (RedSage 8B, gpt-oss 20B, llama3.1) through LM Studio and Ollama. The numbers are in docs/findings and docs/leaderboard.
Built and tested, not yet proven in the field. These pass their tests and were run locally, but haven't been used on someone else's system or on GitHub yet.
Not built: frontier-model benchmarks (Claude, GPT, Gemini), a real browser MCP server (the browser lab is simulated), targets for agent frameworks (LangGraph, OpenAI Agents SDK, Bedrock), an adaptive attacker, and a server or dashboard. See docs/ENTERPRISE_PLAN.md.
Quickstart with a real model (about 10 minutes, from a checkout, nothing leaves your machine)
git clone https://github.com/deep60/taintline && cd taintline uv sync uv run python -m pytest -q # expect: all pass cp SCOPE.example.yaml SCOPE.yaml # then edit: list what you may test SCOPE.yaml:
name: my-lab authorized_by: "your name" servers: - notes # the lab MCP server - localhost:11434 # ollama - localhost:8099 # the collaborator sink Terminal 1, the sink that records anything sent to it (stop with Ctrl-C, never Ctrl-Z):
python3 lab/collaborator/server.py Terminal 2, a local model (ollama pull llama3.1):
ollama serve Terminal 3:
# baseline: the agent doing its job, no attack. Expect 0 leaks. uv run taintline live-run --server notes --command python --arg lab/servers/notes_server.py \ --collaborator http://localhost:8099 --agent ollama --model llama3.1:latest -n 5 --inject none --out out/baseline # positive control: a gullible prompt. Expect leaks; proves the pipeline can see them. uv run taintline live-run --server notes --command python --arg lab/servers/notes_server.py \ --collaborator http://localhost:8099 --agent ollama --model llama3.1:latest -n 10 --gullible --out out/control # the full suite: every attack x every task, report in out/live_suite/report.md uv run taintline live-suite --server notes --command python --arg lab/servers/notes_server.py \ --collaborator http://localhost:8099 --agent ollama --model llama3.1:latest -n 3 How to read a result
delivered is attack success: the canary reached the sink. Nothing else counts.
read secret / in answer are partial effects: the injection changed behavior, but nothing left.
failed attempts: the agent tried to leak but the tool call errored.
errors are agent/API failures. They are never counted as "secure".
Small n gives wide intervals. At n=5, zero hits still allows a true rate up to about 43%.
Watch a real MCP server for tampering
uv run taintline monitor --server notes --command python --arg lab/servers/notes_server.py # first run writes pins.json; later runs exit 1 and list any tool whose definition changed Caveats
mock-* agents are not models; they only prove the harness works.
--agent anthropic is untested against the live API.
Scoring weights are assumptions. The labs are small and simulated (8 labs, 24 tasks).
The oracle has been checked against human labels once: 30 traces from one lab and one local model, all matching (docs/oracle_validation.md). Other labs, models and encoded leaks are not yet covered.
Results so far come from local 7–20B models only.
Only test systems you own or are authorized to test.
More: docs/BUILD_GUIDE.md, docs/PLAN.md, docs/writing_chains.md.
Released: Dec 5, 2026
Both files in this release have provenance metadata.
View provenance details
MIT View SPDX License List
agents ai-security llm mcp prompt-injection red-team
Development Status 3 - Alpha
Intended Audience Developers
Information Technology
Operating System OS Independent
Programming Language Python :: 3
Software Development :: Testing
Release files for taintline 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
Built distribution (wheel)
Total release size: 364.2 kB
Release files / taintline-0.2.0.tar.gz
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.
Release files / taintline-0.2.0-py3-none-any.whl
Security for taintline 0.2.0
Both files in this release have been uploaded with provenance metadata.
With provenance taintline-0.2.0.tar.gz Dec 5, 2026
With provenance taintline-0.2.0-py3-none-any.whl Dec 5, 2026
Attestation for taintline-0.2.0.tar.gz
Attestation for taintline-0.2.0-py3-none-any.whl
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.
Release history Release notifications | RSS feed
Dec 5, 2026 2 release files Full provenance
Nov 24, 2026 2 release files Full provenance
"PyPI", "Python Package Index", and the blocks logos are registered trademarks of the Python Software Foundation.
© 2026 Python Software Foundation
Deployed from 4d99e05











