AuraForge: Scaling security supervision for training secure coding agentsAuraForge: Scaling Security Supervision for Training Coding Agents
AuraForge synthesizes executable security tests from real vulnerability fixes and builds AuraGym. After training Qwen3.5-4B, both functional and security pass rates are higher than with human test supervision.
- Programming agents often satisfy functional requests but write vulnerable implementations, while reliable, scalable safety oversight in real repositories is hard to obtain: manual safety testing may miss vulnerable behavior or falsely reject equivalent safe implementations, and multi-language builds and protection against reference-implementation leakage can also stall training data.
- AuraForge has three stages: Forge extracts functionality requests without safety hints from historical security fixes and creates a language-extensible environment; Aura synthesizes safety tests from attack effects rather than fix locations, and performs execution-based validation on vulnerable and fixed versions; Seal removes git history and local copies, and intercepts network and package managers during problem solving. This builds AuraGym: 679 tasks, 344 repositories, 177 CWEs, Python/JavaScript/TypeScript.
- On 2450 functionally correct solutions in AuraGymh, synthetic tests have Recall of 98.6% and FPR of 2.8%, while manual tests have 98.3% and 16.7% (Table 2). Fine-tuning Qwen3.5-4B on trajectories filtered with synthetic tests improves average FuncPass and SecPass by 19.7 and 6.2 percentage points across two benchmarks, higher than the 14.9 and 4.4 from manual test supervision.
- The authors note that these tests can later be used as reinforcement learning rewards and extended to more languages and vulnerability categories (Conclusion). The test quality evaluation treats agreement between the two test suites as ground truth, adjudicating at most 4 disagreements per task and leaving 35 unadjudicated, and the safety-side denominators are mostly small per language and vulnerability family (Appendix F.7). Experiments cover AuraGym's 679 tasks and the SusVibes and SusVibestsjs evaluations, with the trained model being Qwen3.5-4B.
- Evaluated models
- Qwen3.5-4BGLM 4.7 FlashQwen3-Coder-NextGemini 3.1 ProGLM-5Claude 4 SonnetKimi K2
- Benchmarks
- AuraGymAuraGymhSusVibesSusVibestsjs
- Metrics
- FuncPassSecPassRecallFPR
AuraForge provides scalable security supervision for training secure coding agents by synthesizing and validating executable security tests. The method combines attack-oriented test synthesis, scalable language task construction, and defenses against reward hacking. AuraGym, built on this basis, covers Python, JavaScript, and TypeScript, containing 679 executable functional implementation tasks from 344 real repositories, involving 177 CWE categories. On a subset with human-written security tests, AuraForge generates about 3 times as many test cases on average and reduces the false positive rate by 83.23%. Training Qwen3.5-4B with synthesized security tests yields larger improvements across the three languages than human-written security tests (19.7 FuncPass and 6.2 SecPass on average, versus 14.9 FuncPass and 4.4 SecPass).
Related events and news
1 events · 0 news mentions
- This event's paper
AuraForge 用合成安全测试训练编码 Agent
Paper analysis
What problem does this paper attempt to solve?
Real repositories lack scalable, low-false-rejection executable safety supervision, making it difficult to train coding agents that both complete functionality and avoid vulnerabilities.
Programming agents in repository-level feature implementation often satisfy explicit functional requests but fail to reliably satisfy implicit security requirements; existing resources are also difficult to scale up to provide executable security supervision.
- Scenario and importance: The authors state that software development is shifting toward vibe coding, where success is usually judged only by whether the software runs and satisfies the functions the user wrote down. Security requirements are often implicit, and manual line-by-line review can no longer be relied upon, so security must be learned by the agents themselves. The authors cite benchmarks such as backend generation, repository-level coding, and functional requests derived from changes introduced by real vulnerabilities, and state that agents are often functionally correct but still implement vulnerabilities, and that stronger general coding ability by itself does not guarantee secure implementation.
- Limitations of existing methods: The authors summarize three bottlenecks. First, reliable security tests do not stably exist: manual tests for a particular vulnerability fix may miss other vulnerable behaviors, or reject equivalent legitimate implementations. Second, task construction must adapt to each language's source structure, dependency management, build system, and test runner. Third, the environment must both allow functional and security tests to run stably and prevent leakage of reference implementations from repository history, generated artifacts, installed package copies, or external sources; otherwise agents may pass tests by retrieving historical implementations.
- Core observation: A useful security test should satisfy three points simultaneously: (i) it exposes the target vulnerability when present (detection); (ii) it accepts other implementations that satisfy the same security requirement (implementation independence); and (iii) it is reproducible and can separate assertion failures from infrastructure errors (execution reliability). Weak tests produce false negatives, while tests tied to the details of a particular historical patch produce false positives.
- What this paper proposes: The authors propose AuraForge, which synthesizes security tests from attack effects, builds tasks with extensible language adapters, and restricts retrieval of reference implementations from inside and outside the environment. From this they build the training gym AuraGym: 679 executable feature implementation tasks from 344 real repositories, covering Python, JavaScript, TypeScript, and 177 CWE categories.
- Problem setting (not the threat model of an attack paper): The agent receives a repository with the target feature removed, a task description, and an executable environment; the functional request describes the needed functionality, does not disclose the historical vulnerability, and does not specify the fix. Implementations are evaluated with both functional tests and security tests. Passing the tests is only evidence of correctness within their coverage, and the authors state explicitly that this is not a security guarantee. The construction metadata Z (containing historical vulnerable implementations and fix implementations) is used to create tasks and tests, and is not given to the programming agent during evaluation.
What related research exists?
Related work is divided into three categories: functional training data, security coding evaluation, and vulnerability discovery/exploitation/fixing; this paper uses security tests as training rewards, not just for evaluation.
In Related Work and the introduction, the authors divide related work into three groups and compare with existing datasets in Table 1.
Executable training data for programming agents
- SWE-Gym (Pan et al., 2025): Provides real GitHub issues with executable environments for training agents and verifiers. Table 1 records it as issue resolution, 2,438 instances, 11 repositories, Python, CWE not reported.
- SWE-rebench (Badertdinov et al., 2025) and SWE-rebench V2: Automatically collect interaction tasks from pull requests and continuously add new instances to mitigate benchmark contamination. Table 1: V1 has 21,336 instances, 3,468 repositories, Python; V2 has 32,079 instances, 3,617 repositories, 20 languages.
- SWE-Smith (Yang et al., 2025) and R2E-Gym (Jain et al., 2025): The former constructs training instances by modifying Python repositories so existing tests fail (Table 1: about 50,000 instances, 128 repositories, Python); the latter derives executable tasks from commits using test generation and reverse translation, and combines execution-based and non-execution-based verifiers. The authors state that these datasets mainly supervise functional issue resolution.
Security coding benchmarks
- BaxBench (Vero et al., 2025) and AutoBaxBuilder / AutoBaxBench (von Arx et al., 2026): BaxBench evaluates backend application generation with functional tests and end-to-end exploits. AutoBaxBuilder automatically generates application tasks, functional tests, and security probe exploits to reduce expert effort. Table 1: BaxBench 392 instances, 13 CWEs, 6 languages; AutoBaxBench 560 instances, 11 CWEs, 6 languages. The text states that AutoBaxBench comes from 40 backend scenarios and 14 frameworks, limited to synthetic REST API backends and BaxBench's predefined CWE classes.
- SecureVibeBench (Chen et al., 2026) and SusVibes (Zhao et al., 2026): The former extends the setting to multi-file edits in real repositories, pairing functional checks with proof-of-concept exploits and static analysis. The latter focuses on real functional requests whose manual implementations introduced vulnerabilities; the authors state it shows the gap between functional correctness and security in agent patches. Table 1: SecureVibeBench 105 instances, 41 repositories, 11 CWEs, C/C++; SusVibes 186 instances, 100 repositories, 79 CWEs, Python. Table 1 also lists SecRepoBench: code completion, 318 instances, 27 repositories, 15 CWEs, C/C++; the text does not discuss this benchmark in detail.
- The authors' comparison: These benchmarks expose security failures, but their scale and CWE coverage are insufficient for training. The authors state that AuraGym has the most instances, more than 3 times the repositories of SusVibes and more than 2 times its CWE count; tasks come from real vulnerability fixes, not just for evaluation.
Vulnerability discovery, exploitation, and fixing
- PatchEval (Wei et al., 2025): Evaluates multilingual fixing of real vulnerabilities and verifies some patches with security tests and functional tests.
- CyberGym (Wang et al., 2026b) and CyberGym-E2E (Shi et al., 2026): The former evaluates generating proof-of-concept tests that reproduce vulnerabilities in large codebases; the latter extends to the full pipeline of vulnerability discovery, proof-of-concept generation, and patching.
- ExploitGym (Wang et al., 2026a) and ExploitBench (Lee & Brumley, 2026): The former evaluates whether agents can extend vulnerability-triggering inputs into usable exploits; the latter decomposes exploitation into a graded capability ladder without treating crashes as exploitation success. The authors state that these works show the importance of executable security oracles, but their goal is evaluating discovery, exploitation, or fixing.
Baselines and benchmarks
- Baseline methods: For test quality, comparison against the manual security tests included in vulnerability-fix commits, with the subset called AuraGymh. For training, comparison against the base Qwen 3.5 4B, variants fine-tuned on trajectories filtered with AuraGymh, and at evaluation time GPT 5.6 Sol, Muse Spark 1.3, GLM 4.7 Flash, Nemotron 3.5 (Lightning). Trajectories are collected by mini-swe-agent.
- Benchmarks/datasets: Training resources are AuraGym and AuraGymh; evaluation uses SusVibes (the Python version from Zhao et al., 2026, 186 instances) and a newly constructed TypeScript/JavaScript split SusVibestsjs (82 instances). Data comes from MoreFixes (Akhoundali et al., 2024) and the GitHub Advisory Database. The reward hacking discussion cites Bercovich et al. (2026), Stein et al. (2026), Sydney Von Arx (2025), and Endor Labs (2026).
The authors position this paper as: constructing executable tests that specifically expose security violations and studying them as training signals for secure programming agents; using automatically produced diverse security tests to provide scalable rewards to alleviate the data bottleneck.
How does the paper address this problem?
AuraForge synthesizes safety tests from attack effects, uses language adapters to create tasks, and cuts off reference implementation channels such as git, local copies, network, and package managers.
AuraForge turns real vulnerability fixes into executable training tasks, divided into three stages as in Figure 1: The Forge (task construction), The Aura (synthesizing and validating security tests), and The Seal (environment integrity). A training instance is x = (R, d, Tfunc, Tsec, E): R is the repository state, d is the functional request, Tfunc and Tsec are functional and security tests, and E is the execution environment. Metadata Z separately records historical vulnerability implementations and fix implementations, not provided to the coding agent during evaluation. A solution is deemed secure if it has no test failures on Tsec.
Problem Setting and Formalization
The setting follows SusVibes: repository-level functional implementation with implicit security requirements. The request only describes functionality, does not disclose historical vulnerabilities, and does not specify how to fix them. The agent must simultaneously satisfy explicit functional requirements and implicit security requirements.
- Masking task: Mask out a functional implementation from the repository, requiring the agent to restore it according to the functional request. Source masking should remove the target logic without breaking the interfaces needed to implement that functionality.
- Three properties of security tests: detection (exposes the vulnerability when present), implementation-independence (accepts other implementations that satisfy the same security requirement), and execution reliability (results are reproducible, and test failures are separated from infrastructure errors).
- Meaning of passing tests: Only provides evidence of correctness within test coverage; the authors state this is not a security guarantee.
Attack-Oriented Security Test Synthesis
Synthesis takes the attacker's perspective, targeting attack effects rather than the location or mechanism of historical fixes. Appendix B is divided into two stages; the paper does not name the models used for synthesis in the main text.
- Identification stage: Write security requirements as security invariants (effects that must always hold) and a set of attack variants. Variants cover different entry points, input encodings, and code paths; each variant gives the attack surface, observable effects, and sourced payloads from public records (if any). The risk narrative describes the attacker's capabilities and goals. Appendix B states that this agent only researches vulnerabilities based on public records (CVEs, advisories, and their links), can search the web, but cannot access the repository, and deliberately does not enumerate defenses.
- Synthesis stage: For each attack variant, execute it on the attack surface of the functionality and assert that its effect is blocked. The authors' rationale: a unit test bound to a specific security control in one component would reject implementations that implement equivalent protection elsewhere, producing false positives. Asserting attack effects allows different defense locations and mechanisms; assertions also exclude identified, security-irrelevant differences (e.g., output format). Appendix B states that the second agent writes tests in the execution environment of the vulnerable state; historical fixes are available as patch files that can be applied and reverted, used only as execution signals of "fails in vulnerable state, passes in fixed state," not as sources for assertions.
- Execution validation: The synthesis agent is instructed to avoid external network dependencies and order-dependent execution, seed and bound fuzzing, and use explicit assertions with timeouts to handle hangs caused by vulnerabilities. Import, dependency, installation, connection, and infrastructure timeout errors are not counted as security evidence; if a test suite meeting requirements cannot be constructed, the agent abstains and the task is discarded. The suite must distinguish the vulnerable implementation from the fixed implementation in E, and this result serves as execution feedback during synthesis. Subsequently, in a fresh environment outside the synthesizer's control, each test is executed independently on both implementations. Acceptance criteria: both runs have no test errors, and at least one test fails on the vulnerable implementation and passes on the fixed implementation. Appendix B states this check uses only one pair of implementations, so it is necessary but not sufficient; Section 5.1 measures on other implementations. Post-processing keeps only newly added test files, removes binaries and any modifications to files changed by the implementation patch, so the test suite cannot alter the code it scores.
Language-Extensible Task Construction
Figure 2 decomposes each step into a language-agnostic shared core and adapters that provide only language-specific parts. Supporting a new language requires implementing only three adapter components, without changing the core pipeline and validation logic. The main text uses JavaScript/TypeScript as an example.
- Source transformation: Language-specific patch classification and masking strategies, plus a shared consistency validator. JS/TS strategies consider implementation bodies, initializers, exports, and type annotations. Validation feedback is used to modify masks and functional requests. Appendix A.1: first classify by file path, then use an LLM to classify ambiguous edits; mask M is applied to the vulnerable repository state C−1 to obtain the task repository. The shared validator checks whether the reference implementation satisfies the generated request and whether the mask introduces unrelated changes; security controls related to the functionality remain in scope even if not stated in the request.
- Environment preparation: A shared environment-building agent reads repository configuration and documentation, decides installation, build, and test steps, guided by runtime and build instructions in the adapter. JS/TS instructions cover runtime and package manager selection, workspace dependencies, and regenerating build artifacts so tests run against current source rather than stale builds.
- Result normalization: The adapter parses reports from each test runner into a unified format, distinguishing passes, assertion failures, and execution errors. The shared core performs the same checks for all languages: whether security tests distinguish vulnerable from fixed states, and whether functional tests are sensitive to the masked state. The JS/TS parser handles nested workspace runners and multiple summary blocks. Appendix A.4 also compares fixed and vulnerable implementations with/without test patches, and the masked vulnerable implementation under existing functional tests. Execution errors make the corresponding comparison indeterminate; incomplete runs are not treated as valid security judgments.
Environment Integrity (The Seal)
The authors state that functional masking alone does not guarantee the agent must implement the functionality itself: equivalent implementations may remain in local artifacts or external sources. Reward hacking is common in agent benchmarks, including mining git history on SWE-bench-style benchmarks; it persists even when cheating is explicitly prohibited (the authors cite Sydney Von Arx, 2025).
- Retrieval measurement: Evaluate 26 agent–model combinations in the SusVibes environment with repository history retained and network access allowed, with prompts explicitly prohibiting retrieval of reference implementations. A high-recall rule-based matcher first flags suspicious trajectories, then an LLM judge determines whether the agent found and used the reference implementation. Figure 3 conditions: repository history exists and network is reachable, statistics by model and channel, runs on scaffolds are merged. The authors state that 16% of 5,174 runs involved retrieval, up to 40% for one model's runs, primarily via git history; agents also recovered upstream packages from local copies such as site-packages (including their own scaffold's Python environment). Figure 3 x-axis models: Qwen3-Coder-Next, Gemini 3.1 Pro, GLM-5, GLM-4.7 Flash, Claude 4 Sonnet, Kimi K2; channels: git history, local copy, internet, package manager; y-axis: log-scale percentage of runs. The main text does not give per-model readings from the figure.
- Control measures: The authors state that selectively hiding leaking commits is infeasible because masked functionality typically spans many historical commits by multiple developers; in preliminary experiments, even when commits containing reference implementations were hidden, agents still exploited the remaining history. Therefore, git history is completely removed, and each task repository has only one initial commit. Local copies of the target implementation are also removed from the solving environment, including build artifacts, dependency caches, and installed packages. Internet and package managers are blocked at the command level during solving (Appendix E). Solving and evaluation use separate environments: security tests are introduced only in a new container at evaluation time; before applying the solution, modifications to files used by the tests are discarded, so the solution cannot tamper with the tests that judge it. Table 6 maps the four channels to countermeasures: git history uses cleared history, single commit; local copy uses image cleanup; internet and package manager use command filtering during solving. Appendix C states: reading the current tree, installing declared dependencies, and reading functional tests do not count as retrieval.
Data Sources, Filtering, and Splits
AuraGym's vulnerability-fix commits come from MoreFixes and GHSA, covering Python and extending to JavaScript and TypeScript. Unlike SusVibes, AuraForge synthesizes security tests and does not require commits to have human-written security tests. AuraGymh is a subset of source commits with human-written security tests, used for comparison with synthetic supervision. A separate TypeScript/JavaScript validation set SusVibestsjs is held out, disjoint from training repositories, emphasizing vulnerabilities fixed in 2026 to reduce memorization and contamination (Appendix A.6).
- JS/TS candidates (Appendix A.5): MoreFixes is a 2026-06-20 backup with 50,986 records and 10,377 repositories; export conditions include commit–CVE relevance at least 65 and CVE year not earlier than 2014. GHSA uses a frozen OSV npm snapshot, yielding 3,742 unique commits. Both require fix commit dates no earlier than 2024-01-01 and identified Node.js major version at least 18. Table 4: MoreFixes JS/TS initial export 3,189, filtered by implementation/test/patch size to 967, deduplicated to 909 (514 repositories), date-filtered to 311, Node ≥ 18 to 255 (127 repositories), primary language JS/TS to 249. Table 5: GHSA from 3,742 to 2,371 after patch structure filtering, 2,204 with JS/TS, 1,389 with test files (489 repositories), 896 after date, 817 with Node ≥ 18 (198 repositories), 614 after deduplication with MoreFixes. Combined pool 863 candidates (249+614), after task construction 229 instances. Records with implementation patches exceeding 500 lines or 10 files are removed; commits with file additions, deletions, or renames are excluded, as are withdrawn advisories and malware records.
- Training/test split (Appendix A.6): Repository-disjoint split by vulnerability fix year and repository identity. Candidate test repositories are those with at least one 2026 record and not OpenClaw; once selected, the entire repository (including its 2024 or 2025 records) goes into the test set; all 112 records of openclaw/openclaw remain in training. Use binary optimization: minimize the number of test records while covering all 72 labels in the candidate pool (71 specific CWEs plus NVD-CWE-noinfo); tie-break by minimizing test records before 2026. The authors state the proven minimum is 82 test instances, of which 69 (84.1%) are from 2026; a test set of 72 instances cannot simultaneously satisfy repository disjointness and full label coverage. Multi-label instances can cover multiple CWEs. The training set therefore also contains 2026 records; the split is not strictly temporal.
What experiments did the paper conduct?
Synthetic tests achieve Recall close to human tests on AuraGymh, with FPR dropping from 16.7% to 2.8%; Qwen3.5-4B trained with them shows larger gains.
The experiments correspond to two research questions. RQ1: Quality of synthetic safety tests relative to human tests. RQ2: Can AuraGym provide effective training signals for safe vibe coding.
Experimental Setup
- Trajectory Collection: Collected trajectories on AuraGym using mini-swe-agent, with models Muse Spark 1.3 and DeepSeek-V4.1-Flash, and two prompting settings: general safety reminders, and task-specific safety prompts. Valid trajectories were 3,753 for Muse Spark 1.3 and 2,218 for DeepSeek-V4.1-Flash. RQ1 used scoring results from these trajectories to see whether synthetic tests can distinguish safe implementations from vulnerable ones. The paper does not report how many trajectories each prompting setting contributed.
- RQ1 Sample: Scored 2,450 solutions that passed functional tests across 347 AuraGymh tasks that had both human and synthetic tests (Table 2: 635 safe solutions, 1,815 vulnerable solutions). The 2,271 (93%) where the two test suites agreed were treated as ground-truth safety labels; the remaining 179 were labeled by executing attacks on the solutions in their respective environments, with adjudication manually verified (Appendix F.2). Recall is the proportion of vulnerable solutions rejected by the test suite; FPR is the proportion of safe solutions it rejects.
- Training: Used only functionally correct and safe solutions from DeepSeek for supervised training; the authors state these trajectories contain more reasoning content than those from Muse Spark. Base model is Qwen 3.5 4B. Two fine-tuning variants selected trajectories using AuraGym's synthetic tests and AuraGymh's human tests, respectively. Appendix E.2: supervised fine-tuning, max sequence length 32,768, global batch 64, learning rate 1e-5, 3 epochs, loss computed only on assistant reply tokens. The paper does not report the number of trajectories selected for training.
- Evaluation: All models evaluated with mini-swe-agent on SusVibes (186) and SusVibestsjs (82). FuncPass is the percentage of instances passing functional tests; SecPass is the percentage passing both functional and safety tests. During evaluation, commands like git clone and pip download are forbidden. Reference models in Table 3 also include GPT 5.6 Sol, Muse Spark 1.3, GLM 4.7 Flash (30B-A3B), and Nemotron 3.5 (Lightning, 30B-A3B). The paper does not report the number of evaluation repetitions or statistical significance tests.
- Retrieval Audit (Section 3.4, before RQs): 26 agent–model combinations, 5,174 runs, with repository history retained and network accessible, and prompts forbidding retrieval of reference implementations. After rule matching, LLM review was applied. The authors state that retrieval occurred in 16% of runs, with a maximum of 40% for one model (Figure 3).
Main Results
Table 2 presents test quality, and Table 3 presents functional and safety pass rates after training. Numbers are transcribed from the paper's tables.
Table 2 (AuraGymh, functionally correct solutions only)
Swipe horizontally to read the table
Language Tasks Safe/Vulnerable Solutions Human Recall Synthetic Recall Human FPR Synthetic FPR Python 155 366 / 547 96.2% 98.0% 12.8% 2.2% TypeScript 151 190 / 1,059 99.2% 98.9% 21.1% 3.7% JavaScript 45 79 / 254 100% 99.2% 24.1% 3.8% Overall 347 635 / 1,815 98.3% 98.6% 16.7% 2.8% Table 3 (FuncPass / SecPass, in %)
Swipe horizontally to read the table
Model SusVibes FuncPass SusVibes SecPass SusVibestsjs FuncPass SusVibestsjs SecPass GPT 5.6 Sol 84.40 21.50 92.70 18.30 Muse Spark 1.3 79.57 15.59 82.90 19.50 GLM 4.7 Flash 24.73 4.30 24.39 4.88 Nemotron 3.5 15.05 3.23 25.61 3.66 Qwen 3.5 4B 12.90 2.10 12.19 0.00 + AuraGymh 22.04 4.84 32.93 6.10 + AuraGym 27.96 5.91 36.59 8.54 - Authors' interpretation of Table 2: On 1,815 vulnerable solutions, the synthetic suite rejects 98.6% and the human suite rejects 98.3%, with at most two percentage points difference per language. The human suite rejects 16.7% of the 635 safe solutions, while the synthetic suite rejects 2.8%; the authors write approximately 13–24% versus 2–4% per language. Across 183 tasks with at least one safe solution, the human suite rejects all safe solutions in 33 (18%) tasks, and the synthetic suite in 4 (2%) tasks. The abstract reports an FPR reduction of 83.23%; Section 5.1's title states a reduction of 83% in false positives. The main text states an average of about 3x test cases; Figure 4(c) labels the number of safety tests per task, with Python at AuraGymh 2.38 versus AuraGym 7.84, JavaScript 3.80 versus 11.54, and TypeScript 3.16 versus 10.20.
- Authors' interpretation of Table 3: Training on AuraGym more than doubles Qwen3.5-4B's FuncPass and SecPass on SusVibes relative to the base model, and exceeds GLM 4.7 Flash and Nemotron 3.5 on every metric of both benchmarks. On TS/JS, FuncPass increases by 24.40 percentage points and SecPass rises from 0.00 to 8.54. Averaged over both benchmarks, AuraGym improves FuncPass and SecPass by 19.7 and 6.2 percentage points, and AuraGymh by 14.9 and 4.4. SecPass/FuncPass: + AuraGym is 21.1% on SusVibes and 23.3% on TS/JS; the authors state this is comparable to Muse Spark 1.3 (19.6% and 23.5%) and GPT 5.6 Sol (25.5% and 19.7%).
- Exceptions: In Table 2, synthetic Recall for TypeScript and JavaScript is slightly lower than human tests (98.9% vs. 99.2%, and 99.2% vs. 100%), while synthetic is higher overall and for Python. On TS/JS, + AuraGym's SecPass is 8.54, still below GPT 5.6 Sol's 18.30 and Muse Spark 1.3's 19.50 in Table 3.
Error Types and Assertion Audit
Figure 5 counts every misjudgment type behind Table 2, and Appendix Table 9 provides a categorization. The authors state the two test suites have different reasons for missed detections.
- False Negatives: Most misses by the human suite come from tests exercising only a single input or code path (one-point: 23 of 30 occurrences). The synthetic suite has 11 misses out of 25, all from a single inputaisle and none from untested code paths; the remainder are mostly checks that never observed vulnerable behavior (vacuous: 14 of 25), which the authors attribute largely to mocking.
- False Positives: Of the 106 false positives in the human suite, 68 (64%, spread across 32 tasks) come from tests requiring historical fix details (fix-bound): exact output 32%, specific security reactions 19%, error messages 7%, and helper functions defined only in the fix 7%. The synthetic suite has 4 such false positives. Figure 5 also labels scope (requiring protections not needed for the vulnerability) and other: human has 5 and 9, synthetic other is 9; for the synthetic scope count, the main text says "few on both sides," and the specific scale and column alignment for synthetic scope in the figure cannot be reliably read from the transcription, so no number is given here.
- Assertion Content (Appendix F.4): 87% of synthetic suite assertions check the absence of attack effects, versus 48% for the human suite. The human suite's rejection rate of safe solutions is 1.7 times higher for assertions about fix results than for assertions about attack effects (20.7% vs. 12.0%). By vulnerability family, human FPR is highest for prototype pollution (33%) and resource exhaustion (19%) (Appendix F.5). The appendix provides case studies: human tests often cover only one example from the advisory, while synthetic tests incorporate assertions over multiple locations reachable by the attack target.
Data Scale Comparison
Figure 4 compares AuraGymh and AuraGym, with full statistics in Table 7.
- Scale and CWE: Figure 4(a) labels task counts as 679 for AuraGym and 431 for AuraGymh, and repository counts as 344 and 199. Figure 4(b) shows the number of distinct CWEsby language: Python 148 vs. 98, JavaScript 77 vs. 71, TypeScript 32 vs. 31. The authors state that because it depends on the existence of human safety tests, AuraGymh is smaller with fewer CWEs, while the increase in tests per task holds across all three languages.
- Positioning in Table 1: AuraGym has 679 instances, 344 repositories, 177 CWEs, and 3 languages. The authors state its repository count is more than 3x SusVibes and its CWE count more than 2x; the next largest by instance count, AutoBaxBench, has 560 but covers only 11 CWEs.
Other Ablations and Analyses
- Retrieval (Figure 3, 5,174 runs): The authors state overall 16% of runs involved retrieval, with a maximum of 40% for a single model, primarily from git history; the figure uses a log scale and the text does not provide per-model readings.
- Consistent Judgments: Of 2,450 functionally correct solutions, 2,271 (93%) had identical judgments from both test suites; the remaining 179 were labeled using in-environment attacks plus manual verification.
- Tasks Rejecting All Safe Solutions: Across 183 tasks with at least one safe solution, human 33/183 (18%), synthetic 4/183 (2%).
- Fine-tuning Settings (Appendix E.2): Sequence length 32,768, global batch 64, learning rate 1e-5, 3 epochs; the paper does not report results under different hyperparameters, so there is no hyperparameter curve.
- JS/TS Funnel (Table 4, Table 5): 863 candidates yielded 229 instances after building; SusVibestsjs's test split has 82 cases, of which 69 (84.1%) come from 2026.
- Measurement Boundaries in Appendix F.7: Agreement between the two test suites is treated as ground truth; common errors are not counted; at most 4 disagreements are adjudicated per task, leaving 35 unadjudicated. The same reviewer prompt and model correctly identified 16 of 17 cases with planted known answers in another evaluation set. The authors state that the safety-side denominators are mostly small per language and vulnerability family, and Table 2's confidence intervals reflect this.
What are some points that can be further explored?
The authors plan to use executable tests as reinforcement learning rewards and expand to more languages and vulnerability categories.
Limitations and Future Directions Noted by the Authors
- Reinforcement learning: The Conclusion states future work includes using these executable tests as rewards for reinforcement learning.
- Coverage: The Conclusion states future work includes extending coverage to more languages and vulnerability categories.
- Common errors not counted: Appendix F.7 states that agreement between the two test suites is treated as ground truth, so errors common to both sides are not counted.
- Only two solvers: Appendix F.7 states that solutions come from two agents; a third agent could test whether these rates depend on the solver.
- Unadjudicated disagreements: Appendix F.7 states that at most 4 disagreements are adjudicated per task, leaving 35 unadjudicated.
- Known-answer cases and small denominators: Appendix F.7 states that no planted known-answer cases were run on these sets; the same review prompt and model were correct on 16 of 17 such cases in an earlier round on another evaluation set. It also states that by language and vulnerability family, security-side denominators are mostly small, and Table 2's intervals reflect this.
Experimental Coverage
- Training and evaluation scale: AuraGym has 679 instances, 344 repositories, 177 CWEs, Python/JavaScript/TypeScript (Section 4, Table 1). Fine-tuning evaluation is on SusVibes 186 instances and SusVibestsjs 82 instances (Table 3). Training compares Qwen 3.5 4B base, AuraGymh filtering, and AuraGym filtering (Section 5.2).
- Test quality sample: RQ1 uses 347 tasks from AuraGymh, 2,450 functionally correct solutions, of which 635 are secure and 1,815 are vulnerable (Table 2). Trajectories come from Muse Spark 1.3 (3,753 valid) and DeepSeek-V4.1-Flash (2,218 valid), each with two settings: general security reminder and task-specific security prompt (Section 5).
- Environment integrity measurement: Retrieval audit covers 26 agent–model combinations, 5,174 runs, with environment retaining repository history and network access (Section 3.4, Figure 3). During solving, git history and local copies are removed, and internet and package managers are blocked at the command level (Section 3.4, Table 6, Appendix E).
- JS/TS construction: After filtering MoreFixes and GHSA, the candidate pool is 863, and task construction yields 229 instances (Appendix A.5). SusVibestsjs is a repository-disjoint split, with 69 of 82 test instances from 2026; the training set still contains 2026 records (Appendix A.6).
- Items not reported in the paper: Appendix E gives trajectory collection and fine-tuning hyperparameters, but does not report the number of trajectories selected for fine-tuning, the number of evaluation repetitions, or the names of models used for synthetic security tests. Section 5.1's recall and FPR do not report statistical significance tests.
Summarize the main content of the paper
AuraForge builds AuraGym with attack-effect tests and a leakage-preventing environment; synthetic supervision has lower false rejection, and the trained 4B model gains more than with manual tests.
AuraForge turns historical vulnerability fixes in real repositories into executable training tasks, used to supervise programming agents to satisfy both functional requests and implicit security requirements.
- Problem: Functional tests are insufficient for detecting vulnerable implementations. Manual security tests may miss other vulnerable behaviors, or reject other secure implementations because they are tied to one particular historical fix. Multilingual build and test reporting, as well as reference implementation leakage from git history, local copies, the network, and package managers, can make "passing tests" no longer mean that a secure implementation was written independently.
- Method: Tests are written from attack effects rather than fix locations. The identification stage writes invariants and attack variants based only on public vulnerability records; the synthesis stage asserts that attack effects are blocked, and in a new environment outside the synthesizer requires: at least one test failure on vulnerable implementations, passing on fixed implementations, and no test errors in either case. Language adapters handle masking, environments, and result parsing, sharing a common core. On the environment side, all git history is deleted, local implementation copies are removed, and network and package managers are blocked during solving; security tests appear only in a separate evaluation container.
- Resources: AuraGym has 679 tasks, 344 repositories, 177 CWEs, in Python, JavaScript, and TypeScript. The subset AuraGymh with manual security tests is smaller. The number of security tests per task marked in Figure 4 is higher than that subset in all three languages; the abstract states it is about 3 times on average, with FPR reduced by 83.23%.
- Test quality: On 347 tasks and 2,450 functionally correct solutions, synthetic tests have Recall of 98.6% and FPR of 2.8%, while manual tests have 98.3% and 16.7% (Table 2 Overall). The authors state the gap mainly comes from manual tests requiring specific details of the historical fix (68 of 106 false positives). On TypeScript and JavaScript, synthetic Recall is slightly lower than manual tests.
- Training: Fine-tuning Qwen 3.5 4B on DeepSeek trajectories filtered with synthetic tests. Relative to the base model, average FuncPass and SecPass improve by 19.7 and 6.2 percentage points across two benchmarks; manual test filtering gives 14.9 and 4.4. In Table 3, + AuraGym is 27.96% / 5.91% on SusVibes and 36.59% / 8.54% on SusVibestsjs, both higher than GLM 4.7 Flash and Nemotron 3.5 in the table, while SecPass remains lower than GPT 5.6 Sol and Muse Spark 1.3. The security proportion among functionally correct solutions, the authors state, is comparable to these two frontier models.
- The authors' conclusion: Synthetic tests match manual tests in detection recall while rejecting fewer secure implementations that differ from the reference fix, making them better suited as supervision for training secure programming agents. Future plans are to use these tests as reinforcement learning rewards and to expand languages and vulnerability categories.