RustMizan: A Compilable, Contamination-Aware Benchmarking Framework for Rust Vulnerabilities
Listen
Radio episode about this paper
Transcript
Introduction to the show: ident: Security Radio. Generated commentary on the latest security and cryptography papers.
Nadia: We're looking at the paper: "RustMizan: A Compilable, Contamination-Aware Benchmarking Framework for Rust Vulnerabilities".
Paper summary: Nadia: So we're talking about this paper called "RustMizan: A Compilable, Contamination-Aware Benchmarking Framework for Rust Vulnerabilities". Basically the idea is that right now AI agents are being used to check code for security holes but the testing tools we have just aren't up to speed.
Elias: Exactly. Existing benchmarks are usually stuck on these small non-compilable snippets and they only do a binary classification, meaning vulnerable or not vulnerable, and they completely miss the risk that the data used for training might actually be from a model that was trained on some public code repositories.
Priya: That’s a big problem because it means we don't know if the AI is actually learning to find real bugs or just memorizing patterns from its training set, which is what contamination testing is about.
Nadia: Right, and RUSTMIZAN steps in by building a whole framework for Rust vulnerability analysis that fixes those gaps. The core of this paper is introducing three main design principles to make the evaluation way more thorough than what we had before.
Elias: Those three principles are multi-task evaluation, which supports four different tasks like classifying the binary vulnerability, figuring out the CWE classification, and then doing localization at both the function and line level.
Priya: And they also have these multi-level compilable variants, meaning you can test at different levels of detail: you can check a whole crate or package level, a single file level, or even just a function level.
Nadia: That lets researchers control how granular the study is and see exactly what context the AI needs to give it for good localization. Plus, they’ve built in this mutation framework to test for contamination by creating code mutants that preserve meaning while introducing changes like renaming variables or adding misleading comments.
Elias: And they also have robustness testing against adversarial cues, which means testing how the models handle things like misleading comments or identifier renames that try to trick them. They are looking at forty-two CVEs manually curated and annotated across these different levels and tasks too <ref:2607.04729#pg3>.
Priya: That's a lot of ground truth data to work with, but what we need to know is how well the LLM agents actually perform on those specific localization tasks compared to older methods.
Nadia: Well, the evaluation showed that when we look at four frontier models using an agentic setup for binary classification, they are performing in a range of fifty six to sixty five percent accuracy.
Elias: But when you get into line localization F1 scores, those drop off significantly to about twenty percent. And if you introduce adversarial cues like those misleading comments or identifier renames, that line localization F1 drops by about twenty seven percent.
Priya: That drop is pretty concerning because it shows the models aren't robust when their input is slightly altered in a way that mimics real-world noise or even subtle trickery.
Paper summary: Nadia: Function level context seems to substantially improve vulnerability localization, which suggests that giving the agent more surrounding code makes it much better at pinpointing where the bug actually is.
Elias: And they also found that things like misleading comments and identifier renames cause about twenty seven percent relative drop in line localization F1, which means those specific types of changes really hurt performance there.
Priya: It sounds like the framework is showing us that just knowing *if* something is vulnerable isn't enough; we need to know *exactly* where it is and be careful about how noisy the input context can be.
Nadia: Exactly. And they also found that under benign or Rust-specific mutations, there wasn't a comparable drop in performance, which suggests no big evidence of contamination at this point for those types of changes.
Elias: That’s interesting because it contrasts with what we see when you look at fine-tuned models; those actually show significantly better line localization F1 by forty seven to seventy two points under benign mutations.
Priya: So the framework helps separate the contamination risk from the actual reasoning ability of the model, which is a valuable distinction for anyone trying to deploy these tools safely.
Nadia: Then there's this part where they tested malicious mutations and found a consistent effect across all four models, causing line localization F1 to drop by five point six on average.
Elias: That consistent drop tells us that the agents are susceptible to adversarial cues like those misleading comments and identifier renames, because the performance degradation is predictable regardless of which model you use.
Priya: So what this means for a developer using an AI agent, it means they can't just trust the output blindly when dealing with complex Rust code unless they specifically test for these kinds of adversarial inputs.
Nadia: And finally, RUSTMIZAN’s multi-level variants allow you to evaluate these agents not just with LLMs but also with traditional program analysis tools like Kani and RAPx.
Elias: That's a big compatibility win because it shows the framework isn't just theoretical; it’s genuinely compilable and works alongside real analysis tools that actually require compilation to run.
Priya: It opens up the door for using these evaluation methods with a wider range of security testing infrastructure, which is important for making this research practical.
Nadia: Overall, the paper "RustMizan: A Compilable, Contamination-Aware Benchmarking Framework for Rust Vulnerabilities" provides a template that other languages can adopt to benchmark vulnerability analysis in a way that accounts for contamination and robustness.
Elias: It really addresses the gap where existing benchmarks were too small and didn't consider the real risk of training data leakage.
Priya: And it gives us much clearer metrics on what actually matters, like how function context helps with localization, which is a practical piece of knowledge for anyone working on AI in security.
Conclusion: Nadia: So, after looking at all this testing they did on RustMizan, what does that actually mean for how we use AI to check security?
Elias: It means they built a proper setup for checking Rust code, not just quick tests. They focused on making sure the AI isn't just guessing if something is bad.
Priya: But they also looked at contamination, which is a big deal because it tests whether the AI is actually learning to find bugs or just memorizing patterns from training data.
Nadia: Right, and their results show that when you test against those tricky adversarial inputs, like misleading comments or renamed variables, the performance drops consistently across all four models.
Elias: That consistent drop tells us that these agents are really susceptible to those kinds of subtle tricks in the code. They aren't totally immune to being fooled by noise in the input.
Priya: It shows that if you’re relying on an AI agent for vulnerability analysis, you can’t just trust the output without knowing how robust it is against those specific types of noise.
Nadia: And they showed that getting function level context helps a lot with pinpointing where a vulnerability actually is in the code. That's a practical thing we can use right now.
Elias: It points to needing more surrounding code when you ask an agent to localize a problem; the agent needs more than just the line it's focused on.
Priya: So, RUSTMIZAN is positioning itself as this template for how we should be benchmarking these tools moving forward. It’s about being more rigorous with what we expect from them.
Simon Fraser University · Trinity University · Microsoft Research
cs.CR, cs.AI, cs.SE
Submitted: 2026-07-06
Updated: 2026-12-01
Comments: 52 pages, 7 figures, NeurIPS'26 Evaluations and Datasets Track
Code: https://github.com/UKGovernmentBEIS/inspect_ai
Project page: https://sfu-rsl.github.io/rust-mizan/Abstract
License: http://creativecommons.org/licenses/by/4.0/
Importance score: 100/100
The gist: LLM agents are increasingly applied to vulnerability analysis, but existing benchmarks have not kept pace.<ref:2607.04729#pg1,existing benchmarks have not kept pace>.
Key concepts
- Multi-task Evaluation
- This involves testing models on several related tasks simultaneously, such as classifying a binary vulnerability and precisely locating the exact line of code where the vulnerability exists. It allows researchers to see how well an agent handles different aspects of vulnerability analysis in one test run.
- Multi-level Compilable Variants
- RUSTMIZAN allows testing at different levels of code granularity: crate, file, and function. This lets researchers control how much context the LLM receives, helping determine if providing more detailed structural information improves the accuracy of vulnerability localization.
- Contamination Mitigation
- This tests whether an AI model is truly reasoning about the code or just memorizing training data. The framework uses automated semantics-preserving mutants to check for reliance on memorization rather than actual code understanding.
Terminology
Summary
LLM agents are increasingly applied to vulnerability analysis, but existing benchmarks have not kept pace. p. 0 Ko1
1Simon Fraser University 2Trinity University 3Microsoft Research 4Amii
https://sfu-rsl. io/rust-mizan/
Abstract
LLM agents are increasingly applied to vulnerability analysis, but existing benchmarks have not kept pace. Ko1
1Simon Fraser University 2Trinity University 3Microsoft Research 4Amii
https://sfu-rsl. io/rust-mizan/
Abstract
LLM agents are increasingly applied to vulnerability analysis, but existing benchmarks have not kept pace. They typically rely on small non-compilable snippets,
focus on binary classification (vulnerable or not), and do not account for the risk
that publicly-released datasets are part of model training corpora. We introduce
RUSTMIZAN, a benchmarking framework for Rust vulnerability analysis that addresses these gaps. They typically rely on small non-compilable snippets,
focus on binary classification (vulnerable or not), and do not account for the risk
that publicly-released datasets are part of model training corpora. We introduce
RUSTMIZAN, a benchmarking framework for Rust vulnerability analysis that addresses these gaps.Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Framework Design and Principles
RUSTMIZAN is designed around three core principles to enhance its evaluation capabilities.<ref:2607.04729#pg2>. These include multi-task evaluation, which supports four complementary tasks such as binary vulnerability classification and line-level localization. p. 1 , 2025]:
1. Multi-task evaluation: RUSTMIZAN supports four complementary tasks—binary vulnerability
classification, CWE classification, function-level localization, and line-level localization, covering
the pipeline from detection to precise diagnosis. Multi-task evaluation: RUSTMIZAN supports four complementary tasks—binary vulnerability
classification, CWE classification, function-level localization, and line-level localization, covering
the pipeline from detection to precise diagnosis. Multi-level compilable variants: For each vulnerability, RUSTMIZAN constructs a family of
compilable program variants at three context levels: crate-level (entire Rust package), file-level
(the file containing the vulnerability and required dependencies), and function-level (the vulnerable
function and required dependencies). Built-in support for contamination mitigation and robustness testing: RUSTMIZAN provides
automated semantics-preserving code mutants that test whether models rely on memorization
rather than code reasoning. RUSTMIZAN also provides code mutants that test how models behave
against adversarial cues such as misleading comments.Where the paper says it
Where the paper says it
Where the paper says it
Evaluation Results on Frontier Models
When evaluating four frontier models in an agentic setup, binary classification sits in the 56–65% range.<ref:2607.04729#pg1,Across four frontier models in an agentic setup with commandline access, binary classification sits in the 56–65% range>. p. 0 A paired mutation framework produces semantics-preserving code mutants for contamination testing and
robustness probing. Across four frontier models in an agentic setup with commandline access, binary classification sits in the 56–65% range, but line localization F1
stays near 20%, and adversarial cues drop line F1 by about 27%. A paired mutation framework produces semantics-preserving code mutants for contamination testing and
robustness probing. Across four frontier models in an agentic setup with commandline access, binary classification sits in the 56–65% range, but line localization F1
stays near 20%, and adversarial cues drop line F1 by about 27%. A paired mutation framework produces semantics-preserving code mutants for contamination testing and
robustness probing. Across four frontier models in an agentic setup with commandline access, binary classification sits in the 56–65% range, but line localization F1
stays near 20%, and adversarial cues drop line F1 by about 27%. How does code context granularity affect analysis accuracy? Function-level context (the
most narrow context) substantially improves vulnerability localization (Section 3. Are models robust to adversarial cues? Misleading comments and identifier renames cause
about a 27% relative drop in line localization F1, showing that models follow these cues rather
than grounding analysis in code semantics (Section 3.Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Contamination Mitigation Validation
The framework's mutation framework is designed to test whether models rely on memorization rather than code reasoning.<ref:2607.04729#pg5>. Results show no comparable drop in performance under benign or Rust-Specific mutations, suggesting no aggregate evidence of contamination at this point. p. 7 , 2025a, Wu et al. We
observe no comparable drop here, which suggests no aggregate evidence of contamination at this
point. , 2025a, Wu et al. We
observe no comparable drop here, which suggests no aggregate evidence of contamination at this
point. We have
fine-tuned three open-source models on the Vanilla dataset, and repeated the same experiment. Our
results show that fine-tuned models report significantly better Line F1 by 47–72 points, but both
Benign and Malignant mutations suppress Line F1 by 44–77 points, confirming that our mutations
can effectively mitigate contamination.Where the paper says it
Where the paper says it
Where the paper says it
Robustness to Adversarial Cues
Malignant mutations produce a consistent effect across all four models, causing line localization F1 to drop by 5.6 points on average. p. 7 The Mean ∆ row shows that Benign and Rust-Specific
mutations leave Line F1 essentially unchanged, while Malignant drops it by 5. 6 points on average. 4, and GPT by
3. The degradation indicates that the agents are susceptible to adversarial cues such as misleading
comments and identifier renames. 4, and GPT by
3. The degradation indicates that the agents are susceptible to adversarial cues such as misleading
comments and identifier renames.Where the paper says it
Where the paper says it
Where the paper says it
Tool Compatibility and Impact
RUSTMIZAN's multi-level variants enable evaluation with traditional program analysis tools like Kani and RAPx.<ref:2607.04729#pg11>. The framework demonstrates that Mizan’s variants are genuinely compilable and compatible with real program analysis tools. p. 1 These three variants for each vulnerability are all standalone,
compilable programs that preserve the same vulnerability at three different levels. Compilability
enables evaluation with traditional program analysis tools (e. Since it is the same vulnerability at different levels, any performance difference
is due to context, not the vulnerability being harder or easier. Third, they enable the evaluation of
traditional (non-LLM) program analysis tools that require compilation, such as static analyzers that
operate on compiler intermediate representations. Broader impact: Rust is increasingly used in safety-critical infrastructure such as kernels, browsers,
and cryptography, and reliable evaluation of LLM agents on real Rust vulnerabilities helps maintainers
and reviewers triage and prioritize issues with greater confidence. More broadly, RUSTMIZAN offers
a template for vulnerability-analysis benchmarks that other languages can adopt, so the community
measures analysis capability rather than benchmark memorization. Broader impact: Rust is increasingly used in safety-critical infrastructure such as kernels, browsers,
and cryptography, and reliable evaluation of LLM agents on real Rust vulnerabilities helps maintainers
and reviewers triage and prioritize issues with greater confidence. More broadly, RUSTMIZAN offers
a template for vulnerability-analysis benchmarks that other languages can adopt, so the community
measures analysis capability rather than benchmark memorization. Broader impact: Rust is increasingly used in safety-critical infrastructure such as kernels, browsers,
and cryptography, and reliable evaluation of LLM agents on real Rust vulnerabilities helps maintainers
and reviewers triage and prioritize issues with greater confidence. More broadly, RUSTMIZAN offers
a template for vulnerability-analysis benchmarks that other languages can adopt, so the community
measures analysis capability rather than benchmark memorization.Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Conclusion and Broader Impact
The paper concludes by observing a clear gap between detecting vulnerabilities and pinpointing them, noting that function-level context substantially helps localization.<ref:2607.04729#pg10>. RUSTMIZAN supports further work on agent-based vulnerability analysis and on benchmarking practices that account for contamination and robustness. p. 9 comments and identifier renames drop line localization F1 by about 27%. We hope RUSTMIZAN
supports further work on agent-based vulnerability analysis and on benchmarking practices that
account for contamination and robustness. Broader impact: Rust is increasingly used in safety-critical infrastructure such as kernels, browsers,
and cryptography, and reliable evaluation of LLM agents on real Rust vulnerabilities helps maintainers
and reviewers triage and prioritize issues with greater confidence. More broadly, RUSTMIZAN offers
a template for vulnerability-analysis benchmarks that other languages can adopt, so the community
measures analysis capability rather than benchmark memorization.Where the paper says it
Where the paper says it
Green — the paper says it, and the page is printed. Red — no passage carries it, so treat that sentence as unverified. The same check runs on your own text: check a summary against its source, $5.
Improvements for AI systems
-
Multi-task evaluation enables models to perform across an entire vulnerability analysis pipeline including detection, CWE classification, function-level localization, and line-level localization. This allows agents to move beyond simple binary classification to provide precise diagnoses such as
which functions are vulnerable
andwhich lines are vulnerable.
-
Multi-level compilable variants allow evaluation with traditional program analysis tools like static analyzers and fuzzers alongside LLM agents. This lets researchers study
how context granularity affects analysis accuracy,
specifically comparing performance across crate, file, and function levels to understand the trade-off between input scope and precision. -
Built-in support for contamination mitigation allows models to be tested against memorization by applying semantics preserving code mutants like formatting changes or variable renaming. This directly addresses the risk that
publicly-released datasets are part of model training corpora
by testing whether modelsrely on memorization rather than code reasoning.
-
The framework enables robustness testing against adversarial cues, such as misleading comments and identifier renames, by injecting malign mutations. This allows for the study of how agents behave against
misleading signals,
showing a measurable drop in line localization F1 when models fail to ground analysis in code semantics. -
Agentic evaluation with commandline access permits models to
compile, explore, and interact with the code
rather than just analyzing snippets. This capability is crucial for studying how interactive vulnerability analysis works in practice, allowing agents to use tools like Cargo and file explorers during reasoning steps.
Abstract
LLM agents are increasingly applied to vulnerability analysis, but existing benchmarks have not kept pace. They typically rely on small non-compilable snippets, focus on binary classification (vulnerable or not), and do not account for the risk that publicly-released datasets are part of model training corpora. We introduce RustMizan, a benchmarking framework for Rust vulnerability analysis that addresses these gaps. RustMizan contains compilable code variants at the crate, file, and function levels, with annotations for binary vulnerability detection, CWE classification, and function- and line-level localization. A paired mutation framework produces semantics-preserving code mutants for contamination testing and robustness probing. Across four frontier models in an agentic setup with command-line access, binary classification sits in the 56-65% range and line localization F1 is near 20%. Adversarial cues reduce mean line F1 by about 27%. With low or high reasoning effort, Opus achieves about 40% line F1 on the 95 vulnerable variants. The original models achieve 24-30% on the same subset.
Sources
- Code Benchmarks Should Prioritize Rigor, Reliability, and Reproducibility
- Reasoning Models Don't Always Say What They Think
- LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Code
- Evaluating and Improving Automated Repository-Level Rust Issue Resolution with LLM-based Agents
Related papers
- Introducing the Generative Application Firewall (GAF)
- Opal: Private Memory for Personal AI
- Fuel as Identity: Authenticating Inter-Satellite Laser Links after Total Key Compromise
- Merkle Trees Minimize Verifier Complexity in the ROM
- VulCPE: Context-Aware Cybersecurity Vulnerability Retrieval and Management
- Node Differential Privacy via Node-Stable Graph Projections