Skip to content
Search
paperSeptember 2026Unreviewed

CS-Guard: Benchmarking LLM Guardrails for Code Generation Security

Jinyang Li, Mingyu Guo, Hung X. Nguyen

Abstract

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

Categories

Framework mappings

MITRE ATLAS
  • AML.T0054LLM Jailbreak

Suggested from the entry's categories.

Cite

@misc{li2026csguard,
  title = {{CS-Guard: Benchmarking LLM Guardrails for Code Generation Security}},
  author = {Jinyang Li and Mingyu Guo and Hung X. Nguyen},
  year = {2026},
  month = sep,
  eprint = {2609.09798},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2609.09798}
}