Skip to main content

Vulnerability Oriented Red-teaming for AI Knowledge

Project description

Vorak: Vulnerability Oriented Red-teaming for AI Knowledge

PyPI version License Python Version

Vorak is an advanced, enterprise-grade framework for systematically evaluating the security, safety, and compliance of Large Language Models (LLMs). It moves beyond static testing by using AI-driven techniques to discover novel vulnerabilities, providing a comprehensive solution for researchers, developers, and enterprises to secure their generative AI systems.


Table of Contents


Why Vorak?

While many tools can test for known vulnerabilities, Vorak is designed to discover the unknown. Its intelligent, multi-layered approach provides a deeper and more realistic assessment of AI security posture.

  • Automated Attack Escalation: Automatically discovers new attack vectors when a model resists initial attempts.
  • Enterprise-Ready Compliance: Translates security findings into actionable compliance risks for frameworks like NIST, EU AI Act, and MITRE ATLAS.
  • Progress Tracking: Provides concrete data to measure and report on security improvements over time.
  • Unified Experience: Offers a seamless workflow for both developers (CLI) and security teams (UI).

Core Features

  • Adaptive, AI-Powered Attack Escalation: If a model is compliant, Vorak's adaptive mode uses an LLM to automatically generate a stronger, more sophisticated prompt to bypass defenses.

  • Multi-Turn Scenario Testing: Simulates complex conversational attacks where vulnerabilities emerge over several turns, powered by an AI "scenario strategist".

  • Integrated Governance Layer: Automatically maps detected vulnerabilities to major compliance frameworks, including NIST AI RMF, EU AI Act, ISO/IEC 23894, and MITRE ATLAS.

  • Comparative Reporting: Compare two test sessions to track security posture over time, identify regressions, and generate executive-ready PDF reports showing the delta.

  • Security Sandbox: Safely analyzes generated code for dangerous patterns (e.g., file system access, network calls) using static analysis without ever executing the code.

  • Advanced Prompt Generation: Uses Gemini to augment and create novel adversarial prompts with sophisticated strategies like adversarial_phrasing.

  • YAML-Based Playbooks: Orchestrate complex, multi-step testing sequences for repeatable and shareable evaluation workflows.

  • Community Contribution CLI: A dedicated command (vorak prompt contribute) to validate and format new prompts, making it easy for the community to expand the prompt library.


Installation

Install the latest release from PyPI:

pip install vorak

For users who want to test local models (e.g., from Hugging Face), install the optional local dependencies:

pip install "vorak[local]"

For development, clone the repository and install in editable mode:

git clone https://github.com/ruchirk22/vorak.git
cd vorak
pip install -e .

Configuration

Vorak uses a .env file in your project's root directory to manage API keys.

# .env file
GEMINI_API_KEY="your_gemini_api_key"
OPENAI_API_KEY="your_openai_api_key"
ANTHROPIC_API_KEY="your_anthropic_api_key"
OPENROUTER_API_KEY="your_openrouter_api_key"
TAVILY_API_KEY="your_tavily_api_key" # Required for agent testing

Quick Start

Get help on any command:

vorak --help
vorak evaluate --help
vorak prompt --help

Run a standard evaluation:

vorak evaluate -p "JBR_001" -m "gemini/gemini-1.5-flash-latest"

Run an adaptive evaluation and save a report:

vorak evaluate -p "CGE_001" -m "gemini/gemini-1.5-flash-latest" --mode adaptive --output-pdf adaptive_report.pdf

Usage

Command-Line Interface (CLI)

Running Evaluations

# Standard evaluation with governance mapping
vorak evaluate -p "DPI_001" -m "openai/gpt-4o-mini" --mode governance

# Multi-turn scenario test
vorak evaluate -p "JBR_002" -m "anthropic/claude-3-5-sonnet-20240620" --mode scenario --turns 4

Comparing Sessions

# First, run two batch evaluations to get session IDs
vorak batch-evaluate -c "Code_Generation_Exploits" -m "gemini/gemini-1.5-flash-latest"
vorak batch-evaluate -c "Code_Generation_Exploits" -m "openrouter/google/gemma-2-9b-it:free"

# Then, compare the results
vorak compare-sessions "batch_..." "batch_..." --output-pdf comparison.pdf

Managing Prompts

# Generate 5 new prompts using advanced AI-driven phrasing
vorak prompt generate -c "Misinformation_Deception" -n 5 --strategy adversarial_phrasing -o new_prompts.json

# Validate and prepare prompts for a GitHub contribution
vorak prompt contribute -f new_prompts.json

# Clean up the main library file
vorak prompt cleanup

Executing Playbooks

# Run a pre-defined sequence of tests from a YAML file
vorak run --playbook my_security_plan.yaml

Web Interface

Launch the interactive Streamlit UI for a full GUI experience, including a security dashboard and session comparison tools.

vorak-ui

Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines on how to submit prompts, report bugs, or add new features.


License

Vorak is licensed under the Apache 2.0 License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vorak-1.0.6.tar.gz (57.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vorak-1.0.6-py3-none-any.whl (59.2 kB view details)

Uploaded Python 3

File details

Details for the file vorak-1.0.6.tar.gz.

File metadata

  • Download URL: vorak-1.0.6.tar.gz
  • Upload date:
  • Size: 57.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for vorak-1.0.6.tar.gz
Algorithm Hash digest
SHA256 7e6dbcbe5f0afd8edc8915b4e4daff155aaa3403b4b09d7927170001cdfc0981
MD5 24534308e263e8bb2cf5cae151f44ceb
BLAKE2b-256 986413b53e9f0512030834eb4a88cb07f7b12e3625c66e386a7d6eb079728c61

See more details on using hashes here.

File details

Details for the file vorak-1.0.6-py3-none-any.whl.

File metadata

  • Download URL: vorak-1.0.6-py3-none-any.whl
  • Upload date:
  • Size: 59.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for vorak-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 d86f834e7fe358354a0e555ba5a9bc12d0b6d70030bbd127d93a52d79097674e
MD5 6828b8088cfc2a4c2589fc541460cfd0
BLAKE2b-256 773950b85886646d891f02926f11410de39ae7a59844b92fb54ba20edda2adfd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page