Datadog Security Engineering Team: AI Can Find Vulnerabilities, but Determining Exploitability Requires Encoding Human Security Knowledge as Invariants
The Datadog security engineering team details their agentic vulnerability hunting system: the core is not making AI smarter, but providing it with a human-reviewed 'threat pack' that frames security requirements as unbreakable invariants, using two-stage filtering and repeated benchmarking to ensure findings are both accurate and reproducible.
Bianca Lankford, Matt Meen, and Adrien Peronnet of the Datadog security engineering team describe a recurring bottleneck in AI-driven vulnerability discovery in an engineering blog post: while today's models can indeed identify potential vulnerabilities through code review, the real challenge lies in determining whether these issues are exploitable once the service's business logic and existing security controls are taken into account. At Datadog's scale, a production service may rely on frameworks, infrastructure, and other services maintained by dozens of teams; an agent reviewing a single repository cannot see the authentication checks or network restrictions provided by those other teams, nor does it know which security requirements the service must comply with.
Their solution is called the 'threat pack,' a concise, human-reviewed document that translates domain experts' security knowledge into context usable by agents during hunts. Each threat pack consists of two files: a Markdown file containing four sections—system overview, security invariants, review priorities, and known compensating controls—and a YAML metadata file identifying the pack's scope, maintainer, and code location. They keep packs under approximately 300 lines to provide agents with sufficient context while consuming only a small fraction of their context window.
'Invariants' are security properties that the system must always maintain. The article provides a specific example: for an isolated code execution service, the security requirement is that 'code inside the guest host must never reach the Kubernetes node, host filesystem, container runtime, or cloud metadata service.' A reviewer could manually search for calls touching the filesystem or network sockets, but determining whether those calls violate the rule requires more detail—for instance, knowing that root access inside the guest is expected behavior, that Kata microVMs provide a trust boundary between guest and host, that Kubernetes and Cilium policies constrain workloads, and that an egress proxy is the only approved external network path. Some protections are partially visible in source code, but they do not fully explain the access the service is intended to allow or prevent. By recording this requirement as an invariant, accompanied by trust assumptions and compensating controls, the agent gains a clear objective: to find a reachable path that breaks the requirement while accounting for protections that might stop an attacker from exploiting it.