What Is deepsec?
deepsec is one of the best AI Security Scanners tools for platform teams and security engineers maintaining large-scale repos. Built by Vercel Labs, deepsec reviews code with agent-driven investigation rather than simple pattern matching, and the repo docs warn that a full scan on a big codebase can cost thousands to tens of thousands of dollars in model spend. It is designed for trusted source trees, not arbitrary internet input, and it focuses on finding issues that have survived normal reviews for a long time.
The main value is repo-wide reasoning. deepsec fans work across multiple machines, can run inside your own infrastructure, and keeps commands idempotent so interrupted jobs can resume where they left off. That makes deepsec a practical fit for monorepos, long-lived products, and teams that want AI-assisted security review without shipping code to a third-party SaaS box.
Quick Overview
| Attribute | Details |
|---|---|
| Type | AI Security Scanners |
| Best For | platform teams and security engineers maintaining large-scale repos |
| Language/Stack | TypeScript/Node.js, pnpm, Claude/Codex, Vercel AI Gateway, Vercel Sandbox |
| License | Apache 2.0 |
| GitHub Stars | N/A as of Feb 2026 |
| Pricing | Open-Source |
| Last Release | N/A |
Who Should Use deepsec?
- Security-minded platform teams that need full-repo review across a monorepo, not just file-level linting.
- Engineers responsible for legacy code where high-risk bugs have accumulated across years of changes and need AI-assisted triage.
- Teams running PR gates or release checks that want
process --diffstyle review before merges land. - Organizations already using Claude or Codex and willing to spend model budget to reduce manual security review time.
Not ideal for:
- Tiny repositories where a basic static analyzer or
semgreprule pack is faster and cheaper. - Teams with zero model budget if thousands of dollars of inference per large scan is unacceptable.
- Workflows that require deterministic findings only and do not want agent-driven reasoning or LLM variance.
Key Features of deepsec
- Repo-wide agent investigation — deepsec does not stop at surface syntax matches. It loads project-specific context, inspects representative code, and pushes that context into
INFO.mdso the model can reason about actual auth helpers, middleware, data flow, and framework conventions. - Distributed execution — large scans fan out across worker machines, and the optional sandbox mode can spread work across Vercel Sandbox microVMs. That matters when a single monorepo scan would otherwise bottleneck on one laptop or one CI runner.
- Idempotent command workflow —
scan,process, andrevalidatecan be interrupted and restarted without losing the whole run. This is the kind of operational detail you want in a long-running security job, because partial reruns are normal on large repos. - Diff-based review mode —
process --diffis built for pull requests and CI gating. It limits investigation to changed files, which keeps model spend lower than a full-history pass and makes deepsec easier to insert into review pipelines. - Model and provider flexibility — the tool can use your existing Claude or Codex subscriptions locally, or it can route through Vercel AI Gateway with a single key. Explicit provider env vars still win, so teams can keep their preferred auth path and quota controls.
- Structured data layout — the scanner stores project data under
.deepsec/data/<id>/with files such asINFO.md,SETUP.md, and run metadata schemas likeFileRecordandRunMeta. That makes scans reproducible and easier to inspect after the fact. - Matcher expansion guidance — the docs explicitly tell you to use
docs/writing-matchers.mdto teach the agent where to look in a codebase. That is a useful mechanism for making scans more project-specific instead of flooding the model with irrelevant files.
deepsec vs Alternatives
| Tool | Best For | Key Differentiator | Pricing |
|---|---|---|---|
| deepsec | Repo-wide AI security review on large codebases | Agent-driven investigation with distributed execution and idempotent resumability | Open-Source |
| Semgrep | Fast rule-based static analysis | Deterministic pattern matching and easy custom rules | Free / paid teams |
| CodeQL | Deep semantic analysis in GitHub-native workflows | Query-based security analysis with strong language support | Free for open source / GitHub plans |
| Snyk Code | SaaS vulnerability scanning in developer workflows | Managed product with remediation UX and policy controls | Paid |
Pick Semgrep when you need quick, deterministic checks in CI and you already know the rule you want to enforce. Pick CodeQL when you want GitHub-native analysis and are comfortable expressing security logic as queries.
Pick Snyk Code when your team wants a hosted workflow with policy management and package ecosystem integration. Pick deepsec when the real problem is not signature detection but AI-guided reasoning across a messy, high-value codebase that needs deeper review than a normal scanner can provide.
If you want runtime confirmation after deepsec flags a suspicious path, pair it with OpenTrace for request-flow inspection. For teams building broader access-control and machine-auth guardrails around the same codebase, MachineAuth sits in a neighboring security layer, while browse all DevOps Automation tools is the fallback if you are building a larger review pipeline.
How deepsec Works
deepsec works as a two-stage pipeline: fast candidate discovery first, then agentic investigation second. The first pass uses matchers to locate interesting sites in the codebase, and the second pass feeds curated context to a coding agent that writes findings, recommendations, and revalidation notes into the repo-local .deepsec/ workspace.
The architecture is intentionally operational, not magical. The project mirror, run metadata, and project-specific prompts are persisted on disk so jobs can be resumed, reprocessed, or exported later. In the distributed path, deepsec can ship the work to multiple workers or to Vercel Sandbox microVMs, while keeping the original repository isolated from the model runtime as much as possible.
npx deepsec init
cd .deepsec
pnpm install
pnpm deepsec scan
pnpm deepsec process
pnpm deepsec revalidate
pnpm deepsec export --format md-dir --out ./findings
This flow creates the local project configuration, installs the package, runs the candidate scan, performs AI investigation, optionally rechecks findings, and exports results as Markdown. On a large repo, expect scan to be fast and process to dominate runtime and cost because the model is doing the hard reasoning work.
Pros and Cons of deepsec
Pros:
- Agentic review finds non-obvious bugs that static matchers often miss, especially in auth flows, data handling, and framework-specific glue code.
- Distributed execution scales better than a single-process scanner when you point it at large monorepos or multiple projects.
- Idempotent runs reduce operational pain because failed or interrupted jobs do not force you to restart from zero.
- Flexible model/provider setup lets teams use existing Claude or Codex access or route through Vercel AI Gateway with one credential.
- Diff mode is CI-friendly and keeps the review surface small for pull-request workflows.
- Export and metrics commands make it easier to feed findings into downstream reporting, dashboards, or review queues.
Cons:
- Model spend can be high on large codebases, and the repo docs explicitly warn about scans costing thousands of dollars or more.
- Results are not fully deterministic because agent reasoning depends on model behavior, prompt quality, and context quality.
- Prompt injection risk exists if you scan untrusted dependencies or vendored code, even though sandboxing reduces exposure.
- Setup overhead is real because useful scans depend on curated repo context, matchers, and agent bootstrap instructions.
- It is not a replacement for static analysis if your team needs exact, repeatable rule enforcement with zero inference cost.
Getting Started with deepsec
deepsec starts with a local repo bootstrap, then moves into a .deepsec/ working directory where the scanner keeps its own state. The first run is meant to be guided by your coding agent, which reads SKILL.md, inspects your repository, and populates INFO.md with project-specific context before any serious scan begins.
npx deepsec init
cd .deepsec
pnpm install
# follow the init instructions, then run:
pnpm deepsec scan
pnpm deepsec process
After that, deepsec expects you to keep the context tight and useful. The docs recommend skimming the repo README, any AGENTS.md or CLAUDE.md files, and a few representative code files, then replacing the template sections in INFO.md with short, high-signal notes.
Verdict
deepsec is the strongest option for large-scale agent-driven security review when you need repo-wide reasoning instead of static pattern matching. Its best trait is distributed, resumable investigation across real codebases, and its biggest caveat is model cost. Use it when finding deep, long-lived vulnerabilities is worth the spend, and skip it when you only need cheap deterministic checks.



