A security harness that treats a codebase like an investigation

Vercel has open-sourced deepsec, a security harness that delegates vulnerability research to coding agents. It runs on infrastructure you control, which means you can scan privileged source code without shipping it to a third-party cloud service. For inference, deepsec works with an existing Claude or Codex subscription—no extra setup required.

Scans of large repositories can run for days on one machine. When you need parallelism, deepsec supports fanout to Vercel Sandboxes for remote execution; scans of Vercel’s codebases have routinely scaled past 1,000 concurrent sandboxes.

How a scan is structured

The tool uses claude and codex to investigate a codebase with Opus 4.7 at max effort and GPT 5.5 at xhigh reasoning. Each run passes through the following phases:

  • Scan: A regex-only pass over every file flags security-sensitive areas that subsequent steps focus on.
  • Investigate: Agents dig into each file identified by the scan, tracing data flows and checking for mitigations.
  • Revalidate: A second agent run checks the investigation findings, removing false positives and reclassifying severity.
  • Enrich: Using git metadata and optional external services, an agent identifies the contributors responsible for fixing each issue.
  • Export: The export command turns findings into ticket-ready instructions for humans and coding agents.

Results on production code

deepsec has been exercised on Vercel’s own monorepos and on the codebases of customers and partners. Scanning open source repositories of several Vercel customers surfaced what those teams considered unusually actionable findings.

“We’ve been on a lookout for a tool to do security scans on our open source repositories. deepsec’s scan have been the most thorough, with most findings, and good true-positive rate.”

James Perkins Co-founder and CEO @ Unkey

One notable test case was the open source version of dub.co, a marketing attribution platform for affiliate programs and short links. Because it combines authenticated access, database interactions, and several backend services, its security surface is large.

“We get a lot of automated security reports, but most of them aren't actionable. deepsec is the first tool that's surfaced the kind of issues we'd actually want a security engineer to flag, and it runs on infrastructure we control. ”

Steven Tey Founder and CEO @ dub.co

Against Vercel’s own monorepos, deepsec caught edge cases in auth conditions that were subtle enough to motivate a custom scanner plugin covering every authentication path in their code.

False positives and ideal use cases

Like any automated scanner, deepsec produces false positives—roughly 10–20% of findings, per Vercel’s experience. The revalidate step exists specifically to have the agent re-check its own findings and reduce that number. Given the severity of the true positives found in practice, the tradeoff is considered acceptable.

The tool is designed for applications and services. Libraries and frameworks may work but would likely need custom prompts and scanners.

Adapting deepsec to your codebase

A plugin system is included with deepsec. The most commonly used plugins are custom scanners: regex matchers tuned to a specific auth model, data layer, or team conventions. Vercel recommends starting with an initial scan, then asking your coding agent to write matchers based on those first results:

Inspect previous runs against ./my-app.

Are there custom deepsec matchers we should

add to find more candidates for vulnerabilities?

Model requirements

Anthropic and OpenAI both offer “cyber” versions of their most capable models, fine-tuned to accept security tasks that base models might refuse. deepsec works with those models but doesn’t require them.

After each research step, deepsec runs a classifier to check whether the task was refused. For the prompt currently used by deepsec, refusals have not been an issue with either Opus 4.7 or GPT 5.5.

Getting started

Run npx deepsec init at the root of your repository. This creates a ./.deepsec directory that holds the system configuration and a catalog of your investigations. The command output walks you through the next steps; the full documentation has more detail. Since the project is early in its development, feedback and contributions are welcome on GitHub.