Metadata-Version: 2.4
Name: ctpf
Version: 0.12.0
Summary: Trust-boundary testing for agentic systems
Project-URL: Homepage, https://q-uestionable.ai
Project-URL: Repository, https://github.com/q-uestionable-AI/CTPF
Project-URL: Issues, https://github.com/q-uestionable-AI/CTPF/issues
Author-email: Richard Spicer <richard@richardspicer.io>
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: agentic-ai,ai,mcp,security,security-testing
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Security
Requires-Python: <3.14,>=3.11
Requires-Dist: anthropic>=0.84
Requires-Dist: fastapi>=0.115
Requires-Dist: icalendar>=6.1.0
Requires-Dist: keyring>=25.0
Requires-Dist: litellm!=1.82.7,!=1.82.8,<1.92,>=1.80
Requires-Dist: mcp<2,>=1.26
Requires-Dist: piexif>=1.1.3
Requires-Dist: pypdf>=6.9.2
Requires-Dist: python-docx>=1.2.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: reportlab>=4.4.0
Requires-Dist: requests>=2.33.0
Requires-Dist: rich>=13.0
Requires-Dist: textual>=0.80
Requires-Dist: typer>=0.9
Requires-Dist: uvicorn[standard]>=0.34
Description-Content-Type: text/markdown

# CTPF Research Harness

[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
[![CI](https://github.com/q-uestionable-AI/CTPF/actions/workflows/ci.yml/badge.svg)](https://github.com/q-uestionable-AI/CTPF/actions/workflows/ci.yml)
[![CodeQL](https://github.com/q-uestionable-AI/CTPF/actions/workflows/codeql.yml/badge.svg)](https://github.com/q-uestionable-AI/CTPF/actions/workflows/codeql.yml)
[![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)
[![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Docs](https://img.shields.io/badge/docs-ctpf.q--uestionable.ai-8b5cf6)](https://ctpf.q-uestionable.ai)

**Trust-boundary testing for agentic systems**

CTPF Research Harness investigates **Capability Trust Propagation Failure (CTPF)**: whether low-trust data
(for example a tool result) is silently promoted into higher-authority actions when
provenance, integrity, authorization scope, or intended audience are not preserved.

The product shape is a small local CLI: capture MCP traffic, mutate it under control via
proxy, and keep runs/findings/evidence in SQLite. Individual experiments **confirm** or
**fail to observe** promotion under pinned conditions — they do not “falsify CTPF” as a class.

### Public CLI

| Command | Role |
|---------|------|
| `ctpf proxy` | Intercept, inspect, modify, and export MCP traffic (Textual TUI) |
| `ctpf experiment` | Run controlled CTPF experiments |
| `ctpf targets` | Register MCP targets |
| `ctpf runs` / `ctpf findings` | Inspect stored runs and findings |
| `ctpf config` / `ctpf db` | Settings and local database maintenance |
| `ctpf --version` | Package version |

The former `qai` command remains a compatibility alias for `ctpf` during the identity transition.

### Libraries (not root CLI pillars)

IPI document generators + headless callback, inject malicious MCP fixture servers, CXP
context generators, and audit enumeration/SARIF export remain in-tree as libraries for
research fixtures. They are not equal product modules on the public CLI.

> By [Richard Spicer](https://richardspicer.io) · [q-uestionable-AI](https://q-uestionable.ai)

---

## Quick Start

```bash
pip install ctpf
# or from source:
git clone https://github.com/q-uestionable-AI/CTPF.git
cd CTPF
uv sync --group dev
```

Starting with v0.12.0, the former `q-uestionable-ai` distribution is a compatibility package
that installs the same-version `ctpf` distribution.

```bash
ctpf proxy --help
ctpf targets add "My Server" http://localhost:3000/sse
```

---

## Framework mappings (library audit)

When using the audit library, findings can map to:

| Framework | Coverage |
|-----------|----------|
| [OWASP MCP Top 10](https://owasp.org/www-project-mcp-top-10/) | All 10 categories |
| [OWASP Agentic Top 10](https://genai.owasp.org/resource/owasp-top-10-for-agentic-applications-for-2026/) | All 10 categories |
| [MITRE ATLAS](https://atlas.mitre.org/) | Technique-level mapping per finding category |
| [CWE](https://cwe.mitre.org/) | Weakness-level mapping per finding category |

---

Architecture notes: [docs/Architecture.md](docs/Architecture.md).
Published docs: [ctpf.q-uestionable.ai](https://ctpf.q-uestionable.ai).

---

## Legal

All tools are intended for authorized security testing only. Only test systems you own,
control, or have explicit permission to test. Responsible disclosure for all
vulnerabilities discovered.

## License

[Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0)

## AI Disclosure

This project uses AI-assisted development. All code is reviewed and tested before merge.
