Warns you about hard-coded API keys and other secrets in your source code before you commit them, so you can move them to environment variables. Results in its own sidebar tab.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Keep secrets out of your source code.
Warns you about hard-coded API keys and other secrets in your code and lists them in their own sidebar tab, live while you type, so you can move them to environment variables before you commit.
✨ Features
Own sidebar tab with a badge showing how many possible secrets are in your code
Live scanning while you type, plus when files are created, changed or deleted
Red squiggles in the editor and entries in the Problems panel
"In git" warning: files tracked by git are marked and listed first. If the secret was committed, rotate it.
Never shows your secrets: previews only show the first 4 characters and the length
Quick fixes: ignore a single line with a comment or disable a rule for the workspace
Group by file or by type with one click
Low noise: ignores values read from the environment (process.env.X, env::var("X"), ${VAR}), placeholders like your-api-key, file paths and variable names
Respects .env:.env files are skipped (that's where secrets belong), .env.example is still checked
Compatible ignore comments:vee9-secret-ignore, gitleaks:allow and pragma: allowlist secret
🔑 What it detects
Critical
Warning
API keys of common developer, cloud, AI and payment services
JSON Web Tokens (JWT)
Private key files pasted into code
Hard-coded values assigned to apiKey, secret and similar names
Database connection strings with an inline password
Use Choose Active Rules… in the sidebar to see the full list and turn single rules off.
🚀 Usage
Open a project and click the 🔎 Secret Scanner icon in the Activity Bar. Click a finding to jump to it.
To ignore a false positive, use the quick fix (⌘. / Ctrl+.) or add a comment on that line:
let demo = "not-a-real-secret-123"; // vee9-secret-ignore
⚙️ Settings
Setting
Default
Description
vee9Secrets.exclude
node_modules, target, dist, …
Files to skip
vee9Secrets.scanEnvFiles
false
Also scan .env files
vee9Secrets.disabledRules
[]
Rules to skip, e.g. jwt
vee9Secrets.showInProblems
true
Squiggles and Problems panel
vee9Secrets.maxFiles
10000
Safety limit for huge workspaces
⚠️ Good to know
The scanner checks the current files, not your git history. If a secret was committed in the past and removed later, it's still in the history; use a tool like gitleaks for that and rotate the secret.
🎨 Looks best with
Vee9 Env Guard, which hides the values in your .env files while you're screen sharing.