AI Security

Launching Zero-Day Discovery: How Safeguard's Multi-Agent TAOR Deep Think AI Engine Finds Vulnerabilities Before Anyone Else

Safeguard.sh launches its Zero-Day Discovery Engine, powered by the Multi-Agent TAOR Deep Think AI Engine — a multi-lead, multi-sub-agent architecture that performs deep CWE analysis on open-source packages to uncover vulnerabilities that traditional scanners miss.

Nayan Dey
Senior Security Engineer
10 min read

Today we're announcing the launch of Zero-Day Discovery — a capability available exclusively to Safeguard Enterprise customers. This isn't another vulnerability scanner that checks packages against a known CVE database. This is an AI system that reads source code, reasons about it, and discovers vulnerabilities that don't have CVE identifiers yet.

In our initial deployment, the engine has identified thousands of previously unknown vulnerabilities across popular open-source packages — findings that no existing scanner, database, or advisory service has reported. We're issuing these as SGZ advisories (Safeguard Zero-Day advisories) to our Enterprise customers before they become public knowledge.

This post is a deep technical walkthrough of how we built it.

The Problem: You Can't Defend Against What You Don't Know Exists

Every vulnerability scanner in the market — Snyk, Grype, Trivy, OSV — works the same way fundamentally. They take a package name and version, look it up in a database of known CVEs and advisories, and report matches. This is useful, but it has an inherent limitation: the vulnerability must already be discovered, assigned a CVE, and published to a database before the scanner can find it.

The median time between a vulnerability being introduced in code and it being assigned a CVE is over 4 years. During that window, every organization using the affected package is exposed, and no scanner will flag it.

We decided to close that gap.

Safeguard's Multi-Agent TAOR Deep Think AI Engine

TAOR stands for Tool-Augmented Orchestrated Reasoning — the core of Safeguard's Multi-Agent TAOR Deep Think AI Engine. It's not a single model prompt or a simple chain. It's a multi-level agent architecture where specialized AI agents collaborate, reason deeply, and cross-verify each other's findings to analyze source code with the depth and rigor of a human security researcher — but at the speed and scale that only machines can achieve.

The Multi-Lead, Multi-Sub-Agent Design

Traditional single-agent AI approaches hit a wall with security analysis. A single prompt, no matter how well-crafted, can't hold the context needed to trace data flows across multiple files, understand framework-specific patterns, assess exploitability, and cross-reference against known vulnerability classes simultaneously.

Safeguard's Multi-Agent TAOR Deep Think AI Engine solves this with a hierarchical agent structure:

                    ┌─────────────────────────┐
                    │    Orchestrator Agent     │
                    │  (Strategy & Coordination)│
                    └──────────┬──────────────┘
                               │
           ┌───────────────────┼───────────────────┐
           │                   │                    │
    ┌──────▼──────┐    ┌──────▼──────┐    ┌───────▼──────┐
    │  Lead Agent  │    │  Lead Agent  │    │  Lead Agent   │
    │ Code Analysis│    │ Data Flow    │    │ Exploitability│
    └──────┬──────┘    └──────┬──────┘    └───────┬──────┘
           │                   │                    │
     ┌─────┼─────┐      ┌────┼─────┐        ┌────┼─────┐
     │     │     │      │    │     │        │    │     │
    Sub   Sub   Sub    Sub  Sub   Sub      Sub  Sub   Sub
    Agent Agent Agent  Agent Agent Agent   Agent Agent Agent

The Orchestrator Agent decides which packages to analyze, how to prioritize them (based on popularity, dependency depth, and historical vulnerability patterns), and coordinates the overall analysis campaign.

Lead Agents are specialists:

  • Code Analysis Lead — Reads source code file by file, identifies suspicious patterns, and dispatches sub-agents to investigate specific vulnerability classes (injection, deserialization, path traversal, etc.)
  • Data Flow Lead — Traces how untrusted input moves through the codebase, from entry points (HTTP handlers, CLI arguments, environment variables) to dangerous sinks (eval, exec, file operations, SQL queries)
  • Exploitability Lead — Takes candidate findings and determines whether they're actually exploitable in practice, not just theoretical issues

