AIIC AI Intelligence Centre

SOURCE-LINKED INTELLIGENCE

CS-Guard: Benchmarking LLM Guardrails for Code Generation Security

arXiv · AI, language, vision and robotics · article · Sep 9, 2026 · UTC

Large language models (LLMs) have been ex- ploited to generate malware, but the effective- ness of guardrails for code generation secu- rity remains unclear. We introduce CS-Guard, the first benchmark to systematically evalu- ate guardrails for code generation security. It covers 1) text-to-code generation with 1000 high-quality malware-generation prompts, 7 jailbreak attacks, and a novel fictional scenario attack (FSA) that embeds malicious intent in a legitimate fictional software-development sce- nario; and 2) code-to-code generation with 331 code prompts spanning code infilling, code compl

Read original source ↗ Open in workspace

recordType
paper
region
Global

Evidence & attribution

First collected: 2026-09-20T19:52:05.078Z. This is not the publication date.