> your AI agent picks dependencies from memory; give it dated facts — try starlog.dev ↗ vet your agent's deps ↗ vibe-coding is fine. vibe-importing isn’t. — try starlog.dev ↗ vibe-importing isn’t fine ↗ your agent has never seen your private packages — try starlog.dev ↗ facts for private packages ↗ a linter for the dependencies your AI agent picks — try starlog.dev ↗ a linter for agent deps ↗ whois is redacted, cdns mask the rest — get the real operator — try whoisgeni.us ↗ who really runs that domain ↗ domain attribution that shows its work — full evidence chain — try whoisgeni.us ↗ domain intel w/ evidence ↗

← Back to Articles

0security: When Your Security Scanner Thinks Like a Penetration Tester

[ View on GitHub ]

0security: When Your Security Scanner Thinks Like a Penetration Tester

Hook

Most security scanners tell you there's a SQL injection in line 47. 0security writes an exploit, generates a patch, verifies the fix works, and documents the entire investigation chain—all autonomously.

Context

Security tooling has been stuck in a detect-and-dump paradigm for two decades. SAST tools pattern-match their way through codebases, throw thousands of alerts at developers, and call it a day. DAST tools blindly fuzz endpoints. SCA scanners scream about every transitive dependency CVE. The result? Security teams drowning in false positives while real vulnerabilities slip through, and developers ignoring security tools because the signal-to-noise ratio is abysmal.

The promise of LLM-based security tools was supposed to fix this—smarter triaging, better context, fewer false positives. But most implementations just wrapped GPT-4 around existing scanners, using AI as a fancy filter rather than rethinking the workflow. 0security takes a different approach: it treats vulnerability analysis as an investigative process, not a pattern-matching exercise. Instead of scanning for known patterns, it dispatches specialized agents that explore codebases, attempt exploitation, generate fixes, and validate remediation—creating complete evidence chains that security teams can actually trust.

Technical Insight

Verification

Findings

Findings

Findings

Findings

Success

Failure

Evidence Chain

Evidence Chain

Evidence Chain

Evidence Chain

Provenance

CLI Interface

Task Queue

Web UI

MCP Server

Agent Executor

Source Analysis Agent

Dependency Agent

API Testing Agent

Binary Analysis Agent

Sentinel Monitor

Verification Pipeline

Exploit Generation

Sandbox Execution

Patch Generation

Re-validation

Mark False Positive

Findings Database

Workspace Context

System architecture — auto-generated

At its core, 0security is a multi-agent orchestration framework that inverts the traditional security scanning model. Rather than running pre-defined checks, it maintains a task queue where specialized agents pick up investigative work, each with bounded LLM token budgets and configurable exploration depth. The architecture separates concerns cleanly: workspace isolation for each scan, a findings database with evidence provenance, and three execution modes (CLI, web UI, and MCP server) that share the same agent runtime.

The real innovation lives in the verification pipeline. When a source analysis agent flags a potential vulnerability, 0security doesn't just log it—it spawns a verification workflow. Here's what that looks like in practice:

// Simplified verification workflow
const verificationChain = async (finding: Finding) => {
  // Step 1: Attempt reproduction
  const exploit = await exploitAgent.generate({
    vulnerability: finding,
    context: workspace.getContext(),
    budget: { tokens: 10000, maxDepth: 3 }
  });
  
  // Step 2: Validate exploit actually works
  const reproduced = await sandboxExecutor.run({
    exploit: exploit.code,
    target: finding.location,
    safetyChecks: true
  });
  
  if (!reproduced.success) {
    return { status: 'false_positive', evidence: reproduced.logs };
  }
  
  // Step 3: Generate patch
  const patch = await fixAgent.generate({
    vulnerability: finding,
    exploitEvidence: exploit,
    codeContext: workspace.getFileTree(finding.location)
  });
  
  // Step 4: Apply patch and re-verify
  const fixed = await workspace.applyPatch(patch);
  const retest = await sandboxExecutor.run({
    exploit: exploit.code,
    target: finding.location
  });
  
  return {
    status: retest.success ? 'patch_failed' : 'verified_and_fixed',
    evidence: {
      originalExploit: exploit,
      patch: patch,
      retestResults: retest
    }
  };
};

This closed-loop approach addresses the core problem with LLM-based analysis: hallucination. By requiring actual exploitation and post-fix validation, 0security filters out findings that can't be demonstrated. The evidence chain—finding → exploit → patch → retest—provides the auditability that security teams need when presenting results to developers.

