A large scan can cost tens of thousands, and deepsec stores the name of your key
GitHub describes it as Deepsec is a security harness for finding vulnerabilities in your codebase powered by coding agents. The repository metadata lists TypeScript as its primary language. The metadata lists the Apache-2.0 license. This article stays within the project description and details documented in the GitHub repository README.
At a glance
- What is it?
- deepsec is an agent-powered vulnerability scanner from Vercel Labs that reviews a whole repository with coding agents rather than pattern matches alone. It writes one folder, .deepsec/, into your tree, resumes when interrupted, and ships configured to use the best models at maximum thinking levels, which the README says means scans can cost thousands or even tens of thousands of dollars on a large codebase.
- Who is it for?
- Take deepsec when you have a large repository, budget for model spend, and want an agent review rather than another regex pass, and run it on the sandbox path if the tree contains vendored code. Leave it if your spend is fixed and small, because the defaults are described as the best models at maximum thinking levels and a large codebase can run into tens of thousands of dollars.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 9 days ago.
- What is it written in?
- Mainly TypeScript, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.
Star history
- vercel-labs/deepsec8,419 ★ · +1,354
| Repository | 2026-08-13 | 2026-11-15 |
|---|---|---|
| vercel-labs/deepsec | 7.1k | 8.4k |
1,354 Stars in the last 94 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
npx deepsec init, and the only thing it writes is .deepsec/
The whole setup is one command, run from the root of the repository you want scanned:
npx deepsec initThe README says it guides you through everything. It asks you to pick an AI model, with benchmark scores and prices to compare, and how to pay for model usage, either your own OpenAI or Anthropic API key or the Vercel AI Gateway. After that it works unattended: it studies your codebase, scans it, and runs the AI review.
The footprint is the part worth noting. The only thing it adds to your repository is a .deepsec/ folder where all of its state and its findings live. Everything else stays outside your tree.
That single folder is also how the documentation stays honest. After initialization, agents can read the documentation that matches the installed CLI, at .deepsec/node_modules/deepsec/SKILL.md and .deepsec/node_modules/deepsec/dist/docs/, and setup errors expose those as absolute machine-readable paths. So an agent working inside a scan is reading the manual for the version actually present, not for whatever the website currently says.
When the run finishes you get a readable report from inside that folder:
pnpm deepsec export --format md-dir --out ./findingsThe cost ceiling is two flags, and the defaults are uncapped
The pricing paragraph is the first thing to read on this page, and it is blunt. deepsec is configured to use the best models at maximum thinking levels, tunable with --thinking-level, and that means scans can cost thousands or even tens of thousands of dollars for large codebases. The README adds that customers found the cost worth it for how quickly they were able to patch vulnerabilities that would otherwise have gone unfixed.
There is a ceiling, and it is two options:
npx deepsec init --max-cost-usd 100 --max-duration 2hOne caps the spend and one caps the wall clock.
The other interruption case is named explicitly: Ctrl-C, a lost connection, or hitting a spending limit. In all three the instruction is the same, run npx deepsec init again and it continues where it left off. If a process or revalidate run halts because the upstream credential ran out of quota or credits, the run stops gracefully, tells you where to top up, and resuming the same command picks up from the same point.
So the failure mode is a stopped run rather than a lost one, which is unusual for a tool this expensive and is the reason to read the resume behaviour before you need it.
scan is free regex; process is where the money goes
The workflow is a set of subcommands, and the division between them decides what you pay for.
The later scans are run from inside the .deepsec folder:
pnpm deepsec scan # fast pattern scan, free
pnpm deepsec process # AI review of new candidates
pnpm deepsec revalidate # optional, cuts false-positive rateSo scan is the free layer. The workflow reference describes it as finding candidate sites with regex matchers, fast and with no AI, and the README adds a separate documentation page on generated and hand-authored matchers, which tells you the candidate set is something you can write yourself.
process is where the models get used: AI investigation that emits findings and a recommendation. Around it sit triage for lightweight P0/P1/P2 classification on a cheaper model, enrich to add git committer information and, with a plugin, ownership data, revalidate to re-check existing findings and check git history for fixes, and metrics for cross-project counts by severity.
There is also process --diff, described as PR mode: scan plus investigate, restricted to the files a diff touched. That is the one to put in CI, and the documentation index has a page on reviewing changes that covers the diff mode and CI gating.
If your concern is a pull request rather than a legacy codebase, that subcommand is the one to start with.
The manifest stores the name of your key variable, not the key
There are two payment routes and the choice is made during init.
By default deepsec routes model calls through Vercel AI Gateway, which the README says gives access to every major model without provider-specific keys. Alternatively you bring your own, OpenAI or Anthropic or a custom HTTPS provider, by passing --model-auth direct along with --ai-provider and --ai-api-key-env to init. In that mode no Vercel account is needed.
The credential handling is stated as a property rather than a promise about the future: deepsec only ever stores the name of the environment variable holding your key, never the key itself.
The .env.example file shows what the two backends look like. There is a default Claude Agent SDK backend and an optional OpenAI Codex one, and both are configured against the gateway:
ANTHROPIC_BASE_URL=https://ai-gateway.vercel.shOPENAI_BASE_URL=https://ai-gateway.vercel.sh/v1The example also notes a convenience: the gateway accepts the Anthropic token at the chat completions path too, so you can leave the OPENAI variables unset and Codex falls back to the Anthropic token.
The security model says to treat it like an agent with full shell access
There is a section titled the security model of deepsec itself, and its first sentence is a warning rather than a reassurance. Treat deepsec like a coding agent with full shell access on the environment it is running on.
The reasoning that follows is about prompt injection. It is designed to run on trusted inputs, which is your own source code, but you may still be concerned about prompt injection coming through external dependencies or vendored code. That is an accurate description of the threat: a scanner that reads every file in a repository is reading whatever your dependencies contain.
The mitigation offered is the sandbox path. Large monorepos can fan work across Vercel Sandbox microVMs:
pnpm deepsec sandbox process --project-id my-app --sandboxes 10 --concurrency 4Two things narrow the exposure there, and both are stated as consequences rather than as configuration. The API keys for the coding agents are injected outside the sandbox and therefore cannot be exfiltrated. And network egress from a worker sandbox is limited to coding agent hosts, with egress allowed during bootstrap, which does not run the coding agent.
So the honest reading is: the tool has the blast radius of a coding agent, and the sandbox reduces it rather than removing it.
Sandbox mode tars the tree without .git and injects keys at the egress host
Three details about how work reaches the sandbox are worth knowing before a large monorepo runs.
First, there is no extra onboarding. The README says setup already verified the Vercel connection, so the sandbox command needs nothing new. That is worth stating because distributed execution usually implies a provisioning step, and here it is a consequence of the init flow you already ran.
Second, the working tree is tarballed and uploaded, and .git is excluded. So the sandbox receives source files and not the history. The sandboxed agents work from a snapshot of the tree rather than a clone.
Third, model credentials remain host side and are injected only at the selected egress host. Combined with the egress restriction, an agent that tries to phone home has one permitted destination class and no key to send.
The scale is set by two numbers on the command, sandboxes and concurrency. Ten sandboxes at concurrency four is the worked example, which is a useful default to reason about: it is a statement about how many independent investigations you want in flight.
A 0.1.0 monorepo that dogfoods .deepsec/ and pins four transitive packages
The repository layout explains a few things about how the project is developed.
The root package.json is named deepsec-monorepo, versioned 0.1.0, private, and declares a floor of node 22 with pnpm 8.15.9 as its package manager. It is a pnpm workspace with packages/ holding the actual code, and the CLI is run from source through tsx in development.
Two entries at the top level are notable. .deepsec/ is committed, so the project scans itself. And alongside it there are .agents/, CLAUDE.md, SKILL.md and prompt-samples/, which is a repository that has been built with coding agents rather than one that merely mentions them.
The dependency block has something a security tool should have. Four pnpm overrides force transitive versions forward:
"overrides": {
"undici@>=7.0.0 <7.28.0": "^7.28.0",alongside postcss, brace-expansion and esbuild ranges. Pinning transitive dependencies by override rather than by lockfile alone is what keeps a scanner from installing a known-bad version through a dependency it does not control.
There is a validate script that runs the whole chain, build, lint, knip, bundle, a typecheck inside .deepsec and the test suite. And there are no GitHub releases, and the root manifest is versioned 0.1.0, with a last push on 2026-09-29.
Editorial conclusion
Take deepsec when you have a large repository, budget for model spend, and want an agent review rather than another regex pass, and run it on the sandbox path if the tree contains vendored code. Leave it if your spend is fixed and small, because the defaults are described as the best models at maximum thinking levels and a large codebase can run into tens of thousands of dollars. Verify four things. Set --max-cost-usd and --max-duration on the first run rather than trusting the defaults. Decide the payment route before you start, either the Vercel AI Gateway by default or your own key with --model-auth direct, and confirm from the manifest that only the variable name is recorded. Read the security model section, which tells you to treat the tool like a coding agent with full shell access on the machine it runs on. And check the resume behaviour before you need it, since re-running the same command after an interruption skips the files already analysed and only investigates the rest.
Frequently asked questions
What does deepsec do?
It is an agent-powered vulnerability scanner you run in your own infrastructure, built for on-demand review of all the code in existing large-scale repositories. It is designed to surface hard-to-find issues that have been lurking in an application for a long time, and unlike a pattern-only scanner it uses coding agents to investigate the candidates a regex scan finds.
How much does a deepsec scan cost?
The README says scans can cost thousands or even tens of thousands of dollars for large codebases, because deepsec is configured to use the best models at maximum thinking levels, tunable with --thinking-level. You can cap a run with --max-cost-usd and --max-duration and the authors state their customers found the cost worth it.
What does deepsec write into my repository?
One folder. The only thing it adds is a .deepsec/ directory where all of its state and findings live. After initialization, agents can read the documentation matching the installed CLI at .deepsec/node_modules/deepsec/SKILL.md and .deepsec/node_modules/deepsec/dist/docs/, and setup errors expose those as absolute machine-readable paths.
How do I bring my own API key to deepsec?
Pass --model-auth direct to init together with --ai-provider and --ai-api-key-env. That covers OpenAI, Anthropic or a custom HTTPS provider, and no Vercel account is needed in that mode. By default the calls go through Vercel AI Gateway, and deepsec stores only the name of the environment variable holding your key, never the key itself.
What is the difference between deepsec scan and process?
scan finds candidate sites with regex matchers and runs no AI, and the README calls it fast and free. process is the AI investigation step that emits findings and a recommendation. Between them sit triage for lighter P0/P1/P2 classification on a cheaper model, revalidate to re-check existing findings and check git history for fixes, and export for per-finding JSON or a directory of markdown files.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/vercel-labs-deepsec)Star history chart for your README
[](https://hysenlabs.com/projects/vercel-labs-deepsec)Was this useful?