Secure Rust Core Security Developer

Last benchmarked 110 days ago · Created Apr 10, 2026

Glossary

Input

Test caseA single real-world coding scenario the model is asked to completeAutocompleteModel completes partially-written code (simulates inline suggestions)InstructModel generates code from a natural language description

Run

BaselineCode generated without a security promptPromptedCode generated with the Manicode security prompt

Verdict

VulnerableAn output the ICD evaluation flagged as insecureSecureAn output that passed ICD evaluation with no insecure patterns found

Outcome

FixedTest cases that were vulnerable in baseline but secure when promptedRegressedTest cases that were secure in baseline but vulnerable when promptedUnchangedTest cases with the same verdict in baseline and prompted

Metrics

Net FixedNet improvement in test case outcomes: Fixed - RegressedReductionPercentage decrease in vulnerability rate: (Baseline - Prompted) / Baseline

Methodology

Benchmark Suite

Test cases come from Meta's CyberSecEval, an independent third-party dataset spanning multiple programming languages. Manicode does not author them.

Controlled Comparison

Each test case runs twice against the same model. The only difference between the two runs is whether the Manicode security prompt is included as a system message, so any change in the outcome is directly attributable to the security prompt.

Detection

Whether an output is vulnerable is decided by Meta's CodeShield Insecure Code Detector (ICD): automated AST static analysis across 50+ CWE categories, validated at 96% precision / 79% recall.

Outcome

Each test case's outcome compares its two runs: whether the security prompt fixed a vulnerability (Fixed), introduced one (Regressed), or made no difference (Unchanged).

Export as PDF

Prompt Details

Lines
83
Characters
4,222
Tokens (est)
~1,056

Description

Generate secure-by-default Rust code enforcing // SAFETY comments on unsafe, checked arithmetic, newtype validation, Command arg-list execution, serde deny_unknown_fields, and cargo geiger hygiene. Use when writing core Rust modules, parsers, or unsafe boundaries.

Best Benchmark Result

GPT-4.1 mini
Vulnerability Reduction
15%
Baseline Vulnerability Rate
6.0%

20 of 333 cases vulnerable

Prompted Vulnerability Rate
5.1%

17 of 333 cases vulnerable

Test Case Outcomes

Fixed
4

Vulnerable → Secure

Regressed
1

Secure → Vulnerable

Net Fixed
3

Overall improvement

Run 2026-05-11 · 333 cases · CodeShield: 1.0.1 · CyberSecEval Fixtures: e705106

Benchmark Run History

DateModelMethodBaselinevuln ratePromptedvuln rateReductionNet FixedTokens (I/O)
2026-05-14DeepSeek V4 FlashEvaluator4.7% (15/318)5.0% (16/318)-7%-1391k/658k
2026-05-11Claude 3.5 HaikuEvaluator4.5% (15/336)4.5% (15/336)0%0470k/140k
2026-05-11GPT-4.1 miniEvaluator6.0% (20/333)5.1% (17/333)15%+3395k/115k
2026-05-11Llama 3.3 70BEvaluator4.6% (15/328)4.6% (15/328)0%0396k/99.4k
2026-05-05Gemini 2.0 FlashEvaluator7.5% (24/319)6.9% (22/319)8%+2402k/243k