Cursor Extension
The GitGuardian Cursor extension enhances code security by detecting and preventing the inclusion of sensitive information, such as API keys and credentials, directly within your development environment. This tool integrates seamlessly into Cursor, providing real-time feedback to developers and promoting secure coding practices.
The extension leverages the bundled GitGuardian CLI (ggshield) to scan your code for over 500 types of secrets as you write or modify it, ensuring immediate awareness and action when potential security issues are detected.

The GitGuardian extension detecting AWS keys in Cursor, showing detailed information about the secret when hovering.
Key Features
Real-Time Secret Detection
Automatically scans your code as you type, highlighting secrets instantly with clear visual indicators.
Guided Remediation
Provides actionable recommendations to fix detected secrets directly within Cursor.
Developer-Friendly Integration
Simple one-click installation with built-in CLI and automatic scanning on save.
False Positive Management
Easily mark false positives through .gitguardian.yaml configuration.
Installation
From the extension marketplace
- Open Cursor
- Go to the Extensions view (
Ctrl+Shift+XorCmd+Shift+X) - Search for "GitGuardian"
- Click "Install" on the "GitGuardian Secret Security" extension
- Restart Cursor if prompted
Configuration
Authentication
After installation, you'll need to authenticate with GitGuardian:
- Open the Command Palette (
Ctrl+Shift+PorCmd+Shift+P) - Type "GitGuardian: Authenticate" and select it
- Follow the authentication flow to connect your GitGuardian account
Settings
The extension can be configured through Cursor settings:
- Go to Cursor → Settings → Extensions (or
Ctrl+,/Cmd+,) - Search for "GitGuardian"
- Configure the available options:
For SaaS Users
- API URL: Uses GitGuardian's default API endpoint
- Authentication: Use the built-in authentication flow
For Self-Hosted Users
- API URL: Enter your custom GitGuardian instance URL
- API Key: Enter your Personal Access Token from your self-hosted instance
To configure for self-hosted instances:
{
"gitguardian.apiUrl": "https://your-gitguardian-instance.com",
"gitguardian.apiKey": "your-personal-access-token"
}
Usage and Results
The extension automatically scans files on save and displays results in three ways:
- Highlights secrets directly in your code
- Shows warning icons in the status bar
- Lists issues in the Problems panel (
Ctrl+Shift+MorCmd+Shift+M)
To ignore false positives, add paths to .gitguardian.yaml:
paths-ignore:
- "tests/samples/*"
- "docs/examples.md"
version: 2
Troubleshooting
Common solutions:
- Verify authentication and internet connection
- For self-hosted instances, check API key and URL
- Restart Cursor if issues persist
- Exclude large directories in
.gitguardian.yamlfor better performance
Need help? Check our documentation, GitHub repository, or contact support.