Skip to content
909b2daf7b3ad5046ebf8f0f5669fec104442941

909b2daf7b3ad5046ebf8f0f5669fec104442941

github.com • December 1, 2026

Bounded red-teaming, deterministic regex proofs, and non-regression verification before production deploy. Transforms penetration testing from one-off audits into reproducible, automated test suites.

Quickstart • Architecture • Key Features • Threat Matrix • CI/CD & CLI • MCP Guide • Demo Walkthrough

Every time an AI team tweaks an LLM application's prompt, adds a tool, or upgrades a model, they silently re-open vulnerabilities they already fixed .

Traditional red-team scanners (e.g. PyRIT, promptfoo, Garak) are open-loop : they produce vulnerability reports and leave developers to guess what to fix and whether the fix broke legitimate customer requests.

RAVEN is closed-loop :

Discovers vulnerabilities with cryptographic-grade evidence (exact canaries, PII leaks, unauthorized tool calls, MCP exploits).

Synthesizes constrained mitigations (system prompt diffs + deterministic raven-policy.yaml runtime guardrails).

Guards with human-in-the-loop approvals backed by atomic concurrency guards ( HTTP 409 Conflict ).

Measures the Frontier : Re-tests attack cases while running a benign utility suite to quantify security gains vs. over-refusal penalties.

Findings Become Tests : Converts confirmed findings into continuous regression suites executed on every CI commit and PR via GitHub Actions.

Enforces at Runtime : Automatically compiles guardrails directly into raven-shield for fail-closed runtime defense.

Verifies Integrity : Cryptographically hashes run artifacts and transcripts with SHA-256 for tamper-evident auditing.

🏛️ End-to-End Architecture (Discovery + Runtime Prevention)

🎯 2-Stage Attack & Adaptive Mutation Pipeline

Stage 1 (Deterministic Precision): Exact canary token extraction, PII leaks, and unauthorized tool calls are detected with 100% certainty—zero model hallucination.

Stage 2 (Adaptive LLM Mutator): When a target deflects an attack with a defensive refusal, an AI Attacker inspects the refusal and dynamically synthesizes evasion variants (authority overrides, roleplay scenarios, translation encoding, hypothetical debugging).

⚖️ Dual-Layer Judge & Resolver

Conservative Resolution: Deterministic evidence always overrides model opinions.

Audit Transparency: If deterministic checks and the model judge disagree, RAVEN marks the verdict needs_review and preserves the full transcript for human inspection.

🛡️ Hardening & Policy Candidate Generation

Generates transparent Prompt Diffs that instruct the LLM on safe refusal boundaries.

Compiles machine-readable Runtime Tool Policies (e.g., locking down issue_refund behind authenticated user and order verification).

Side-by-side unified diff visualization in the web dashboard.

🔒 Enterprise Isolation & Cryptographic Integrity

Multi-Tenant Workspaces: Project and workspace scoping ensuring scans, findings, and regression suites belong strictly to designated project IDs.

Deterministic Redaction: Automatically sanitizes API keys ( sk-... ), Bearer tokens, and sensitive PII from exported reports and transcripts.

Tamper-Evident SHA-256 Digests: Artifact verification endpoint ( GET /api/scans/{id}/artifacts/{artifact_id}/verify ) and one-click UI audit widget validating cryptographic hashes of SARIF, JSON, and Markdown reports.

Atomic Approval Concurrency Guard: Compare-and-swap transaction protection ( HTTP 409 Conflict ) on approval transitions to prevent double-click race conditions and duplicate retest jobs.

📊 Security & Utility Frontier Delta

A mitigation is unacceptable if it breaks legitimate business workflows. RAVEN reports both:

Security Gain: Attack Success Rate reduction ( $X% \rightarrow Y%$ , $-Z%$ risk reduction).

Utility Preserved: Benign customer task completion rate (e.g. $100%$ utility preservation).

Over-Refusal Rate: Quantifies whether the patch is over-blocking normal users.

📜 Standards-Compliant Reporting & CI Gate

OASIS SARIF 2.1.0: Direct export compliant with GitHub Code Scanning (includes %SRCROOT% mapping, rules catalog metadata, security severity ratings, and stable finding fingerprints).

Audit Bundle (.zip): One-click signed archive download ( GET /api/scans/{id}/bundle ) packaging SARIF, markdown summary, canonical JSON, findings ledger, raw transcripts, manifest, and SHA-256 checksums.

SSRF & Network Defense: Validates URL schemes, blocks private/loopback/metadata IP ranges, and enforces X-Raven-Scan-Consent: true .

