Squiggly to merged PR in 4 clicks
Lightbulb on a red squiggly → Preview auto-fix → review the side-by-side diff → Apply fix → opens PR/MR. The PR lands on GitHub or GitLab without leaving the editor.
Multi-AI BYOA
Patches are generated by your configured AI provider (Anthropic, OpenAI, Gemini, or Ollama). The extension never calls an AI directly - all generation runs server-side against the provider your org configured.
Prerequisites
- VS Code 1.85+ (or a fork that ships the same extension API - see VS Code forks)
- Node 20+ on the host (the extension’s
engines.nodefloor) - A running BreachLens deployment reachable from your workstation over HTTPS
- A licensed deployment - the extension calls
GET /api/system/licenseon connect and refuses to surface findings if the deployment is unlicensed - A BreachLens API token with the right scopes (see Sign in)
Install
The extension ships as a signed.vsix today. A VS Code Marketplace listing is on the roadmap.
Get the VSIX
Download the signed
.vsix from the link in your license email. Air-gapped deployments can ride the file through their normal data-diode pipeline - the signature lets your receiving security tooling verify publisher authenticity without internet access.Install from VSIX
In VS Code, open the Command Palette (
Ctrl+Shift+P / Cmd+Shift+P) and run Extensions: Install from VSIX…, then pick the downloaded file.Or from a terminal:Sign in to BreachLens
Mint an API token in the web UI
In BreachLens, navigate to Settings → API Tokens → Generate token.For first-time pilots, mint a token with these four scopes:
findings:read- populate the tree view, squigglies, hover tooltipsfindings:write- enable Apply fix → opens PR/MRscans:trigger- enable BreachLens: Scan current workspace now and scan-on-savescans:read- read scan status as it completes
blt_… token is shown once on creation. Copy it now; the UI stores only a SHA-256 hash.Run BreachLens: Connect to BreachLens
In VS Code, Command Palette → Connect to BreachLens.Paste your BreachLens API base URL (for example
https://breachlens.acme.internal), then the blt_… token. The token is stored in vscode.SecretStorage - never in settings.json - and the URL is stored as a machine-scoped setting so it never syncs through Settings Sync.VS Code reloads. The status bar shows BreachLens with a connection indicator and finding count.Map workspace folders to BreachLens repos
Auto-detection reads
git remote get-url origin for each workspace folder and matches against Repository.url in BreachLens. Folders whose remote matches are auto-mapped.When auto-detection misses (forks, mirrors, monorepo subdirs, non-canonical clone URLs), Command Palette → Select BreachLens repo for current workspace folder and pick from the quickpick. The override is stored per-workspace.What you get
- Red squigglies on findings. By default every finding renders as an Error (red) regardless of severity - matching GitHub CodeQL’s convention so visual weight drives triage. Switch to graded colours via
breachlens.squigglyMode. - Hover tooltips with title, severity, scanner, finding ID, CVE (when present), description, remediation, and a deep link to the BreachLens drawer for full context.
- Lightbulb code actions (
Ctrl+./Cmd+.) on every BreachLens diagnostic: Preview auto-fix (side-by-side diff) and Apply auto-fix (opens PR/MR). The apply action isisPreferred=trueso it floats to the top of the menu. - Side-by-side diff preview with a three-button toolbar: Apply fix → opens PR/MR, Discard fix preview, Regenerate fix.
- One-click “Generate fix now” when no cached patch exists, and Regenerate fix when the cached patch has drifted out of sync with the source file. Both call the BreachLens API server-side; you stay in VS Code.
- BreachLens activity-bar view with a Findings tree for the connected workspace, plus inline actions to open the finding in your browser or trigger an auto-fix.
- Problems panel integration. Findings show up under the
BreachLenssource inView → Problems(Ctrl+Shift+M) alongside language-server diagnostics. - Status bar. Connection state plus a per-workspace finding count. The bar tints yellow on HIGH and red on CRITICAL using VS Code’s theme tokens, so it looks consistent across themes.
Settings reference
All settings live under thebreachlens.* namespace. Edit them in settings.json or via File → Preferences → Settings.
settings.json. Run BreachLens: Disconnect to wipe it from SecretStorage.
Scan-on-save (off by default)
breachlens.scanOnSave.enabled is false by default and stays that way for a reason: SAST + SCA + SECRET + IAC takes roughly 5-15s of scanner time per save. Running it on every keystroke-flush would compete with your local compile loop. This matches GitHub CodeQL’s and Snyk’s defaults - opt-in, not opt-out.
When you turn it on, the extension:
- Buffers saves into a per-repo set
- Resets a single shared debounce timer (default 2s) on every save
- Flushes the bucket once the timer expires with no new saves
- Skips repos with an inflight scan and re-queues the files for the next flush
changedFiles array. SCA always runs full because dependency graphs are not per-file.
Toggle it from the Command Palette via Toggle scan-on-save. The setting is written to Global scope so it follows you across workspaces.
VS Code forks
The extension uses only the public VS Code extension API, so it sideloads cleanly into Cursor, Windsurf, Antigravity, and Kiro. Use the same.vsix and the same Extensions: Install from VSIX… command. Marketplace listings for each fork’s market are roadmap.
Troubleshooting
Next steps
REST API
Drive BreachLens from CI pipelines and scripts. Token auth, three example calls.
Scan MCP servers
Find prompt-injection, tool-poisoning, and token-theft risk in your AI-agent attack surface.
Authentication
SSO, passkeys, multi-IdP per org. How operators sign in.
Need help?
Email hi@breachlens.app for setup help, signed
.vsix re-issues, or a Slack onboarding channel.