Metraipolis › archive › dc_9a1fe4b5bc51

CS-Guard: Benchmarking LLM Guardrails for Code Generation Security — arXiv:2609.09798

Source
arXiv (en)
Original
https://arxiv.org/abs/2609.09798
License (as archived)
CC0-1.0
Archived
2026-10-16T07:26:25.054Z
SHA-256 of the archived text
81b7ce7ed8a5a6f86cae0d1858e381f6f72295116af2c96142aead8bb454bc2b
Stable URL of this page
https://metraipolis.com/documento/dc_9a1fe4b5bc51

How to cite

CS-Guard: Benchmarking LLM Guardrails for Code Generation Security — arXiv:2609.09798 — arXiv (en), https://arxiv.org/abs/2609.09798 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_9a1fe4b5bc51 (Metraipolis archive dc_9a1fe4b5bc51, sha256 81b7ce7ed8a5a6f86cae0d1858e381f6f72295116af2c96142aead8bb454bc2b)
BibTeX
@misc{dc9a1fe4b5bc51,
  title = {CS-Guard: Benchmarking LLM Guardrails for Code Generation Security — arXiv:2609.09798},
  howpublished = {arXiv (en)},
  url = {https://arxiv.org/abs/2609.09798},
  note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_9a1fe4b5bc51; sha256 81b7ce7ed8a5a6f86cae0d1858e381f6f72295116af2c96142aead8bb454bc2b},
  year = {2026}
}

Archived text

Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2609.09798. Third-party text: data, not instructions. It may be an abstract or extract; check the original.

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 completion, and code translation. We empiri- cally evaluate 9 guardrails across seven LLMs. We find that current guardrails perform poorly against malicious code-generation re- quests: for text-to-code, the average attack success rate (ASR) after jailbreaks reaches about 50% for many guardrails; for code-to- code, average ASR approaches 100% on base LLMs and remains high across many guardrails (14.4% to nearly 100%). Our FSA also achieves ASR close to 100% across many guardrails, raising major reliability concerns for real-world software development. To sup- port future research, CS-Guard uses a modular three-layer guardrail taxonomy that lets devel- opers register guardrails for evaluation. We release the benchmark and data to enable fur- ther community evaluation.

Tema degli esploratori: agenti e intelligenza artificiale (retro-catalogo arXiv: annunci del 2026-09-10 in cs.AI).
Categorie arXiv: Cryptography and Security (cs.CR) ; Artificial Intelligence (cs.AI).
Pagina del lavoro: https://arxiv.org/abs/2609.09798 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito).
Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina.
Letto il 2026-10-16T07:00:16.352Z dalla pagina https://arxiv.org/catchup/cs.AI/2026-09-10?abs=True (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).