This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
BurpGPT is a Burp Suite extension that leverages various AI models (OpenAI, Google Gemini, ModelScope, or local models) to detect security vulnerabilities that traditional scanners might miss. It sends web traffic to a user-specified AI model for analysis within the passive scanner.
The extension generates automated security reports that summarize potential security issues based on customizable prompts and real-time data from Burp-issued requests. This enables security professionals to identify potential security issues and prioritize their analysis while covering a larger potential attack surface.
The extension follows a modular architecture with these key components:
-
Main Extension Class (
MyBurpExtension): Implements the BurpExtension interface and serves as the entry point. It registers the scan check and menu items, manages configuration persistence, and handles extension initialization. -
Scan Check (
MyScanCheck): Implements the passive audit functionality that sends HTTP requests/responses to the GPT client for analysis. It processes the AI responses and creates audit issues in Burp Suite. -
GPT Client (
GPTClient): Handles communication with various AI APIs (OpenAI, Gemini, ModelScope, Local), including request formatting, API calls, response parsing, and connection validation. It supports multiple API providers with different request/response formats. -
GUI Components: Swing-based UI for configuration including settings, placeholders reference, and about views. The settings view allows users to configure API keys, models, providers, and prompts.
-
Data Models: GPTRequest and GPTResponse classes for handling API communication data structures. The GPTResponse class includes functionality to extract structured vulnerability information from AI responses.
./gradlew shadowJarThis creates a standalone JAR file in lib/build/libs/ that can be loaded into Burp Suite.
./gradlew test./gradlew cleanburpgpt/
├── lib/ # Main extension code
│ ├── build.gradle # Build configuration
│ └── src/
│ └── main/
│ └── java/
│ ├── burp/ # Main Burp extension classes
│ └── burpgpt/ # Extension-specific packages
│ ├── gpt/ # GPT request/response models
│ ├── http/ # HTTP client for AI APIs
│ └── gui/ # GUI components and views
│ └── views/ # Individual view components
├── gradle/ # Gradle wrapper files
├── gradlew # Gradle wrapper script (Unix)
├── gradlew.bat # Gradle wrapper script (Windows)
└── settings.gradle # Gradle settings
- Java 21+
- Burp Suite Montoya API
- OkHttp for HTTP client
- Gson for JSON parsing
- Apache Commons Text for string utilities
- Apache Commons Lang for utility functions
- Lombok for reducing boilerplate code
- Build the JAR file using
./gradlew shadowJar - In Burp Suite, go to Extensions tab
- Click "Add" button
- Select the generated JAR file from
lib/build/libs/
The extension supports multiple AI providers:
- OpenAI (GPT models)
- Google Gemini
- ModelScope (Qwen models)
- Local models (custom endpoints)
Each provider has specific API requirements and formats that are handled in the GPTClient class.
- Passive scan check integration with Burp Suite
- Support for multiple AI providers and models
- Customizable prompts with placeholder system
- Configurable maximum prompt size and token limits
- Connection validation functionality
- Persistent configuration storage
- Structured vulnerability extraction from AI responses
- Severity-based issue classification