Research · September 10, 2026
CS-Guard: Benchmarking LLM Guardrails for Code Generation Security
Reported by arXiv cs.AI + cs.CL
In short
CS-Guard is the first benchmark designed to evaluate how well LLM guardrails block malicious code generation, covering 1,000 malware prompts, seven jailbreak techniques, and a novel fictional scenario attack across both text-to-code and code-to-code tasks. Testing nine guardrails on seven LLMs, the researchers found that jailbreak success rates hit around 50% for text-to-code and approach 100% for code-to-code scenarios.
Why it matters
Current guardrails are failing badly at preventing LLMs from generating malicious code, and this benchmark gives developers a concrete way to measure and improve those defenses.
Terms used in this story
Read the original reporting
arXiv cs.AI + cs.CL (opens in a new tab)AI Download summarizes and links to the news. We do not republish full articles.