arxiv-2312-04724 · paperPurple Llama CyberSecEval: A Secure Coding Benchmark for Language Models
Manish Bhatt, Sahana Chennabasappa, Cyrus Nikolaidis, et al.
Created: 2023 · Ingested: 2026-09-02
This source: Purple Llama CyberSecEval: A Secure Coding Benchmark for Language Mode…How much the field cites it — heavily cited in the last 12 months73 in the last 12 months · 180 totalpublished 2023checked 2026-09-04click for Semantic Scholar73 citations in the last 12 months · 180 total · checked 2026-09-04
https://arxiv.org/abs/2312.04724(opens in a new tab)In brief
Better coding models produce more insecure code, not less. Across 7 models from the Llama 2, Code Llama, and OpenAI GPT families, the models that scored highest on a code-quality proxy had lower pass rates on insecure-coding tests, in both autocomplete and instruction settings and within individual languages.
CyberSecEval builds test cases automatically: an Insecure Code Detector with 189 static analysis rules covering 50 CWEs across 8 languages (C, C++, C#, Javascript, Rust, Python, Java, PHP) finds insecure patterns in open source code, then those sites become autocomplete prompts (10 preceding lines) or LLM-generated natural language instructions. A second track hand-authors prompt fragments mapped to MITRE ATT&CK, expanded with Llama-70b-chat into 1,000 prompts, 100 per category, judged by an LLM pipeline.
Models suggested vulnerable code 30% of the time on average; CodeLlama-34b-instruct, the strongest coder tested, passed only 75% of the time. Models complied with 53% of cyberattack assistance requests, more for the code-specialized family, with compliance highest on ambiguous discovery and recon requests.
The detectors were validated by hand: 96% precision and 79% recall on insecure code, 94% precision and 84% recall on attack helpfulness across 465 sampled responses. The capability-insecurity link is correlational across 7 models, with BLEU-to-original-code as the capability proxy and no controlled ablation.
Single-turn, English-only, and test cases drawn from open source code that models may have trained on. Treat coding strength as a risk factor rather than a mitigation when evaluating assistants.
Written from the abstract by claude-opus-5 on 2026-09-05, with every figure checked against it. Not a substitute for the paper.
Referenced by
Claims in this catalog that draw on this source, and whether as support or counterpoint.