Skip to content

ov scan

import { Aside } from ‘@astrojs/starlight/components’;

ov scan finds secrets committed or staged in your codebase. It runs entirely on your machine — no network calls, no telemetry, no account required.


Terminal window
ov scan [path] [flags]

path defaults to the current directory if omitted.


TypeExamples
AWS access keysAKIA[0-9A-Z]{16}
AWS secret keysHigh-entropy 40-char strings adjacent to AWS key
GitHub tokensghp_, github_pat_, gho_, ghs_ prefixes
Stripe keyssk_live_, sk_test_, rk_live_
Private keys-----BEGIN RSA PRIVATE KEY-----, -----BEGIN EC PRIVATE KEY-----
JWT tokensThree-part base64url strings with valid header
Postgres DSNspostgres://user:password@host
MySQL DSNsmysql://user:password@host
MongoDB URIsmongodb+srv://user:password@cluster
High-entropy stringsShannon entropy > 4.5 bits/char, length > 20

The same detection engine powers the MCP context interceptor — patterns that catch committed secrets also catch accidental pastes in Claude Code.


FOUND 3 leaked secret(s) in your repo.
scripts/deploy.sh:31 aws-access-key AKIA************MPLE
config/database.yml:14 postgres-dsn postgres://admin:p*****@prod...
.env.backup:3 stripe-secret-key sk_live_********************
Store them safely:
ov secret set AWS_ACCESS_KEY
ov secret set POSTGRES_DSN
ov secret set STRIPE_SECRET_KEY
→ https://opaquevault.com/docs/getting-started/quickstart

Previews are redacted — OpaqueVault never logs or transmits the full value.


FlagDescription
--fixInteractively store found secrets in OpaqueVault and print git history cleanup instructions

--fix walks you through storing every detected secret in OpaqueVault and then tells you exactly how to remove them from git history.

Terminal window
ov scan . --fix

You must be logged in (ov auth login) before running --fix. If you’re not, it will print a link to register and exit.

The flow:

  1. Scan runs as normal and shows all findings
  2. For each unique secret type found, you’re prompted for a name (defaults to the detector name, e.g. STRIPE_SECRET_KEY) — press enter to accept, type a custom name, or - to skip
  3. You enter your master password once — it’s reused for all secrets in the session
  4. Each secret is encrypted locally and stored in OpaqueVault
  5. After storing, exact git filter-repo commands are printed for each affected file, along with force-push instructions

Example session:

FOUND 2 leaked secret(s) in your repo.
.env.backup:3 stripe-secret-key sk_live_********************
scripts/ci.sh:8 aws-access-key AKIA************MPLE
Found 2 secret type(s). Let's store them in OpaqueVault.
App: my-saas
Master password: ••••••••••••
[stripe-secret-key] Secret name (default: STRIPE_SECRET_KEY, enter to skip):
Value for "STRIPE_SECRET_KEY": ••••••••••••••••••••••••••••
✓ "STRIPE_SECRET_KEY" stored
[aws-access-key] Secret name (default: AWS_ACCESS_KEY, enter to skip): AWS_ACCESS_KEY_ID
Value for "AWS_ACCESS_KEY_ID": ••••••••••••••••••••
✓ "AWS_ACCESS_KEY_ID" stored
✓ 2 secret(s) stored in OpaqueVault.
Next: remove them from your git history.
If you don't have git-filter-repo installed:
pip install git-filter-repo
For each file containing leaked secrets:
git filter-repo --path .env.backup --invert-paths
git filter-repo --path scripts/ci.sh --invert-paths
Then force-push to update the remote:
git push --force-with-lease
Note: notify any collaborators to re-clone after a force-push.
→ https://opaquevault.com/docs/getting-started/scan-fix

High-entropy detection may occasionally flag random-looking strings that aren’t secrets (e.g., hashed IDs, UUIDs, base64-encoded config). These are skipped automatically when running --fix — just enter - when prompted for the name.


How it’s different from GitGuardian / truffleHog

Section titled “How it’s different from GitGuardian / truffleHog”

ov scan is not trying to replace dedicated secret scanning platforms. It’s a local, instant, zero-friction tool designed for one purpose: get developers to discover they have a problem, and immediately give them a path to fix it with OpaqueVault. No SaaS required, no data leaves your machine.