Metadata-Version: 2.4
Name: ctpf
Version: 0.13.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: keyring>=25.0
Requires-Dist: litellm!=1.82.7,!=1.82.8,<1.92,>=1.80
Requires-Dist: mcp<2,>=1.26
Requires-Dist: pyyaml>=6.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–3.13](https://img.shields.io/badge/python-3.11--3.13-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 core target, run, and finding records in SQLite. Controlled experiments write
traces, effect artifacts, and hashed evidence bundles to a required operator-selected output
directory outside the Git checkout. 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.

### Retained library and fixtures

Audit enumeration and SARIF export remain in-tree as a library capability rather than a
root CLI pillar. Audit findings can include OWASP MCP, OWASP Agentic, MITRE ATLAS, and CWE
identifiers. Demonstrated experiment fixtures are narrow scenario/test modules; the former
IPI, CXP, and Inject library packages are removed and must not be treated as product modules.

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

---

## Quick Start

Install from PyPI:

```bash
pip install ctpf
```

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
```

Or run from source:

```bash
git clone https://github.com/q-uestionable-AI/CTPF.git
cd CTPF
uv sync --group dev
uv run ctpf proxy --help
uv run ctpf targets add "My Server" http://localhost:3000/sse
```

---

Published documentation: [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.
