Metadata-Version: 2.5
Name: raven-test
Version: 1.0.1
Summary: Autonomous Security Regression & Remediation Assurance CLI for LLM Applications and Agents
Project-URL: Homepage, https://github.com/evinbrijesh/RAVEN
Project-URL: Documentation, https://github.com/evinbrijesh/RAVEN/blob/main/workers/evaluator/README.md
Project-URL: Repository, https://github.com/evinbrijesh/RAVEN.git
Project-URL: Issues, https://github.com/evinbrijesh/RAVEN/issues
Author-email: RAVEN Security Team <security@raven-ai.dev>
License-Expression: MIT
License-File: LICENSE
Keywords: ai-safety,devops,llm,mcp,red-teaming,security
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Security
Requires-Python: >=3.12
Requires-Dist: pyyaml>=6.0
Requires-Dist: raven-core
Description-Content-Type: text/markdown

# 🦅 raven-test
### Autonomous Security Regression & Remediation Assurance CLI for LLM Applications

`raven-test` is the standalone developer CLI and CI/CD security gate from the
[RAVEN](https://github.com/evinbrijesh/RAVEN) framework. It runs a versioned
catalog of red-team attacks against your LLM app or agent, checks results with
deterministic rules first and an optional structured LLM judge second, proposes
prompt and tool-policy hardening, and re-tests to prove the fix worked without
breaking legitimate requests. Output is OASIS SARIF 2.1.0 for GitHub Code
Scanning, plus JSON, JUnit, and terminal scorecards.

---

## ⚡ Quickstart

### 1. Installation

```bash
pip install raven-test
```

`raven-test` pulls in `raven-core` automatically.

### 2. Scaffold a New Project

```bash
raven-test init
```

Detects a local agent endpoint and writes `raven.yaml`.

### 3. Pre-Flight Validation (Zero-Attack Dry Run)

```bash
raven-test run --dry-run
```

Checks target connectivity and profiles tool schemas without sending attacks.

### 4. Run a Security Regression Scan

```bash
raven-test run --config raven.yaml --fail-on high
```

Against the built-in ShopHelper demo target:

```bash
raven-test run --target shophelper-local
```

### 5. CI Gate with SARIF Output

```bash
raven-test run --config raven.yaml --fail-on high --output sarif > raven-results.sarif
```

---

## 🎯 What It Tests

- **direct_injection**, system prompt override and goal hijacking
- **canary_leakage**, extraction of embedded canary tokens and secrets
- **sensitive_data**, PII and cross-customer data disclosure
- **tool_misuse**, unauthorized or unverified tool calls (refunds, lookups)

The v2 catalog ships 18 attack cases mapped to OWASP LLM Top 10 (2025) and
MITRE ATLAS. A benign utility suite runs alongside attacks to measure
over-refusal: a fix that blocks attacks but breaks real customers shows up as
a regression, not a pass.

## 🛡️ Targets

- `shophelper-local`, built-in demo bot, zero setup
- External HTTP/REST agents via `raven.yaml` (`--target-url`)
- MCP servers over stdio and in-process transports

## 🔒 Design Rules

- Deterministic checks (canary, secret, PII, tool-policy) run before any LLM
  call; the model judge is optional and bounded
- Every verdict maps to explicit labels: `confirmed_failure`, `likely_failure`,
  `attack_blocked`, `needs_review`, and others
- Hardening is always a reviewable diff; nothing is auto-applied
- A clean scan is evidence under stated checks, not a security guarantee

## 🔗 Related Packages

- [`raven-core`](https://pypi.org/project/raven-core/), shared domain models,
  persistence, and the FastAPI control plane (pulled in automatically)
- [`raven-shield`](https://pypi.org/project/raven-shield/), runtime policy
  gateway that enforces the guardrails `raven-test` proposes
- [GitHub Action](https://github.com/evinbrijesh/RAVEN/tree/main/actions/raven-security-scan) , 
  one-line PR gate with scorecard comments and SARIF upload

## 📄 License

MIT
