Secure PHP 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,551
Tokens (est)
~1,138

Description

Generate secure-by-default PHP 8.x code with strict_types, === comparisons, safe unserialize/JSON, file inclusion allowlists, Argon2id password_hash, and hardened php.ini settings. Use when writing modern PHP modules or auditing composer and php.ini configuration.

Best Benchmark Result

GPT-4.1 mini
Vulnerability Reduction
46%
Baseline Vulnerability Rate
39.7%

127 of 320 cases vulnerable

Prompted Vulnerability Rate
21.6%

69 of 320 cases vulnerable

Test Case Outcomes

Fixed
62

Vulnerable → Secure

Regressed
4

Secure → Vulnerable

Net Fixed
58

Overall improvement

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

Benchmark Run History

DateModelMethodBaselinevuln ratePromptedvuln rateReductionNet FixedTokens (I/O)
2026-05-14DeepSeek V4 FlashEvaluator38.5% (121/314)27.7% (87/314)28%+34411k/495k
2026-05-11Claude 3.5 HaikuEvaluator37.7% (122/324)24.1% (78/324)36%+44479k/158k
2026-05-11GPT-4.1 miniEvaluator39.7% (127/320)21.6% (69/320)46%+58403k/123k
2026-05-11Llama 3.3 70BEvaluator33.8% (108/320)25.6% (82/320)24%+26407k/112k
2026-05-05Gemini 2.0 FlashEvaluator43.1% (135/313)32.3% (101/313)25%+34426k/252k