![Coverage][coverage-badge]
![Security][security-badge]
![Python][python-badge]
![License][license-badge]
ViolentUTF/ViolentUTF/ci.yml?branch=main&label=CI [coverage-badge]: https://img.shields.io/codecov/c/github/\ ViolentUTF/ViolentUTF?label=coverage [security-badge]: https://img.shields.io/github/actions/workflow/\ status/ViolentUTF/ViolentUTF/ci.yml?branch=main&label=security [python-badge]: https://img.shields.io/badge/\ python-3.10%20%7C%203.11%20%7C%203.12-blue [license-badge]: https://img.shields.io/github/license/\ ViolentUTF/ViolentUTF
Enterprise-Grade AI Red-Teaming Platform
ViolentUTF is a comprehensive AI security testing platform that combines industry-leading frameworks (PyRIT, Garak) with enterprise authentication (Keycloak), API gateway (APISIX), and Model Context Protocol (MCP) integration. Built for security professionals, researchers, and developers who need reliable, scalable AI vulnerability assessment capabilities.
# Clone repository
git clone https://github.com/cybonto/ViolentUTF.git
cd ViolentUTF
# Configure AI provider keys
cp ai-tokens.env.sample ai-tokens.env
# Edit ai-tokens.env with your API keys
# Run complete setup
./setup_macos_new.sh
# Setup with different verbosity levels
./setup_macos_new.sh --quiet # Minimal output for automation
./setup_macos_new.sh --verbose # Detailed setup information
./setup_macos_new.sh --debug # Full debugging output
./setup_macos_new.sh --help # Show all options
# Clone and setup
git clone https://github.com/cybonto/ViolentUTF.git
cd ViolentUTF
cp ai-tokens.env.sample ai-tokens.env
# Edit ai-tokens.env with your API keys
./setup_linux.sh
# Clone and setup
git clone https://github.com/cybonto/ViolentUTF.git
cd ViolentUTF
copy ai-tokens.env.sample ai-tokens.env
# Edit ai-tokens.env with your API keys
setup_windows.bat
ViolentUTF setup scripts now support multiple verbosity levels to provide the right amount of information for different use cases:
| Verbosity Level | Flag | Use Case | Output Description |
|---|---|---|---|
| Quiet | --quiet / -q | CI/CD, Automation | Errors, warnings, and critical success messages only |
| Normal | (default) | Interactive Setup | Standard user experience with progress indicators |
| Verbose | --verbose / -v | Troubleshooting | Detailed information and configuration details |
| Debug | --debug / -d | Development | Full debugging output with variable dumps |
# Standard interactive setup
./setup_macos_new.sh
# Automated/silent setup for CI/CD
./setup_macos_new.sh --quiet
# Detailed troubleshooting setup
./setup_macos_new.sh --verbose
# Full debugging with all command output
./setup_macos_new.sh --debug
# View all available options
./setup_macos_new.sh --help
# Alternative: Use environment variable
export VUTF_VERBOSITY=2 # 0=quiet, 1=normal, 2=verbose, 3=debug
./setup_macos_new.sh
After setup completion:
| Service | URL | Description |
|---|---|---|
| Streamlit Dashboard | http://localhost:8501 | Main security testing interface |
| REST API | http://localhost:9080/api/v1 | FastAPI backend endpoints |
| API Documentation | http://localhost:9080/docs | Interactive API documentation (Swagger UI) |
| API ReDoc | http://localhost:9080/redoc | Alternative API documentation |
| MCP Server | http://localhost:9080/mcp/sse | Model Context Protocol endpoint |
| Keycloak SSO | http://localhost:8080 | Identity management console |
| Keycloak (via APISIX) | http://localhost:9080/auth | SSO login through gateway |
| APISIX Dashboard | http://localhost:9001 | API gateway management |
| AI Proxy Endpoints | http://localhost:9080/ai/* | Unified AI provider access |
ViolentUTF follows a microservices architecture with clear separation of concerns:
graph TB
subgraph "Client Layer"
C1[Streamlit Dashboard<br/>Port: 8501]
C2[REST API Clients]
C3[MCP Clients<br/>Claude/VS Code]
end
subgraph "API Gateway Layer"
AG[APISIX Gateway<br/>Port: 9080]
AGD[APISIX Dashboard<br/>Port: 9001]
end
subgraph "Authentication Layer"
KC[Keycloak SSO<br/>Port: 8080]
KCDB[(PostgreSQL<br/>Keycloak DB)]
end
subgraph "Application Services"
API[FastAPI Service<br/>Port: 8000]
MCP[MCP Server<br/>23+ Tools]
ST[Streamlit App]
end
subgraph "Security Frameworks"
PYRIT[PyRIT Framework<br/>20+ Scorers]
GARAK[Garak Scanner<br/>100+ Probes]
IRON[IronUTF Defense<br/>Real-time Protection]
end
subgraph "Data Storage"
SQLITE[(SQLite<br/>PyRIT Memory & API Data)]
SQLITE_USER[(SQLite<br/>User-Specific DBs)]
end
C1 -->|HTTP/WebSocket| AG
C2 -->|REST API| AG
C3 -->|SSE/JSON-RPC| AG
AG -->|Auth Check| KC
AG -->|Route| API
AG -->|Route| MCP
AG -->|Proxy| ST
KC --> KCDB
API --> PYRIT
API --> GARAK
API --> IRON
API --> SQLITE
MCP --> API
ST --> API
PYRIT --> SQLITE_USER
API --> SQLITE
classDef gateway fill:#ff9999
classDef auth fill:#99ccff
classDef service fill:#99ff99
classDef framework fill:#ffcc99
classDef storage fill:#cc99ff
class AG,AGD gateway
class KC auth
class API,MCP,ST service
class PYRIT,GARAK,IRON framework
class DUCK,SQLITE,KCDB storage
sequenceDiagram
participant User
participant Streamlit
participant APISIX
participant Keycloak
participant FastAPI
participant PyRIT
Note over User,Keycloak: Initial Authentication Flow
User->>Streamlit: Access Dashboard (http://localhost:8501)
Streamlit->>Streamlit: Check for valid session
alt No valid session
Streamlit->>User: Redirect to Keycloak SSO
User->>Keycloak: Login with credentials
Keycloak->>Keycloak: Validate credentials
Keycloak-->>User: Return access token
User-->>Streamlit: Return with token
Streamlit->>Streamlit: Create API token from Keycloak token
end
Note over Streamlit,PyRIT: API Request Flow
User->>Streamlit: Initiate Security Test
Streamlit->>APISIX: API Request with JWT<br/>(http://localhost:9080/api/v1/*)
APISIX->>APISIX: Check route configuration
APISIX->>APISIX: Apply rate limiting
APISIX->>APISIX: Add gateway headers
APISIX->>FastAPI: Forward request with headers<br/>(X-API-Gateway: APISIX)
FastAPI->>FastAPI: Verify JWT signature
FastAPI->>FastAPI: Check user context
alt Valid request
FastAPI->>PyRIT: Execute orchestrator/scorer
PyRIT->>PyRIT: Load prompts/datasets
PyRIT->>PyRIT: Run security tests
PyRIT->>PyRIT: Generate scores
PyRIT-->>FastAPI: Return test results
FastAPI-->>APISIX: JSON response
APISIX-->>Streamlit: Forward response
Streamlit->>Streamlit: Update dashboard
Streamlit-->>User: Display results
else Invalid token or request
FastAPI-->>APISIX: 401/403 error
APISIX-->>Streamlit: Forward error
Streamlit-->>User: Show authentication error
end
Comprehensive documentation is available in the docs/ directory:
⚠️ Important: ViolentUTF provides powerful AI security testing capabilities. Always ensure:
# Run complete test suite
cd tests && ./run_tests.sh
# API-specific tests
cd tests/api_tests && ./run_api_tests.sh
# MCP integration tests
cd tests/mcp_tests && python -m pytest
# Check all services
./check_services.sh
# Verify APISIX routes
cd apisix && ./verify_routes.sh
If you encounter issues during setup, use different verbosity levels to get more information:
# For detailed troubleshooting information
./setup_macos_new.sh --verbose
# For full debugging output (includes all command execution)
./setup_macos_new.sh --debug
# Check specific service status
./check_services.sh
# Verify APISIX routes
cd apisix && ./verify_routes.sh
The setup script automatically detects and handles SSL certificate issues. If you encounter SSL errors during setup, you have two options:
The setup script will automatically detect SSL issues and apply a workaround. No action needed.
If you have your Zscaler certificates:
/docs/guides/zscaler-setup.md)cp zscaler.crt violentutf_api/fastapi_app/
cp CA.crt violentutf_api/fastapi_app/
cp violentutf_api/fastapi_app/Dockerfile.zscaler violentutf_api/fastapi_app/Dockerfile
./setup_macos.sh
/docs/troubleshooting/keycloak-password-fix.md./check_services.sh to verify all services are runningFor more detailed troubleshooting, see the Troubleshooting Guide.
We welcome contributions! Please see our Contributing Guidelines for details.
# Clone repository
git clone https://github.com/cybonto/ViolentUTF.git
# Setup development environment with verbose output
./setup_macos_new.sh --verbose # or setup_linux.sh/setup_windows.bat
# For debugging setup issues
./setup_macos_new.sh --debug
# Activate Python environment
source .vitutf/bin/activate
# Install development dependencies
pip install -r violentutf/requirements.txt
This project is licensed under the MIT License - see the LICENSE file for details.
ViolentUTF builds upon excellent open-source projects:
ViolentUTF - Empowering responsible AI security through comprehensive red-teaming capabilities.
Python
86.9%
Shell
11.5%
Batchfile
1.1%
![Coverage][coverage-badge]
![Security][security-badge]
![Python][python-badge]
![License][license-badge]
ViolentUTF/ViolentUTF/ci.yml?branch=main&label=CI [coverage-badge]: https://img.shields.io/codecov/c/github/\ ViolentUTF/ViolentUTF?label=coverage [security-badge]: https://img.shields.io/github/actions/workflow/\ status/ViolentUTF/ViolentUTF/ci.yml?branch=main&label=security [python-badge]: https://img.shields.io/badge/\ python-3.10%20%7C%203.11%20%7C%203.12-blue [license-badge]: https://img.shields.io/github/license/\ ViolentUTF/ViolentUTF
Enterprise-Grade AI Red-Teaming Platform
ViolentUTF is a comprehensive AI security testing platform that combines industry-leading frameworks (PyRIT, Garak) with enterprise authentication (Keycloak), API gateway (APISIX), and Model Context Protocol (MCP) integration. Built for security professionals, researchers, and developers who need reliable, scalable AI vulnerability assessment capabilities.
# Clone repository
git clone https://github.com/cybonto/ViolentUTF.git
cd ViolentUTF
# Configure AI provider keys
cp ai-tokens.env.sample ai-tokens.env
# Edit ai-tokens.env with your API keys
# Run complete setup
./setup_macos_new.sh
# Setup with different verbosity levels
./setup_macos_new.sh --quiet # Minimal output for automation
./setup_macos_new.sh --verbose # Detailed setup information
./setup_macos_new.sh --debug # Full debugging output
./setup_macos_new.sh --help # Show all options
# Clone and setup
git clone https://github.com/cybonto/ViolentUTF.git
cd ViolentUTF
cp ai-tokens.env.sample ai-tokens.env
# Edit ai-tokens.env with your API keys
./setup_linux.sh
# Clone and setup
git clone https://github.com/cybonto/ViolentUTF.git
cd ViolentUTF
copy ai-tokens.env.sample ai-tokens.env
# Edit ai-tokens.env with your API keys
setup_windows.bat
ViolentUTF setup scripts now support multiple verbosity levels to provide the right amount of information for different use cases:
| Verbosity Level | Flag | Use Case | Output Description |
|---|---|---|---|
| Quiet | --quiet / -q | CI/CD, Automation | Errors, warnings, and critical success messages only |
| Normal | (default) | Interactive Setup | Standard user experience with progress indicators |
| Verbose | --verbose / -v | Troubleshooting | Detailed information and configuration details |
| Debug | --debug / -d | Development | Full debugging output with variable dumps |
# Standard interactive setup
./setup_macos_new.sh
# Automated/silent setup for CI/CD
./setup_macos_new.sh --quiet
# Detailed troubleshooting setup
./setup_macos_new.sh --verbose
# Full debugging with all command output
./setup_macos_new.sh --debug
# View all available options
./setup_macos_new.sh --help
# Alternative: Use environment variable
export VUTF_VERBOSITY=2 # 0=quiet, 1=normal, 2=verbose, 3=debug
./setup_macos_new.sh
After setup completion:
| Service | URL | Description |
|---|---|---|
| Streamlit Dashboard | http://localhost:8501 | Main security testing interface |
| REST API | http://localhost:9080/api/v1 | FastAPI backend endpoints |
| API Documentation | http://localhost:9080/docs | Interactive API documentation (Swagger UI) |
| API ReDoc | http://localhost:9080/redoc | Alternative API documentation |
| MCP Server | http://localhost:9080/mcp/sse | Model Context Protocol endpoint |
| Keycloak SSO | http://localhost:8080 | Identity management console |
| Keycloak (via APISIX) | http://localhost:9080/auth | SSO login through gateway |
| APISIX Dashboard | http://localhost:9001 | API gateway management |
| AI Proxy Endpoints | http://localhost:9080/ai/* | Unified AI provider access |
ViolentUTF follows a microservices architecture with clear separation of concerns:
graph TB
subgraph "Client Layer"
C1[Streamlit Dashboard<br/>Port: 8501]
C2[REST API Clients]
C3[MCP Clients<br/>Claude/VS Code]
end
subgraph "API Gateway Layer"
AG[APISIX Gateway<br/>Port: 9080]
AGD[APISIX Dashboard<br/>Port: 9001]
end
subgraph "Authentication Layer"
KC[Keycloak SSO<br/>Port: 8080]
KCDB[(PostgreSQL<br/>Keycloak DB)]
end
subgraph "Application Services"
API[FastAPI Service<br/>Port: 8000]
MCP[MCP Server<br/>23+ Tools]
ST[Streamlit App]
end
subgraph "Security Frameworks"
PYRIT[PyRIT Framework<br/>20+ Scorers]
GARAK[Garak Scanner<br/>100+ Probes]
IRON[IronUTF Defense<br/>Real-time Protection]
end
subgraph "Data Storage"
SQLITE[(SQLite<br/>PyRIT Memory & API Data)]
SQLITE_USER[(SQLite<br/>User-Specific DBs)]
end
C1 -->|HTTP/WebSocket| AG
C2 -->|REST API| AG
C3 -->|SSE/JSON-RPC| AG
AG -->|Auth Check| KC
AG -->|Route| API
AG -->|Route| MCP
AG -->|Proxy| ST
KC --> KCDB
API --> PYRIT
API --> GARAK
API --> IRON
API --> SQLITE
MCP --> API
ST --> API
PYRIT --> SQLITE_USER
API --> SQLITE
classDef gateway fill:#ff9999
classDef auth fill:#99ccff
classDef service fill:#99ff99
classDef framework fill:#ffcc99
classDef storage fill:#cc99ff
class AG,AGD gateway
class KC auth
class API,MCP,ST service
class PYRIT,GARAK,IRON framework
class DUCK,SQLITE,KCDB storage
sequenceDiagram
participant User
participant Streamlit
participant APISIX
participant Keycloak
participant FastAPI
participant PyRIT
Note over User,Keycloak: Initial Authentication Flow
User->>Streamlit: Access Dashboard (http://localhost:8501)
Streamlit->>Streamlit: Check for valid session
alt No valid session
Streamlit->>User: Redirect to Keycloak SSO
User->>Keycloak: Login with credentials
Keycloak->>Keycloak: Validate credentials
Keycloak-->>User: Return access token
User-->>Streamlit: Return with token
Streamlit->>Streamlit: Create API token from Keycloak token
end
Note over Streamlit,PyRIT: API Request Flow
User->>Streamlit: Initiate Security Test
Streamlit->>APISIX: API Request with JWT<br/>(http://localhost:9080/api/v1/*)
APISIX->>APISIX: Check route configuration
APISIX->>APISIX: Apply rate limiting
APISIX->>APISIX: Add gateway headers
APISIX->>FastAPI: Forward request with headers<br/>(X-API-Gateway: APISIX)
FastAPI->>FastAPI: Verify JWT signature
FastAPI->>FastAPI: Check user context
alt Valid request
FastAPI->>PyRIT: Execute orchestrator/scorer
PyRIT->>PyRIT: Load prompts/datasets
PyRIT->>PyRIT: Run security tests
PyRIT->>PyRIT: Generate scores
PyRIT-->>FastAPI: Return test results
FastAPI-->>APISIX: JSON response
APISIX-->>Streamlit: Forward response
Streamlit->>Streamlit: Update dashboard
Streamlit-->>User: Display results
else Invalid token or request
FastAPI-->>APISIX: 401/403 error
APISIX-->>Streamlit: Forward error
Streamlit-->>User: Show authentication error
end
Comprehensive documentation is available in the docs/ directory:
⚠️ Important: ViolentUTF provides powerful AI security testing capabilities. Always ensure:
# Run complete test suite
cd tests && ./run_tests.sh
# API-specific tests
cd tests/api_tests && ./run_api_tests.sh
# MCP integration tests
cd tests/mcp_tests && python -m pytest
# Check all services
./check_services.sh
# Verify APISIX routes
cd apisix && ./verify_routes.sh
If you encounter issues during setup, use different verbosity levels to get more information:
# For detailed troubleshooting information
./setup_macos_new.sh --verbose
# For full debugging output (includes all command execution)
./setup_macos_new.sh --debug
# Check specific service status
./check_services.sh
# Verify APISIX routes
cd apisix && ./verify_routes.sh
The setup script automatically detects and handles SSL certificate issues. If you encounter SSL errors during setup, you have two options:
The setup script will automatically detect SSL issues and apply a workaround. No action needed.
If you have your Zscaler certificates:
/docs/guides/zscaler-setup.md)cp zscaler.crt violentutf_api/fastapi_app/
cp CA.crt violentutf_api/fastapi_app/
cp violentutf_api/fastapi_app/Dockerfile.zscaler violentutf_api/fastapi_app/Dockerfile
./setup_macos.sh
/docs/troubleshooting/keycloak-password-fix.md./check_services.sh to verify all services are runningFor more detailed troubleshooting, see the Troubleshooting Guide.
We welcome contributions! Please see our Contributing Guidelines for details.
# Clone repository
git clone https://github.com/cybonto/ViolentUTF.git
# Setup development environment with verbose output
./setup_macos_new.sh --verbose # or setup_linux.sh/setup_windows.bat
# For debugging setup issues
./setup_macos_new.sh --debug
# Activate Python environment
source .vitutf/bin/activate
# Install development dependencies
pip install -r violentutf/requirements.txt
This project is licensed under the MIT License - see the LICENSE file for details.
ViolentUTF builds upon excellent open-source projects:
ViolentUTF - Empowering responsible AI security through comprehensive red-teaming capabilities.
Python
86.9%
Shell
11.5%
Batchfile
1.1%