Deepsec is a security harness for finding vulnerabilities in your codebase powered by coding agents
This report summarizes scanner evidence for vercel-labs/deepsec, a TypeScript project with 8,296 GitHub stars. SynthScan examined 115,875 lines of code across 730 source files, recording 86 pattern matches distributed across 9 syntactic categories. The legacy adjusted pattern signal is 0.9 (Low pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.
Can maintainers explain intent, assumptions, and trade-offs? 83 finding(s).
Are imports declared and package/API names verified? 3 finding(s).
Are wrappers, guards, and repeated structures necessary? 47 finding(s).
Which changes need focused human review? 86 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 86 distinct pattern matches across 9 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | packages/processor/src/index.ts | 88 | export function createDefaultAgentRegistry(): AgentRegistry { | CODE |
| LOW | packages/processor/src/agents/pi-sdk.ts | 120 | function assertLexicallyInsideProjectRoot(guard: RootGuard, absolutePath: string): string { | CODE |
| LOW | packages/processor/src/agents/pi-sdk.ts | 137 | function assertInsideProjectRootAllowMissing(guard: RootGuard, absolutePath: string): string { | CODE |
| LOW | packages/processor/src/agents/pi-sdk.ts | 236 | export function createPiReadOnlyToolDefinitions(projectRoot: string): ToolDefinition<any, any>[] { | CODE |
| LOW | packages/processor/src/agents/pi-sdk.ts | 300 | function stripGatewayProviderPrefix(modelName: string): string { | CODE |
| LOW | packages/processor/src/agents/pi-sdk.ts | 353 | export function configureProviderOverrides(registry: ModelRegistry, cfg: PiAgentConfig): void { | CODE |
| LOW | packages/processor/src/agents/pi-sdk.ts | 389 | function createGatewayPassThroughModel(modelId: string): PiProviderModelConfig { | CODE |
| LOW | packages/processor/src/agents/pi-sdk.ts | 407 | function piModelToProviderModelConfig(model: PiModel): PiProviderModelConfig { | CODE |
| LOW | packages/processor/src/agents/pi-sdk.ts | 428 | function registerGatewayModelIfNeeded( | CODE |
| LOW | packages/processor/src/agents/pi-sdk.ts | 505 | export async function resolvePiModelWithDynamicGateway( | CODE |
| LOW | packages/processor/src/agents/shared.ts | 494 | export function buildInvestigateJsonRepairPrompt(batch: FileRecord[]): string { | CODE |
| LOW | packages/processor/src/agents/shared.ts | 529 | export function buildRevalidateJsonRepairPrompt(expected?: ExpectedFinding[]): string { | CODE |
| LOW | packages/processor/src/agents/shared.ts | 564 | function buildRevalidateIdRepairPrompt(params: { | CODE |
| LOW | packages/processor/src/agents/shared.ts | 699 | export function formatJsonRepairFailureDebugText(originalText: string, repairText: string): string { | CODE |
| LOW | packages/processor/src/agents/shared.ts | 724 | function extractArrayCandidateForRepair(jsonPayload: string): string { | CODE |
| LOW | packages/processor/src/agents/shared.ts | 857 | export function buildInvestigateFieldRepairPrompt(invalid: InvalidFindingEntry[]): string { | CODE |
| LOW | packages/processor/src/agents/shared.ts | 897 | function investigateFindingSignature(f: Finding): string { | CODE |
| LOW | packages/processor/src/agents/codex-sdk.ts | 113 | function findCodexSubscriptionAuth(): string | null { | CODE |
| LOW | packages/processor/src/agents/codex-sdk.ts | 290 | export function buildGatewayProviderConfig( | CODE |
| LOW | packages/deepsec/src/preflight.ts | 108 | export function reconcileAiGatewayDefaultsForRoute( | CODE |
| LOW | packages/deepsec/src/preflight.ts | 135 | export async function applyConfiguredModelRoute( | CODE |
| LOW | packages/deepsec/src/version.ts | 64 | export function getDeepsecWorkspaceDependency(): string { | CODE |
| LOW | packages/deepsec/src/resolve-project-id.ts | 77 | export function resolveProjectIdForDirect( | CODE |
| LOW | packages/deepsec/src/auth/vercel-link.ts | 52 | export function vercelAuthRecoveryActions( | CODE |
| LOW | packages/deepsec/src/auth/model-route.ts | 65 | export function modelRouteCompatibilityError( | CODE |
| LOW | packages/deepsec/src/auth/model-route.ts | 86 | export function defaultCredentialHeaderScheme(name: string): CredentialHeaderScheme { | CODE |
| LOW | packages/deepsec/src/auth/model-route.ts | 250 | export async function verifyModelRouteWithFetch( | CODE |
| LOW | packages/deepsec/src/auth/model-picker.ts | 147 | export function buildRecommendedModelChoices(results: BenchmarkResult[]): RecommendedModelChoice[] { | CODE |
| LOW | packages/deepsec/src/setup/output.ts | 19 | export function createTerminalLineDecoder(onLine: (line: string) => void): { | CODE |
| LOW | packages/deepsec/src/setup/workspace-config.ts | 40 | export function persistWorkspaceConfigRoute(workspaceDir: string, route: ModelRoute): void { | CODE |
| LOW | packages/deepsec/src/setup/protocol.ts | 19 | export function setSetupDocumentationWorkspace(workspaceDir: string): void { | CODE |
| LOW | packages/deepsec/src/setup/protocol.ts | 146 | export function formatSetupDocumentationHuman(): string | undefined { | CODE |
| LOW | packages/deepsec/src/setup/repository-analysis.ts | 51 | export function buildRepositoryAnalysisPrompt(projectId: string): string { | CODE |
| LOW | packages/deepsec/src/setup/fingerprint.ts | 7 | export function setupRepositoryIgnoreGlobs(root: string, workspaceDir?: string): string[] { | CODE |
| LOW | packages/deepsec/src/setup/project-name.ts | 5 | export function deterministicVercelProjectName(projectId: string, targetRoot: string): string { | CODE |
| LOW | …es/deepsec/src/__tests__/setup-persisted-route.test.ts | 22 | function writeConnectionCheckpoint(dir: string, projectId: string, route: unknown): void { | CODE |
| LOW | packages/deepsec/src/__tests__/tarball.test.ts | 276 | async function listTarballEntriesFromFile( | CODE |
| LOW | packages/deepsec/src/sandbox/setup.ts | 88 | export function resolveBrokeredCredentials( | CODE |
| LOW | packages/deepsec/src/sandbox/setup.ts | 557 | async function ensureClaudeNativeBinaries( | CODE |
| LOW | packages/deepsec/src/sandbox/setup.ts | 640 | export function buildInstallAgentToolsScript(): string { | CODE |
| LOW | packages/deepsec/src/commands/init.ts | 450 | function reconcileLocalDeepsecDependency(workspaceDir: string, dependency: string): void { | CODE |
| LOW | packages/scanner/src/declarative-matcher.ts | 222 | export function compileDeclarativeMatcher( | CODE |
| LOW | packages/scanner/src/declarative-matcher.ts | 265 | export function compileDeclarativeMatchers( | CODE |
| LOW | packages/scanner/src/index.ts | 159 | function appendDeepsecDataIgnoreGlobs( | CODE |
| LOW | …epsec/files/packages/deepsec/src/sandbox/setup.ts.json | 84 | "snippet": " */\nexport function resolveBrokeredCredentials(agentType: string | undefined): BrokeredCredentials {\ | CODE |
| LOW | …epsec/files/packages/deepsec/src/sandbox/setup.ts.json | 92 | "snippet": "export function resolveBrokeredCredentials(agentType: string | undefined): BrokeredCredentials {\n co | CODE |
| LOW | …epsec/files/packages/deepsec/src/sandbox/setup.ts.json | 148 | "snippet": " */\nexport function resolveBrokeredCredentials(agentType: string | undefined): BrokeredCredentials {\ | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | packages/core/src/run.ts | 181 | // --- Run-level shutdown handling --- | COMMENT |
| LOW | packages/core/src/run.ts | 221 | function installShutdownHandlers(): void { | COMMENT |
| LOW | packages/processor/src/index.ts | 341 | // 1. The owning run's RunMeta says it's done/error/missing — the | COMMENT |
| LOW | packages/processor/src/index.ts | 421 | // (e.g. after some sandboxes failed) skips files that already carry | COMMENT |
| LOW | packages/processor/src/agents/codex-wrapper.sh | 1 | #!/bin/sh | COMMENT |
| LOW | packages/processor/src/agents/shared.ts | 81 | export function classifyQuotaError(msg: string, hint?: QuotaAgentHint): QuotaSource | undefined { | COMMENT |
| LOW | packages/processor/src/agents/shared.ts | 381 | }) | COMMENT |
| LOW | …ges/processor/src/__tests__/process-revalidate.test.ts | 901 | // prose. We test it via the real ClaudeAgentSdkPlugin by stubbing the | COMMENT |
| LOW | packages/deepsec/src/preflight.ts | 21 | resolveModelRoute, | COMMENT |
| LOW | packages/deepsec/src/preflight.ts | 141 | if (!route) return undefined; | COMMENT |
| LOW | packages/deepsec/src/output-cap.ts | 1 | // Caps stdout/stderr of the deepsec worker when it runs inside a sandbox. | COMMENT |
| LOW | packages/deepsec/src/quota-message.ts | 1 | // Renders the message we print when a process/revalidate run is stopped | COMMENT |
| LOW | packages/deepsec/src/sandbox/setup.ts | 161 | if (options.aiBaseUrl) { | COMMENT |
| LOW | packages/deepsec/src/sandbox/setup.ts | 201 | return env; | COMMENT |
| LOW | packages/deepsec/src/sandbox/download.ts | 21 | // tampered with the archive, the extracted files can only land in these | COMMENT |
| LOW | packages/deepsec/src/sandbox/download.ts | 41 | // characters (the timestamp is an ISO string with `:`/`.` replaced by | COMMENT |
| LOW | packages/deepsec/src/sandbox/download.ts | 221 | // "all or nothing" — if any entry is disallowed (wrong type or | COMMENT |
| LOW | packages/deepsec/src/sandbox/upload.ts | 141 | } | COMMENT |
| LOW | packages/deepsec/src/sandbox/upload.ts | 161 | // → relative `-C data/x` would then chdir again). | COMMENT |
| LOW | packages/deepsec/src/commands/export.ts | 261 | COMMENT | |
| LOW | .github/workflows/release.yml | 1 | name: Release | COMMENT |
| LOW | .github/workflows/release.yml | 81 | uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | COMMENT |
| LOW | .github/workflows/release.yml | 121 | # together. With `id-token: write` set above and a Trusted Publisher | COMMENT |
| LOW | e2e/pipeline-sandbox.test.ts | 301 | // 4. sandbox process — 1 sandbox, 2 files, stub agent. The | COMMENT |
| LOW | e2e/vitest.config.ts | 1 | import { defineConfig } from "vitest/config"; | COMMENT |
| LOW | .deepsec/pnpm-workspace.yaml | 1 | # Sever this directory from any ancestor pnpm workspace. pnpm walks up | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | packages/deepsec/src/preflight.ts | 153 | // Older scaffold-only workspaces persisted Gateway as a default even when | COMMENT |
| MEDIUM | packages/deepsec/src/commands/init.ts | 64 | // Defaults: scaffold `.deepsec/` inside the current codebase, with the | COMMENT |
| MEDIUM | packages/scanner/src/matchers/index.ts | 4 | // --- AI / agentic / messaging matchers --- | COMMENT |
| MEDIUM | packages/scanner/src/matchers/index.ts | 344 | // AI / agentic / messaging | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | …lls/technical-writer/references/editorial-standards.md | 3 | Apply these standards to the passage and its surrounding section. They are editing criteria, not proof of authorship. A | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | packages/deepsec/src/sandbox/setup.ts | 885 | elif [ -f "package/vendor/\${TRIPLE}/codex/codex" ]; then | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | packages/deepsec/src/sandbox/orchestrator.ts | 318 | // Step 1: get a snapshot — either use one the user passed, or build a fresh one | COMMENT |
| LOW | packages/deepsec/src/sandbox/orchestrator.ts | 347 | // Step 2: spawn N worker sandboxes from the snapshot in parallel | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | packages/deepsec/src/sandbox/orchestrator.ts | 318 | // Step 1: get a snapshot — either use one the user passed, or build a fresh one | COMMENT |
| LOW | packages/deepsec/src/sandbox/orchestrator.ts | 347 | // Step 2: spawn N worker sandboxes from the snapshot in parallel | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | packages/deepsec/src/sandbox/setup.ts | 497 | // theory, but resetting is cheap and more robust against clock skew. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | packages/processor/src/__tests__/shared.test.ts | 375 | const finding = JSON.stringify(validFinding({ description: "placeholder" }), null, 0).replace( | CODE |
| LOW | packages/processor/src/__tests__/shared.test.ts | 376 | '"description":"placeholder"', | CODE |