Skip to content
Today I Learned

Scan codebase with deepsec

Published:

Today I came to know about deepsec from AIEngineerGuide.com. It is an open-source vulnerability scanner that Vercel Labs released. It uses AI agents to review code, runs in your own infrastructure, and is built for large, existing codebases, where it hunts for bugs that have been hiding for a long time. Vercel Developers' post introducing deepsec

https://x.com/vercel_dev/status/2051381241283539255

What it is

deepsec is an AI-powered vulnerability scanner for existing codebases. You run it on demand against all the code in a repo, and it looks for the hard-to-find security issues that have been sitting in an app for years.

It runs in your own infrastructure. An AI agent reads your code through your own OpenAI or Anthropic key, or through Vercel AI Gateway. The only thing it adds to your repo is a .deepsec/ folder, where it keeps its state and findings.

Because an AI agent reads every file it reviews, each scan costs real money. So the core idea is to spend that money only where it matters.

How it works

deepsec pipeline: scan is free, process and revalidate use AI, enrich and export are cheap

Three stages matter most:

Each file keeps one record, and nothing is overwritten. If a run stops partway, the same command picks up where it left off.

What it looks for

deepsec coverage: injection, auth and access, server-side requests, secrets and config, infrastructure and CI, and AI-specific issues

Matchers are tuned per framework, so coverage varies. The AI reviewer can also flag issues no matcher covers. It reads source only and never runs the code, so treat each finding as a lead to triage.

How it keeps the cost down

AI is the expensive part. deepsec limits how much code reaches it.

Funnel: every file is scanned for free, then only files with regex hits reach AI, then findings are triaged, then only HIGH+ findings are revalidated

For rough numbers, the docs estimate $130–300 for 500 files with Opus at default settings. Costs can swing 2–3× with file complexity.

Try it

npx deepsec init

Run it from the root of the repo you want to scan. The docs are at deepsec.sh.

HTTP proxy vs SOCKS proxy