Sub-Agents are the workers. Each sub-agent is specialized in a narrow domain:

  • CWE-79 specialist (XSS patterns)
  • CWE-89 specialist (SQL injection)
  • CWE-502 specialist (deserialization)
  • CWE-22 specialist (path traversal)
  • CWE-78 specialist (OS command injection)
  • CWE-918 specialist (SSRF)
  • And dozens more covering the full CWE taxonomy

Each sub-agent carries deep knowledge about its specific vulnerability class — the patterns, the common mistakes, the language-specific variants, and the edge cases that trip up both humans and simpler AI systems.

Why Multi-Agent Matters

A single-agent approach analyzing a 10,000-line codebase would need to hold the entire context in one pass. It would inevitably lose track of data flows, miss cross-file dependencies, and produce shallow analysis.

With Safeguard's Multi-Agent TAOR Deep Think AI Engine:

  1. Parallel analysis — Multiple sub-agents analyze different files and vulnerability classes simultaneously
  2. Deep specialization — Each agent is an expert in its domain, carrying CWE-specific heuristics and patterns
  3. Cross-agent synthesis — The Data Flow Lead's findings inform the Exploitability Lead's assessment. A tainted input discovered by one agent becomes context for another
  4. Iterative refinement — If a Lead Agent suspects a vulnerability but needs more context, it dispatches additional sub-agents to trace specific code paths

The CWE Analysis Pipeline

Every analysis follows a structured pipeline:

Phase 1: Package Intelligence Gathering

Before reading a single line of code, the system gathers intelligence about the target package:

  • What ecosystem (npm, PyPI, Maven, Go)?
  • What does it do? (HTTP server, parser, crypto, file I/O?)
  • What's its dependency tree?
  • What vulnerability patterns are common in this ecosystem and package category?
  • Has this package or similar packages had vulnerabilities before? What CWEs?

This intelligence shapes the analysis strategy. A JSON parser gets different treatment than an HTTP middleware library.

Phase 2: Source Code Analysis

The Code Analysis Lead distributes source files to sub-agents based on the intelligence gathered. Each sub-agent analyzes files through the lens of its CWE specialty:

analyze_code_for_vulnerabilities(
  file_path: "src/parser.js",
  language: "javascript",
  focus_cwes: ["CWE-94", "CWE-1321", "CWE-400"]
)

Sub-agents report structured findings:

  • Vulnerability type — The specific CWE class
  • Severity — Critical, High, Medium, Low (based on exploitability and impact)
  • Evidence — The exact code snippet that constitutes the vulnerability
  • Line numbers — Precise location in the source
  • Exploitable reason — Why this isn't just a theoretical concern

Phase 3: Data Flow Tracing

Raw pattern matching produces too many false positives. A call to eval() isn't a vulnerability if the input is a hardcoded string. The Data Flow Lead traces how data actually moves:

trace_data_flow(
  file_path: "src/handler.js",
  source: "req.query.input (line 45)",
  sink: "eval() (line 89)",
  language: "javascript"
)

This produces a complete taint path showing every transformation the data undergoes. If the path includes sanitization that's actually effective, the finding gets downgraded. If the path shows the input reaching a dangerous sink without adequate validation, the finding gets confirmed.

Phase 4: Exploit Simulation

For every confirmed finding, the Exploitability Lead attempts to construct a proof of concept:

simulate_exploit_path(
  vulnerability_type: "Prototype Pollution",
  entry_point: "merge(target, source) in src/utils.js:23",
  attack_vector: "Attacker-controlled object with __proto__ key",
  language: "javascript"
)

This step eliminates findings that look dangerous on paper but can't actually be triggered. It also estimates the real-world attack complexity — can this be exploited remotely? Does it require authentication? What's the blast radius?

Phase 5: Confidence Assessment and Deduplication

Before issuing an advisory, the system performs a confidence assessment:

assess_zeroday_confidence(
  findings: [...],
  package_name: "example-lib",
  version: "2.1.0",
  ecosystem: "npm"
)

This cross-references against:

  • Known CVEs — Is this actually a known vulnerability with an existing CVE? If so, it's not a zero-day
  • Known advisory databases — OSV, GitHub Advisory, NVD
  • Previously issued SGZ advisories — Deduplication against our own findings
  • Common false positive patterns — Framework-level protections that mitigate the issue at a higher layer

Only findings that survive all five phases get issued as SGZ advisories.

Phase 6: Advisory Generation

Each confirmed zero-day gets a structured advisory:

