Skip to main content

Taintline

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.

Install

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.

Capability Command
See a leak happen and get proven, with no model, key or network taintline demo
Every attack against every task on a real MCP lab server; a leak counts only when the canary reaches the sink taintline live-suite --lab NAME (8 labs, 24 tasks: taintline labs)
One attack against your own stdio MCP server, through a recording proxy taintline live-run, taintline proxy
Retries counted in the results; stops before trial 1 if the model server doesn't answer --request-timeout, --retries
Step-by-step HTML replay of a run replay.html in every run folder, taintline replay
Scope gate: refuses any host, server or process not in SCOPE.yaml automatic

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.

Capability Command not yet done
Test your own agent (any language or framework), not just a model: it gets the lab's tools over MCP --agent command --agent-cmd "python my_agent.py", docs/BYO_AGENT.md a run with a real model and someone else's agent
Test an agent you can't script (Claude Desktop, Cursor, Claude Code): add a generated config, use the agent, score it taintline session start, session score, docs/CLOSED_AGENTS.md a session in a real desktop client
MCP-specific attacks: injection in a tool error, in a parameter's description, and a mid-session rug pull live-suite (surfaces tool_error, tool_schema, rug_pull; docs/ATTACKS.md) run on one local 9B model only
The full live suite against your own MCP server (HTTP or stdio), with a canary you planted live-suite --target target.yaml, docs/TARGETS.md a run on someone else's server
Look-alike package names (typosquats, missing scopes) in MCP configs taintline audit the list of known packages is short and fixed
Did a change really reduce leaks? Fisher's exact test per attack, corrected for many attacks taintline compare A B, --fail-if-worse for CI —
Find MCP client configs and flag pasted secrets, plain http, unpinned packages, broad filesystem access taintline audit —
Flag the lethal trifecta across the servers one client loads, with a command that proves each finding taintline audit (findings carry prove:) known servers only; precision on public servers not yet measured
Rug-pull detection: alert when a server's tools change taintline monitor, --config for every server in a config —
List and scan the tools of a stdio or Streamable HTTP server taintline enumerate, scan, pin, diff —
SARIF 2.1.0 and OCSF output, signed webhooks --sarif, taintline sarif, taintline ocsf, --notify-url upload to GitHub code scanning
GitHub Action for audit and monitor action.yml, docs/GITHUB_ACTION.md a run on GitHub
Black-box test of a chat endpoint you're authorized to test taintline blackbox a run on a real copilot
Check the oracle against human labels label-sheet, gate0, rescore done once: 30 labels, 0 mismatches, one lab and one model (docs/oracle_validation.md); more labs and models
Docker image, PyPI package, release workflow docker run --rm --network none ghcr.io/deep60/taintline, docs/RELEASE.md first release

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.

Metadata

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)

Source distribution for taintline 0.2.0
File Size Uploaded Provenance Actions
taintline-0.2.0.tar.gz 188.0 kB With provenance Details for taintline-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for taintline 0.2.0
File Interpreter ABI Platform Actions
taintline-0.2.0-py3-none-any.whl Python 3 none any Details for taintline-0.2.0-py3-none-any.whl

Total release size: 364.2 kB

Release files / taintline-0.2.0.tar.gz

Download URL taintline-0.2.0.tar.gz
Size 188.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d2f798d3fcc79875cbb9f5fa8024cfb8c722fd5f5504ee735e47fb5429bee41b
BLAKE2b-256 checksum
How to use checksums
01d79a12442bd3609927f8ee6a3ebdeb3b08f230b5c6d6ded8c693db77a7ed40
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

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.

Transparency log

Release files / taintline-0.2.0-py3-none-any.whl

Download URL taintline-0.2.0-py3-none-any.whl
Size 176.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
684741ab129792dd85fe04bee4d62716f49b19428c1f51a233c852019de18df8
BLAKE2b-256 checksum
How to use checksums
2b7c97e4e2b98ab196d0675f73875c3d6ec5ed2407b95aec5587dbd9f56e10e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

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.

Transparency log

Security for taintline 0.2.0

Provenance

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for taintline-0.2.0.tar.gz

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.

Transparency log

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

This release

0.2.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page