This guide is for someone who wants to use Basilisk from a terminal for the first time and get a clean, understandable result without having to learn every command upfront.
Use Basilisk only on systems you own or are explicitly authorized to test.
- Python 3.11 or newer
- a reachable target endpoint
- a provider and model, if the target is not a custom HTTP endpoint
- credentials in environment variables or a local key file
For provider-backed scans, Basilisk expects credentials through environment variables such as:
OPENAI_API_KEYANTHROPIC_API_KEYGOOGLE_API_KEYGH_MODELS_TOKENGROQ_API_KEYXAI_API_KEY
You can also pass a file path with @/path/to/file to --api-key. Inline secrets are intentionally rejected because they leak into shell history and process listings.
python -m venv .venv
source .venv/bin/activate
pip install -U pip
pip install basilisk-aiIf you want PDF reports, keyring-backed secrets, or multimodal support:
pip install "basilisk-ai[pdf,secrets,multimodal]"Before you attack anything, look at the module catalog:
basilisk modulesThat shows:
- module name
- trust tier
- category
- default severity
- short description
The trust tier matters:
productionmeans stricter evidence requirementsbetameans useful but less matureresearchmeans explicit opt-in only
Example with OpenAI:
export OPENAI_API_KEY="sk-..."
basilisk scan \
--target https://example.test/v1/chat/completions \
--provider openai \
--model gpt-4oWhat this does:
- builds a scan configuration
- fingerprints the target unless you skip recon
- selects attack modules based on trust tier and policy
- runs attacks and optional evolution
- writes a report to
./basilisk-reports - stores session data in
./basilisk-sessions.db
Start with one of these:
quick: fastest first passstandard: best default starting pointdeep: more time, more generations, more coveragestealth: lower-rate probingchaos: highest aggression
Example:
basilisk scan \
--target https://example.test/v1/chat/completions \
--provider openai \
--model gpt-4o \
--mode standardThis is a policy choice, not the same thing as scan mode.
recon: learn the target, do not push exploitationvalidate: safest starting point for evidence-backed findingsexploit_chain: more aggressive chained executionresearch: exploratory mode
Example:
basilisk scan \
--target https://example.test/v1/chat/completions \
--provider openai \
--model gpt-4o \
--execution-mode validateFor a first run, use validate.
basilisk scan \
--target https://example.test/v1/chat/completions \
--provider openai \
--model gpt-4o \
--module injection.directThat is already the default. Only opt into them when you mean to:
basilisk scan \
--target https://example.test/v1/chat/completions \
--provider openai \
--model gpt-4o \
--include-research-modulesbasilisk recon \
--target https://example.test/v1/chat/completions \
--provider openaibasilisk posture \
--provider openai \
--model gpt-4oposture is useful when you want a quick safety profile without running the full attack path.
By default Basilisk writes reports to ./basilisk-reports.
Most beginners should use:
htmlfor readingjsonfor automationsariffor CI or security tooling
Example:
basilisk scan \
--target https://example.test/v1/chat/completions \
--provider openai \
--model gpt-4o \
--output htmlList stored sessions:
basilisk sessionsReplay one:
basilisk replay BSLK-2026-ABC123basilisk modules
basilisk probes --stats
basilisk posture --provider openai --model gpt-4o
basilisk sessions
basilisk help examplesDo not do this:
basilisk scan --api-key sk-...Use an environment variable or a file reference:
basilisk scan --api-key @/path/to/key.txt--mode deep does not mean the same thing as --execution-mode exploit_chain.
- scan mode controls runtime style
- execution mode controls operational policy
Start with the default module set. Bring in research-tier modules only when you want broader exploratory behavior and you understand the trust tradeoff.
- Run
basilisk modules. - Run a
posturecheck. - Run a
standardscan invalidateexecution mode. - Open the HTML report.
- Review findings by module, evidence verdict, and downgrade state.
- Re-run with narrower modules or stronger policy if needed.