SGZ-2026-A3F2B
├── Severity: CRITICAL
├── CWE: CWE-1321 (Improperly Controlled Modification of Object Prototype Attributes)
├── Confidence: 92%
├── Package: example-lib@2.1.0 (npm)
├── Affected Versions: >= 1.0.0
├── Location: src/utils.js:23-45
├── Attack Vector: NETWORK
├── Attack Complexity: LOW
├── Privileges Required: NONE
├── Description: [detailed technical description]
├── Proof of Concept: [exploit path]
├── Remediation: [code patch + workaround]
└── Discovered By: Safeguard's Multi-Agent TAOR Deep Think AI Engine

Real-World Results

Since deploying Zero-Day Discovery, we've analyzed source code across thousands of open-source packages in npm, PyPI, Maven, and Go ecosystems. The results have exceeded our expectations:

Thousands of previously unreported vulnerabilities discovered, spanning:

  • Prototype pollution in JavaScript utility libraries that millions of projects depend on
  • SQL injection in ORMs and database adapters where parameterized queries weren't consistently enforced
  • Path traversal in file-serving libraries where user input reached filesystem operations
  • ReDoS (Regular Expression Denial of Service) in validation libraries with catastrophic backtracking patterns
  • Deserialization attacks in serialization libraries that process untrusted data
  • Command injection in build tools and CLI utilities that shell out with user-supplied arguments
  • SSRF in HTTP client wrappers that don't restrict internal network access
  • Improper certificate validation in TLS libraries that skip hostname verification under certain configurations

These aren't theoretical concerns found by grep. Each one has a traced data flow from attacker-controlled input to a dangerous operation, with a confirmed exploitation path.

The CWE Distribution

Our findings follow a distribution that aligns with real-world attack patterns:

| CWE | Category | % of Findings | |-----|----------|---------------| | CWE-79 | Cross-Site Scripting | 14% | | CWE-89 | SQL Injection | 11% | | CWE-22 | Path Traversal | 10% | | CWE-1321 | Prototype Pollution | 9% | | CWE-400 | Uncontrolled Resource Consumption | 8% | | CWE-502 | Deserialization of Untrusted Data | 7% | | CWE-78 | OS Command Injection | 6% | | CWE-918 | Server-Side Request Forgery | 5% | | CWE-295 | Improper Certificate Validation | 4% | | Others | Various | 26% |

The long tail of "Others" includes race conditions, integer overflows, information disclosure, and cryptographic weaknesses — vulnerability classes that are notoriously difficult for automated tools to detect but that TAOR's specialized sub-agents are designed to find.

Enterprise-Only Access

Zero-Day Discovery is available exclusively to Safeguard Enterprise customers. There are several reasons for this:

Responsible disclosure. We follow responsible disclosure practices. When we discover a zero-day, we privately notify the package maintainer and give them time to patch before we publish the advisory broadly. Enterprise customers get early access to these advisories — along with remediation guidance — so they can protect themselves during the disclosure window.

Computational cost. Deep multi-agent source code analysis is computationally expensive. Each package analysis involves multiple AI agents working in parallel across the full source tree. This is fundamentally different from database-lookup scanning.

Integration depth. Zero-Day Discovery integrates with Safeguard's auto-remediation pipeline. When a zero-day is found in a package your project depends on, the system can automatically generate a pull request with the fix or suggest an alternative package — without manual intervention.

What This Means for Your Security Posture

If you're relying on CVE databases as your sole vulnerability intelligence source, you're defending against yesterday's attacks. The vulnerabilities we're discovering exist in packages that are in production across millions of applications right now.

Zero-Day Discovery changes the equation:

  • Know before the CVE — Get notified about vulnerabilities days, weeks, or months before they appear in NVD
  • Automatic remediation — Don't just learn about the vulnerability; get a fix generated for your specific codebase
  • Continuous analysis — As packages update, they're re-analyzed. New code means new potential vulnerabilities
  • SGZ Advisory feed — A proprietary intelligence feed that augments your existing CVE monitoring

The future of software supply chain security isn't just about checking boxes against known vulnerabilities. It's about finding the unknown ones before attackers do. That's what Zero-Day Discovery delivers.


Zero-Day Discovery is available now for Safeguard Enterprise customers. Contact us to learn more or request a demo.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.