Skip to main content

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

Google (Gemini)

Google’s Gemini models offer large context windows and multimodal capabilities for security analysis.

Model picker filtered to Google Gemini models

Available Models

Cyberstrike pulls its model catalog live from models.dev, so the exact list tracks what Google currently offers. Common picks:

ModelContextBest for
google/gemini-2.5-pro1MComplex reasoning, large codebases
google/gemini-2.5-flash1MFast analysis (balanced default)
google/gemini-2.5-flash-lite1MQuick tasks, high volume

Tip

Newer Gemini 3.x releases (gemini-3-pro-preview, gemini-3.5-flash, gemini-3.1-pro-preview) appear automatically as models.dev updates. Run /models in the TUI — or cyberstrike models — for the full current list.

Authentication

API Key Setup

  1. Get your API key from ai.google.dev
  2. Run authentication:
Terminal window
cyberstrike auth login
# Select: Google
# Enter your API key

Environment Variable

Terminal window
export GOOGLE_GENERATIVE_AI_API_KEY="AI..."

Configuration File

~/.config/cyberstrike/cyberstrike.json
{
"provider": {
"google": {
"options": {
"apiKey": "{env:GOOGLE_GENERATIVE_AI_API_KEY}"
}
}
}
}

Model Configuration

Set Default Model

~/.config/cyberstrike/cyberstrike.json
{
"model": "google/gemini-2.5-flash"
}

Command Line Override

Terminal window
cyberstrike --model google/gemini-2.5-pro

Large Context Advantage

Gemini’s 1M-2M context window enables:

  • Analyzing entire codebases at once
  • Processing multiple files simultaneously
  • Long security assessment sessions
  • Comprehensive log analysis

Example: Full Codebase Review

> Analyze the entire src/ directory for security vulnerabilities

The model can process hundreds of files in a single request.

Multimodal Capabilities

Gemini supports image analysis:

> Analyze this screenshot for security issues

Useful for:

  • Analyzing security tool output images
  • Processing network diagrams
  • Reviewing UI for security flaws

Thinking Mode

The Gemini 2.5 models support reasoning (“thinking”) for complex analysis:

Terminal window
cyberstrike --model google/gemini-2.5-pro

Best for:

  • Complex vulnerability chains
  • Multi-step attack planning
  • Deep code analysis

Google Vertex AI

For enterprise deployments:

Setup

Terminal window
# Authenticate with Google Cloud
gcloud auth application-default login
# Set project
gcloud config set project your-project-id

Configuration

~/.config/cyberstrike/cyberstrike.json
{
"provider": {
"google-vertex": {
"options": {
"project": "your-project-id",
"location": "us-central1"
}
}
}
}

Available Regions

RegionLocation
us-central1Iowa
us-east4Virginia
europe-west4Netherlands
asia-northeast1Tokyo

Rate Limits

Google AI Studio limits:

TierRPMTPM
Free151,000,000
Pay-as-you-go3604,000,000

Handling Limits

{
"provider": {
"google": {
"options": {
"maxRetries": 3,
"retryDelay": 1000
}
}
}
}

Safety Settings

Configure content filtering:

{
"provider": {
"google": {
"options": {
"safetySettings": [
{
"category": "HARM_CATEGORY_DANGEROUS_CONTENT",
"threshold": "BLOCK_NONE"
}
]
}
}
}
}

Caution

Adjust safety settings carefully. Some security testing content may trigger filters.

Best Practices

Model Selection

TaskRecommended Model
Quick scansgemini-2.5-flash
Large codebasegemini-2.5-pro
Complex analysisgemini-2.5-pro
High volumegemini-2.5-flash-lite

Leveraging Large Context

  1. Include full files instead of snippets
  2. Provide complete configuration files
  3. Include related test files
  4. Add documentation for context

Cost Optimization

  1. Use Flash models for most tasks
  2. Leverage the free tier
  3. Use context efficiently
  4. Monitor usage in Google Cloud Console

Troubleshooting

Invalid API Key

Error: API key not valid

Verify:

  • Key is from ai.google.dev
  • API is enabled
  • No extra whitespace

Quota Exceeded

Error: Quota exceeded

Solutions:

  • Wait for quota reset
  • Enable billing
  • Request quota increase

Region Not Available

Error: Model not available in region

Try different regions or use Google AI Studio instead of Vertex.