Security Agent Adversarial Evaluation: Why Static Benchmarks Fail to Measure Real Security Capability

    This article examines why static, quiz-style benchmarks fall short when evaluating the security capabilities of AI agents, using evidence from a two-sided adversarial evaluation covering 22 batches and 466 valid matches. It explains how dynamic attack-and-defense testing reveals structural differences in agent performance, outlines a reusable multi-round evaluation framework with four roles and a convergence criterion, and proposes a three-layer metric system covering capability, efficiency, and stability. A practical engineering checklist for running reproducible, cost-aware adversarial evaluations is also included.

    1. Background: Why Static Leaderboards Miss Real Security Capability

    As agents move into software development and operations workflows at scale, the way we evaluate their security capability has clearly lagged behind. Most evaluations still follow a static, quiz-style paradigm: a fixed set of questions, no active defense, retries allowed, and a pass rate calculated at the end. The problem is that this treats security as a knowledge-coverage problem, whereas real-world offense and defense is a dynamic process in which both sides iterate simultaneously.

    A two-sided adversarial evaluation covering 22 batches and 466 valid matches provides direct evidence. The scoreboard shows clear tiers: the top-ranked coding agent scored 78.6, the second scored 73.8, and the next open-source solution scored 68.5, with the remaining entries clustered between 56.3 and 67.1. The top two achieved match win rates of 0.83 and 0.86, while the highest win rate among all other solutions was only 0.59—a sharp, discontinuous gap.

    Even more telling is the contrast between the same set of models under the two paradigms. In single-player mode, where targets had no defenses and each question allowed two attempts, 30 of 40 questions were fully solved by multiple solutions, making it look as though “everyone can do it.” But once those 30 questions were moved into the two-sided adversarial matches and the defending side began continuously patching, by round 3 the attack capture rates of the three solutions had fallen to 52%, 37%, and 35%. This shows that high static scores mask differences in the ability to converge under iteration.

    2. Core Takeaways: Three Transferable Judgments

    First, security capability is not a one-time property but stability under co-evolution of offense and defense. Evaluations must allow multiple rounds of iteration and examine the slope of the curve rather than a single-point value.

    Second, the presence of a defender changes the problem distribution. In real environments, vulnerabilities get patched and questions drift, so the evaluation set needs to be “patchable and regenerable.”

    Third, the clear tiering indicates structural differences in capability rather than random fluctuation. When selecting tools, adversarial win rate and multi-round capture rate should be the primary metrics, with static pass rate used only as a reference.

    3. Evaluation Framework Design: From Single-Round Quizzes to Multi-Round Duels

    A reusable framework typically involves four roles: the attacker (the agent under test), the defender (a patching agent or rule engine), the judge (which decides whether a capture is valid), and the recorder (which captures the full process data).

    A suggested workflow:

    1. Initialize the range: generate a runnable minimal environment for each question, including code, configuration, and dependencies.
    2. Attack round: the agent under test attempts to capture the target within a fixed budget.
    3. Judgment round: the judge confirms the authenticity of the capture, excluding false positives and “cheating-style” passes.
    4. Defense round: the defender patches based on this round’s logs and generates the next variant.
    5. Convergence check: two consecutive rounds with no new captures are treated as convergence, and the convergence round is recorded.

    Illustrative pseudocode:

    1. def run_duel(agent, target, rounds=5, budget=1200):
    2. history = []
    3. for r in range(rounds):
    4. attempt = agent.attack(target, budget=budget)
    5. ok = judge.verify(attempt, target) # must be reproducible
    6. history.append({"round": r, "captured": ok, "log": attempt.trace})
    7. if ok:
    8. target = defender.patch(target, attempt.trace)
    9. if r >= 2 and not any(h["captured"] for h in history[-2:]):
    10. break # convergence
    11. return summarize(history)

    4. Metrics and Data Governance

    A three-layer metric system is recommended: a capability layer (multi-round capture rate, convergence round), an efficiency layer (number of effective actions per unit of budget, average inference and tool-call overhead), and a stability layer (variance across repeated experiments, false-positive rate). All matches should retain a reproducible evidence chain, including environment snapshots, call traces, and judgment rationale, to avoid “black-box scoring.”

    For data governance, match artifacts can be stored in object storage, a message queue can decouple round scheduling, a container platform can host isolated ranges, and logging services with monitoring and alerting can track anomalies and cost drift. These are all general cloud capability categories that can be combined on demand in environments such as Baidu AI Cloud.

    5. Engineering Implementation Checklist

    • Isolation first: each match runs in an independent sandbox with minimized network egress.
    • Controllable budget: set unified action and time limits for both attack and defense.
    • Reproducible judgment: version the judge logic and prohibit ad-hoc manual overrides.
    • Regenerable questions: keep the generators, not just the static questions.
    • Observable cost: track resource consumption per batch to prevent the evaluation itself from becoming a bottleneck.

    6. Conclusion

    The value of 466 matches lies not in producing a ranking but in proving one thing: security capability must be measured under adversarial conditions. Only by upgrading evaluation from “answering questions” to “co-evolution” can agents remain trustworthy in real-world offense and defense.