AutoBaxBuilder: Bootstrapping Code Security Benchmarking

Tobias von Arx, Niels Mündler, Mark Vero, Maximilian Baader, Martin Vechev

As software engineering increasingly relies on Large Language Models (LLMs) for code generation, a critical "security gap" has emerged: models frequently produce code that is functionally correct but harbors dangerous vulnerabilities. To measure and mitigate this, the research community relies on security benchmarks. However, traditional benchmarking faces significant hurdles that threaten to stall progress in AI-assisted coding.

The Benchmarking Bottleneck

Evaluating whether an LLM writes secure code is notoriously difficult. Static analyzers—tools that scan code without executing it—are prone to false positives and negatives. The gold standard is end-to-end exploits: actual scripts that attack the generated code to definitively prove a vulnerability exists.

Creating these exploits currently requires immense manual effort from security experts. Furthermore, once a benchmark is published, it inevitably leaks into the training data of next-generation LLMs, artificially inflating their performance scores (data contamination). Finally, as models grow more capable, benchmarks must continuously scale in difficulty to truly test their limits.

To overcome these challenges, researchers have introduced AutoBaxBuilder, an automated, LLM-powered pipeline capable of generating complex code security benchmarks—including functional tests and end-to-end exploits—entirely from scratch.

How AutoBaxBuilder Works

AutoBaxBuilder operates as an agentic pipeline driven by an orchestration LLM (such as GPT-5) that manages several specialized "solution" LLMs. The pipeline constructs benchmarks in three distinct phases:

  1. Scenario Proposal: The orchestrator conceptualizes a unique web backend service and generates a formal OpenAPI specification to define its structure.
  2. Iterative Functional Testing: The pipeline generates functional tests and reference solutions. It employs a robust refinement loop: if a test fails, the orchestrator analyzes execution logs to determine whether the solution is buggy or the test logic is flawed, iteratively refining them until they align.
  3. Exploit Generation & Contrastive Validation: This is the pipeline's most novel feature. To guarantee that an generated security exploit is valid and precise, AutoBaxBuilder creates a "contrastive pair." It modifies a reference solution to intentionally inject a vulnerability. It then tests the exploit to ensure it succeeds against the vulnerable version and fails against the patched version. This automated flag system ensures high reliability without requiring human intervention.

AutoBaxBench: A New Standard for Evaluation

Using this pipeline, the authors generated AutoBaxBench, a new dataset comprising 40 novel scenarios spanning 11 distinct high-severity Common Weakness Enumerations (CWEs), such as Path Traversal, OS Injection, and Cross-Site Scripting (XSS).

The benchmark is divided into three difficulty tiers:

  • EASY: Single API endpoints.
  • MEDIUM: Complexity mirroring existing benchmarks (averaging 3 endpoints).
  • HARD: Complex services (averaging 5 endpoints) designed specifically to challenge state-of-the-art models.

Key Findings and Insights

The 12x Human Multiplier

AutoBaxBuilder drastically reduces the time and cost of benchmark creation. Generating a full benchmarking task takes under two hours and costs less than $4 USD in API fees. By shifting the human role from creation to mere verification, the pipeline reduces expert labor from roughly 3 hours per scenario to just 15 minutes—a 12x reduction in human effort.

The Security-Correctness Gap

Evaluations on AutoBaxBench reveal a stark contrast between functional correctness and security. Many top-tier models can write code that passes all functional tests (high pass@1) but fails to defend against exploits (low sec_pass@1). For instance, Claude 4.5 Sonnet achieved an 83% functional pass rate on the "HARD" split, but only a 25% security pass rate.

Quality and Reliability

AutoBaxBuilder does not sacrifice quality for speed. In 39% of cases, the automated exploits were found to be more comprehensive than expert-written baselines, often testing for a wider array of attack vectors. Furthermore, an ablation study confirmed there is no "self-bias"—models do not perform artificially better on benchmarks they helped generate. The rankings of top models (Claude 4.5, Gemini 3 Pro, GPT-5) remained consistent across both manual and automated benchmarks.

Limitations and Future Directions

While AutoBaxBuilder represents a massive leap forward, it currently focuses exclusively on web backends with REST APIs. Expanding the pipeline to Command Line Interfaces (CLIs) or Application Binary Interfaces (ABIs) remains a target for future work. Additionally, certain vulnerabilities, like Denial of Service via resource exhaustion (CWE-400), proved difficult for LLMs to generate reliable exploits for and were excluded from the main results.

Ultimately, AutoBaxBuilder paves the way for continuous, uncontaminated evaluation. The authors envision integrating this pipeline directly into reinforcement learning loops, providing a limitless stream of fresh security challenges to train the next generation of secure AI coding assistants.

Summary updated

BibTeX
@inproceedings{arx2026autobaxbuilder,
  author = {Tobias von Arx and Niels Mündler and Mark Vero and Maximilian Baader and Martin Vechev},
  title = {{AutoBaxBuilder: Bootstrapping Code Security Benchmarking}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=J5KrubuRAJ},
}
Figure