Getting Started

This guide walks you through installing Basilisk and running your first LLM security scan.

Prerequisites

  • Python 3.11 or higher
  • An API key for the LLM provider you want to test (OpenAI, Anthropic, etc.)

Installation

via pip (Recommended)

pip install basilisk-ai
basilisk --version

via Docker

docker pull rothackers/basilisk:latest

via Source

git clone https://github.com/noobforanonymous/basilisk
cd basilisk
pip install -e ".[dev]"

Configuration

Set your API key as an environment variable:

# OpenAI
export OPENAI_API_KEY="sk-..."

# Anthropic
export ANTHROPIC_API_KEY="sk-ant-..."

# Google
export GOOGLE_API_KEY="AIza..."

Your First Scan

Quick Scan (fastest, no evolution)

basilisk scan -t https://api.target.com/chat -p openai --mode quick

Standard Scan (with evolution)

basilisk scan -t https://api.target.com/chat -p openai

Deep Scan (10 generations of evolution)

basilisk scan -t https://api.target.com/chat -p openai --mode deep --generations 10

Understanding Output

Basilisk will display real-time progress in your terminal:

[*] Basilisk v0.1.0 — AI Red Teaming Framework
[*] Recon: Fingerprinting target model...
[+] Model identified: GPT-4 (OpenAI)
[*] Guardrail profile: 6/8 categories blocked
[*] Loading 29 attack modules across 8 categories...
[!] FINDING: System prompt extracted via role confusion
[+] Scan complete. 4 findings (1 Critical, 2 High, 1 Medium)
[*] Report saved: basilisk-reports/report.html

Next Steps