Skip to main content

Cyberstrike is now open source! AI-powered penetration testing for security professionals. Star on GitHub

Authentication

Cyberstrike requires authentication with at least one AI provider to function. This guide covers setting up credentials for supported providers.

Connect a Provider

The simplest way to authenticate — run in the TUI:

/connect

Select your provider from the interactive menu:

? Select provider
❯ cyberstrike (recommended)
anthropic (Claude Max or API key)
github-copilot
openai (ChatGPT Plus/Pro or API key)
google
openrouter
…

The list is built dynamically from the models catalog and ordered by priority, so the exact entries may vary. It’s an autocomplete prompt, not a fixed menu.

Provider-Specific Setup

Anthropic

  1. Get your API key from console.anthropic.com
  2. Run /connect, select Anthropic, enter your API key

OpenAI

  1. Get your API key from platform.openai.com
  2. Run /connect, select OpenAI, enter your API key

GitHub Copilot

  1. Have an active GitHub Copilot subscription
  2. Run /connect, select Login with GitHub Copilot
  3. Authorize via the browser OAuth flow — no API key needed

See GitHub Copilot for details.

OpenRouter

OpenRouter provides access to multiple models with a free tier:

  1. Get your API key from openrouter.ai/keys
  2. Run /connect, select OpenRouter, enter your API key

Google Gemini

  1. Get your API key from ai.google.dev
  2. Run /connect, select Google, enter your API key

Ollama (Local)

Ollama requires no API key but needs to be running locally:

Terminal window
# Start Ollama
ollama serve
# Pull a model
ollama pull llama3.3

Then use /models to select an Ollama model.

Environment Variables

Set credentials via environment variables for CI/CD or automation:

Terminal window
# Anthropic
export ANTHROPIC_API_KEY="sk-ant-..."
# OpenAI
export OPENAI_API_KEY="sk-..."
# Google
export GOOGLE_GENERATIVE_AI_API_KEY="AI..."
# OpenRouter
export OPENROUTER_API_KEY="sk-or-..."
# Groq
export GROQ_API_KEY="gsk_..."

Add to your shell profile for persistence:

Terminal window
# ~/.bashrc or ~/.zshrc
export ANTHROPIC_API_KEY="sk-ant-..."

Configuration File

Store credentials in the config file:

~/.config/cyberstrike/cyberstrike.json
{
"provider": {
"anthropic": {
"options": {
"apiKey": "{env:ANTHROPIC_API_KEY}"
}
}
}
}

Tip

Use {env:VAR_NAME} syntax to reference environment variables in config files.

Managing Credentials

View Status

Use /status in the TUI to see connected providers and active credentials.

Switch Model

Use /models to switch between models from any connected provider. Or set a default in config:

{
"model": "anthropic/claude-sonnet-4-20250514"
}

Enterprise Authentication

AWS Bedrock

Terminal window
# Configure AWS credentials
aws configure
# Or via environment
export AWS_ACCESS_KEY_ID="..."
export AWS_SECRET_ACCESS_KEY="..."
export AWS_REGION="us-east-1"

Then run /connect and select Amazon Bedrock.

Azure OpenAI

Terminal window
export AZURE_API_KEY="..."
export AZURE_RESOURCE_NAME="your-resource"

Google Vertex AI

Terminal window
gcloud auth application-default login

Security Best Practices

  1. Never commit API keys to version control
  2. Use environment variables for sensitive values
  3. Rotate keys regularly for security
  4. Use scoped keys when available
  5. Monitor usage on provider dashboards

Troubleshooting

Invalid API Key

Error: Invalid API key
  1. Verify key is correct (no extra spaces)
  2. Check key has not expired
  3. Ensure billing is active on provider

Rate Limits

Error: Rate limit exceeded
  1. Wait and retry
  2. Check provider dashboard for limits
  3. Consider upgrading your plan

Network Issues

Error: Connection refused
  1. Check internet connection
  2. Verify no proxy/firewall blocking
  3. Try different network