🗺️ Threat Matrix Mapping

Every test case in the RAVEN catalog is versioned and cross-referenced with modern AI security standards:

🛠️ CI/CD GitHub Action & CLI Runner

RAVEN can run directly inside your CI/CD pipelines as an automated security regression gate.

1. 1-Line GitHub Action Integration ( uses: evinbrijesh/RAVEN/actions/raven-security-scan@v1 )

Add RAVEN to your GitHub workflow ( .github/workflows/security.yml ):

2. Standalone Developer CLI ( raven-test )

Install the CLI directly from PyPI:

Initialize your project and run scans directly from your terminal:

The CLI renders an interactive ASCII/Unicode Frontier Security Scorecard and colorized diff proposals for detected breaches:

🔌 Model Context Protocol (MCP) Security Scanning

RAVEN natively evaluates Model Context Protocol (MCP) tool servers and SSE endpoints against prompt injection, unconstrained tool calling, and parameter poisoning.

Run MCP Evaluation via CLI

Declarative MCP Configuration ( raven.yaml )

When an unconstrained MCP tool call (such as a database delete or unverified refund) is detected, RAVEN:

Emits an OASIS SARIF 2.1.0 finding targeting the MCP tool definition.

Compiles a fail-closed runtime policy in raven-policy.yaml .

Validates that benign MCP tool calls retain 100% utility.

Copy the template configuration:

(By default, RAVEN runs 100% locally with zero external API dependencies using deterministic checks and simulated adapters.)

3. Launch Development Stack

Web UI:

API Documentation:

Health Check:

📂 Repository Architecture

Option A: Web Mission Control

Follow the scripted 5-Minute Pitch Sequence in docs/DEMO_SCRIPT.md :

Select Workspace: Switch project workspaces from the header dropdown (e.g. Default Project vs E-Commerce Agents ).

Launch Scan: Select shophelper-local (or configure an authorized HTTP / MCP target) and click Launch Scan .

Observe Real-Time Stream: Watch the live SSE event feed and dynamic agent constellation transition: reconnaissance → attacking → arbitration → hardening .

Inspect Evidence: Click any finding in the triage table to open the slide-out Evidence Drawer showing cryptographic canary leaks or unauthorized tool calls.

Audit Disagreements: Filter by the "Judge Audit / Needs Review" tab to inspect cases where the rule engine and model judge disagreed.

Review Hardening Diff: Inspect side-by-side system prompt diffs and compiled tool policy constraints.

Approve Gate: Click Approve Hardening (concurrency-protected via HTTP 409) to trigger target re-testing.

Verify Frontier Delta: Review the Security & Utility Frontier card showing attack drop vs. benign usability preservation.

Export & Verify Audit Digest: Download SARIF 2.1.0 , JSON, Markdown reports, or click "Export Audit Bundle (.zip)" to download the complete sealed audit archive with cryptographic SHA-256 checksums.

Inspect Runtime Policy & CI Config: Open the "View Policy & CI Config" modal to copy production raven-shield YAML and CI workflow rules.

Manage Regression Suite: View permanent CI regression guardrails at /regression .

Option B: Automated Terminal Showcase ( scripts/demo_v1.py )

Run the self-contained live demonstration in seconds:

This automated verification:

Attacks an unhardened agent, demonstrating a critical parameter override breach ( ASR: 100.0% ).

Compiles a fail-closed raven-policy.yaml runtime guardrail.

Deploys the raven-shield runtime gateway to actively intercept and deflect the exploit ( ASR: 0.0% ).

Audits an MCP server across in-process, stdio, and SSE transports with schema smuggling and canary token verification.

🧪 Testing & Verification

RAVEN is thoroughly verified with 293+ automated tests across API, worker, CLI, and runtime guard SDK:

⚖️ Safety & Ethical Principles

Explicit Target Authorization: RAVEN blocks private network ranges (SSRF) and requires explicit consent ( X-Raven-Scan-Consent: true ) for live endpoints.

No Self-Deploying Code: All synthesized patches and guardrails exist exclusively in proposal state until human approval.

Evidence Over Belief: LLM opinions never override deterministic evidence. If evidence is absent, the finding is marked not_evaluated , never "secure".

Cryptographic Grounding: Run evidence and exported reports are SHA-256 hashed to guarantee tamper-evident audit trails.

No Security Theater: Passing a test suite verifies behavior only under stated checks , never universal immunity.

Distributed under the MIT License. See LICENSE for details.