{"id":49723464,"url":"https://github.com/vercel-labs/deepsec","last_synced_at":"2026-07-31T11:05:51.742Z","repository":{"id":355700087,"uuid":"1225774688","full_name":"vercel-labs/deepsec","owner":"vercel-labs","description":"Deepsec is a security harness for finding vulnerabilities in your codebase powered by coding agents","archived":false,"fork":false,"pushed_at":"2026-07-21T19:10:37.000Z","size":1616,"stargazers_count":6103,"open_issues_count":48,"forks_count":354,"subscribers_count":14,"default_branch":"main","last_synced_at":"2026-07-21T19:24:25.774Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://vercel.com/blog/introducing-deepsec-find-and-fix-vulnerabilities-in-your-code-base","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vercel-labs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":"docs/supported-tech.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-30T16:16:11.000Z","updated_at":"2026-07-21T19:23:34.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/vercel-labs/deepsec","commit_stats":null,"previous_names":["vercel-labs/deepsec"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vercel-labs/deepsec","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vercel-labs%2Fdeepsec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vercel-labs%2Fdeepsec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vercel-labs%2Fdeepsec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vercel-labs%2Fdeepsec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vercel-labs","download_url":"https://codeload.github.com/vercel-labs/deepsec/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vercel-labs%2Fdeepsec/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":36115907,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-31T02:00:06.731Z","response_time":112,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-09T03:00:58.175Z","updated_at":"2026-07-31T11:05:51.733Z","avatar_url":"https://github.com/vercel-labs.png","language":"TypeScript","funding_links":[],"categories":["Defense \u0026 Security Controls","Security and Supply Chain","Security, Sandbox \u0026 Permissions","Safety \u0026 Governance","Pentest \u0026 Red Teaming Agents (131)","TypeScript","Security \u0026 Compliance"],"sub_categories":["AI-Assisted Defensive Security","Streaming Operations","Adjacent Collections","Sandboxing \u0026 Execution","Security Analysis"],"readme":"# deepsec\n\n[`deepsec`](https://deepsec.sh) is an agent-powered vulnerability scanner that you can run in your own infrastructure, optimized to perform on-demand review of all code in existing \nlarge-scale repos.\n\n`deepsec` is designed to surface hard-to-find issues that have been lurking in applications for a long time. It is configured to use the best models at maximum thinking levels (tunable via `--thinking-level`, see [docs/models.md](./docs/models.md)), meaning scans can cost thousands or even tens-of-thousands of dollars for large codebases. Our customers have found the cost worth it for how quickly they were able to patch vulnerabilities that would have otherwise gone unfixed.\n\nFor large codebases, work fans out across worker machines in parallel.\nIf a run is interrupted or errors out partway through, just re-run the same\ncommand — deepsec picks up where it left off, skipping files it already\nanalyzed and only investigating the rest.\n\n## Get started\n\nNavigate to the root of the repository that you want to scan, then:\n\n```bash\nnpx deepsec init       # creates .deepsec/ with this repo as the first project\ncd .deepsec\npnpm install           # installs deepsec from npm\n\n# Proceed as instructed by `init` output\n```\n\nNow have your coding agent bootstrap your installation. Open the agent of choice\nand prompt:\n\n\u003e Read `.deepsec/node_modules/deepsec/SKILL.md` to understand the\n\u003e tool. Then read `.deepsec/data/\u003cid\u003e/SETUP.md` and follow it:\n\u003e skim this repo's README, any AGENTS.md/CLAUDE.md, and a handful\n\u003e of representative code files, then replace each section of\n\u003e `.deepsec/data/\u003cid\u003e/INFO.md`.\n\u003e\n\u003e Keep it SHORT — target 50–100 lines total. Pick 3–5 examples per\n\u003e section, not exhaustive enumeration. Name primitives (auth helpers,\n\u003e middleware) but no line numbers. Skip generic CWE categories —\n\u003e built-in matchers cover those. Cover only what's project-specific.\n\u003e INFO.md is injected into every scan batch; verbose context dilutes\n\u003e signal.\n\nThen scan from inside `.deepsec/`:\n\n```bash\npnpm deepsec scan\npnpm deepsec process    \npnpm deepsec revalidate # optional, cuts FP rate\npnpm deepsec export --format md-dir --out ./findings\n```\n\nIf you feel like the `deepsec` should look at more parts of the code, give it [the writing matchers](docs/writing-matchers.md) doc to find more valuable starting points in your code base.\n\n## Docs\n\n- [docs/getting-started.md](docs/getting-started.md) — first-scan walkthrough\n- [docs/reviewing-changes.md](docs/reviewing-changes.md) — `process --diff` for PR review and CI gating\n- [docs/supported-tech.md](docs/supported-tech.md) — frameworks and ecosystems deepsec recognizes out of the box\n- [docs/writing-matchers.md](docs/writing-matchers.md) — **prompt your coding agent to grow your matcher set**\n- [docs/configuration.md](docs/configuration.md) — `deepsec.config.ts` reference\n- [docs/plugins.md](docs/plugins.md) — plugin authoring\n- [docs/models.md](docs/models.md) — model selection, defaults, refusals, future models\n- [docs/vercel-setup.md](docs/vercel-setup.md) — AI Gateway + Vercel Sandbox keys / tokens\n- [docs/architecture.md](docs/architecture.md) — pipeline internals\n- [docs/data-layout.md](docs/data-layout.md) — `data/` schemas (FileRecord, RunMeta, …)\n- [docs/faq.md](docs/faq.md) — cost, model choice, sandbox mode, FP rate\n- [samples/](samples/) — copy-paste starting points (currently: `webapp/`)\n- [CONTRIBUTING.md](CONTRIBUTING.md) — repo layout, dev workflow\n\n## AI provider\n\nWhen running locally, `deepsec` falls back to your existing `claude` /\n`codex` subscription if you've logged in on this machine. Subscriptions\n(Claude Pro/Max, ChatGPT Plus) are useful for evaluating deepsec but\ngenerally don't have enough headroom for full repo scans.\n\nFor real scans, use Vercel AI Gateway. One key covers both Claude and\nCodex, and the gateway's default quotas are sized for highly concurrent\nresearch.\n\n```\nAI_GATEWAY_API_KEY=vck_...\n```\n\nSee [docs/vercel-setup.md](docs/vercel-setup.md) for getting a key and\nfor the Vercel Sandbox setup. To bypass the gateway, set\n`ANTHROPIC_AUTH_TOKEN` + `ANTHROPIC_BASE_URL` (or the OpenAI pair)\nexplicitly. Explicit values always win over the `AI_GATEWAY_API_KEY`\nexpansion.\n\nIf a `process` or `revalidate` run halts because the upstream credential\nran out of quota or credits, deepsec stops gracefully and tells you\nwhere to top up. Re-run the same command afterward and it picks up\nwhere it left off.\n\n## Distributed execution (optional)\n\nLarge monorepos can fan work across [Vercel Sandbox](https://vercel.com/docs/vercel-sandbox) microVMs:\n\n```bash\npnpm deepsec sandbox process --project-id my-app --sandboxes 10 --concurrency 4\n```\n\nNeeds a Vercel account. The local working tree is tarballed and\nuploaded; `.git` is excluded. Both OIDC tokens (local) and access\ntokens (CI) are supported — see\n[docs/vercel-setup.md](docs/vercel-setup.md).\n\n## Security model of deepsec itself\n\nTreat `deepsec` like a coding agent with full shell access on the enviroment that it is\nrunning on. It is designed to run on trusted inputs (your source code) but you may still\nbe concerned about prompt injection due to external dependencies or vendored code.\n\nRunning on a sandbox (see above) does limit the potential exposure substantially:\n\n- The API keys for the coding agents are injected outside of the sandbox and hence cannot be exfiltrated\n- For the worker sandboxes, network egress from the sandbox is limited to coding agent hosts (Egress is allowed during the bootstrap process, but this does not run the coding agent)\n\n## Workflow reference\n\n| Command         | What it does                                             |\n|-----------------|----------------------------------------------------------|\n| `scan`          | Find candidate sites with regex matchers (fast, no AI)   |\n| `process`       | AI investigation; emits findings + recommendation        |\n| `process --diff`| PR-mode: scan + investigate only files changed in a diff |\n| `triage`        | Lightweight P0/P1/P2 classification (cheaper model)      |\n| `revalidate`    | Re-check existing findings; checks git history for fixes |\n| `enrich`        | Add git committer info + (with a plugin) ownership data  |\n| `report`        | Markdown + JSON summary for one project                  |\n| `export`        | Per-finding JSON or directory of markdown files          |\n| `metrics`       | Cross-project counts: severities, vulns by type, TPs     |\n| `status`        | Snapshot of the project mirror                           |\n| `sandbox \u003ccmd\u003e` | Run any of the above on Vercel Sandbox microVMs          |\n\n## License\n\nApache 2.0. See [LICENSE](LICENSE) and [NOTICE](NOTICE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvercel-labs%2Fdeepsec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvercel-labs%2Fdeepsec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvercel-labs%2Fdeepsec/lists"}