The cost ceiling mechanism is particularly clever. Each agent operates under token budgets that prevent runaway LLM costs during deep investigations:

// Agent configuration with budget controls
const scanConfig = {
  agents: {
    sourceAnalysis: { budget: 50000, depth: 2 },
    binaryReverse: { budget: 100000, depth: 3 },
    apiTesting: { budget: 25000, depth: 1 }
  },
  globalCeiling: 500000, // Max tokens across all agents
  bailoutThreshold: 0.7 // Stop if 70% spent with no findings
};

When an investigation hits budget limits, agents summarize their current findings and reasoning path before terminating. This creates predictable cost profiles—critical for teams who've watched LLM API bills spiral during exploratory tasks.

The MCP (Model Context Protocol) server integration deserves special attention. Instead of 0security being a standalone tool that developers context-switch to, it exposes security workflows as capabilities that other coding agents can invoke. A developer using Claude with the 0security MCP can say "check this function for vulnerabilities" and Claude orchestrates the scan, interprets results, and suggests fixes—all within the existing development conversation. This architectural choice makes security analysis composable rather than isolated.

Sentinel agents take this further with persistent monitoring. Unlike one-shot scans, Sentinels maintain their own memory and execution schedules:

// Sentinel configuration for continuous monitoring
const sentinel = {
  name: 'auth-monitor',
  focus: ['authentication', 'authorization', 'session-management'],
  schedule: '0 */6 * * *', // Every 6 hours
  memory: {
    knownPatterns: [],
    falsePositives: [],
    targetSpecificRules: []
  },
  budget: { daily: 100000 },
  alertThreshold: 'medium'
};

Sentinels learn target-specific patterns over time, building up institutional knowledge about the codebase. They track which patterns consistently appear as false positives, which areas of code have historically contained vulnerabilities, and which dependency chains warrant extra scrutiny. This transforms security analysis from periodic point-in-time scans into continuous background intelligence.

The multi-runtime architecture—source, binary, API, and dependency analysis in unified workspaces—prevents the fragmentation that plagues security teams. You don't run Semgrep for SAST, Burp for DAST, Snyk for SCA, and Ghidra for reverse engineering separately. All scan types share context, evidence chains link findings across runtimes, and agents can pivot between analysis modes during investigations. When source analysis finds a cryptographic function, agents can drop into binary analysis to examine the compiled implementation, then pivot to API testing to verify runtime behavior.

Gotcha

The foundational bet on LLM reasoning creates systemic risk. When an agent claims a vulnerability exists, you're trusting probabilistic generation, not deterministic analysis. The verification pipeline mitigates this—findings without working exploits get filtered—but that assumes the sandbox environment accurately represents production. Subtle configuration differences, timing issues, or state-dependent vulnerabilities might not reproduce, leading to discarded true positives. Conversely, the exploit generation agent might craft working exploits against test environments that wouldn't work in production, creating false confidence.

Cost predictability remains a challenge despite budget controls. A complex investigation might consume its entire token ceiling exploring dead ends, while a simpler codebase with obvious vulnerabilities barely touches the budget. This makes ROI calculation difficult—you're paying for exploration, not guaranteed results. For compliance-driven security teams that need deterministic coverage metrics ("we scanned 100% of code with these 500 rules"), the probabilistic nature is a non-starter. The plugin ecosystem appears early-stage; extending beyond bundled capabilities requires TypeScript development rather than declarative configuration, which gates customization behind engineering skills that not all security teams possess.

Verdict

Use if: You're an AppSec team with engineering resources who needs to automate investigative workflows that currently burn expert hours—variant hunting, triaging bug bounty reports, validating dependency upgrades, or exploring novel attack surfaces. The closed-loop verification and MCP integration make this genuinely valuable for reducing toil in environments already using LLMs for development. Particularly well-suited for offensive security researchers and startups willing to trade determinism for investigative depth. Skip if: You need deterministic compliance scanning with guaranteed coverage metrics, can't tolerate variable LLM API costs, lack TypeScript skills for customization, or operate in regulated environments where probabilistic security findings create audit problems. Traditional SAST/DAST tools with LLM-assisted triaging (like Semgrep Assistant) offer better cost-predictability for known vulnerability patterns, while CodeQL provides superior semantic analysis if you're already in the GitHub ecosystem.