← Lab /Security & privacy

AntiAgent cuts LLM vulnerability detection by up to 60.7% while preserving semantics

AntiAgent reduces the number of vulnerabilities detected by LLM agents by 52.0-60.7% on real JavaScript programs

Security & privacy arXiv 19 Nov 2026 Defense Prototype evidence

Published as “Hardening JavaScript Programs against LLM-Based Vulnerability Detection”

Why it matters

Developers can harden released JavaScript code against cheap LLM-based scanning with modest performance cost, but must accept that some vulnerabilities remain detectable and false-positive rates increase.

Summary

ANTIAGENT cuts the number of vulnerabilities that four LLM-based detection agents find by 52.0-60.7% while preserving all program tests and adding only modest overhead (1.11× runtime, 1.37× size). The evidence comes from a 40-application real-world JavaScript dataset evaluated against Codex, Claude Code, ZCode, and OpenAnt. The paper reports lower precision and that each agent still finds a quarter to half of the vulnerabilities, so the defense is not complete.

What they found 2

  1. ANTIAGENT reduces detected vulnerabilities by 52.0-60.7% across four agents

    “ANTIAGENT reduces the number of vulnerabilities that the four agents detect by 52.0-60.7%, more than JS-Obfuscator [21] and FPA [22] on every agent.”

  2. All project tests pass after transformation, unlike baselines

    “The transformed programs pass all project tests, whereas JS-Obfuscator and FPA pass only 88.46% and 68.52% of the tests, respectively.”

Caveats 4

  • Under ANTIAGENT, each agent still reports between roughly a quarter and a half of the ground-truth vulnerabilities (Table 2(a)).
  • Precision drops, with ANTIAGENT yielding the lowest precision on every agent (32.3-58.8%).
  • ANTIAGENT does not hide every vulnerability.
  • Under ANTIAGENT, each agent still reports between roughly a quarter and a half of the groundtruth vulnerabilities (Table 2(a)).

What’s new here 4

  • Discovers code-transformation rules via evolutionary search rather than using fixed obfuscation patterns.
  • Applies rules dynamically with an LLM selector to each program, preserving semantics across diverse vulnerability types.
  • Demonstrates cross-language applicability by porting rules to Python.
  • Shows lower runtime and size overhead compared to conventional obfuscators.