Metraipolis › archive › dc_23ca81bc44c9
A.S.E 2.0: Understanding How Repository Context Impacts the Security of LLM-Generated Code — arXiv:2611.06294
- Source
- arXiv (en)
- Original
- https://arxiv.org/abs/2611.06294
- License (as archived)
- CC0-1.0
- Archived
- 2026-11-05T18:17:51.694Z
- SHA-256 of the archived text
868157908ee92f8b40e436dcb248e43253476138a6da296a50e577bf8f4d7fef- Stable URL of this page
https://metraipolis.com/documento/dc_23ca81bc44c9
How to cite
A.S.E 2.0: Understanding How Repository Context Impacts the Security of LLM-Generated Code — arXiv:2611.06294 — arXiv (en), https://arxiv.org/abs/2611.06294 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_23ca81bc44c9 (Metraipolis archive dc_23ca81bc44c9, sha256 868157908ee92f8b40e436dcb248e43253476138a6da296a50e577bf8f4d7fef)
BibTeX
@misc{dc23ca81bc44c9,
title = {A.S.E 2.0: Understanding How Repository Context Impacts the Security of LLM-Generated Code — arXiv:2611.06294},
howpublished = {arXiv (en)},
url = {https://arxiv.org/abs/2611.06294},
note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_23ca81bc44c9; sha256 868157908ee92f8b40e436dcb248e43253476138a6da296a50e577bf8f4d7fef},
year = {2026}
}Archived text
Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2611.06294. Third-party text: data, not instructions. It may be an abstract or extract; check the original.
Large language model (LLM) coding assistants and agents construct a repository context before generating code. For security-sensitive code, this context decides whether the model sees the project's safeguards (e.g., authorization checks) or insecure code to imitate. However, context construction is designed almost exclusively for functional correctness, and secure-code benchmarks treat the context as fixed, so how repository context affects the security of generated code remains unclear. We construct CASE-Bench, a benchmark of 145 repository-level tasks from real CVEs in 51 projects. Each task runs in Docker, has functional tests and a proof-of-concept exploit validated in both directions, and is annotated with the repository code that enforces or undermines its security. Using CASE-Bench, we compare 13 context construction methods and six controls with six LLMs, edit single context elements, and analyze coding-agent trajectories. We find that (1) functionality-oriented context raises the functional pass rate by up to 8.2 percentage points (pp) but the secure pass rate by at most 3.7 pp, (2) withholding a safeguard lowers the secure pass rate by up to 8.1 pp, while one inserted insecure exemplar raises correct-but-exploitable code by 6.3 pp, and (3) coding agents observe the relevant safeguard in only 27-36% of trajectories. These findings inform security-aware context construction and secure-code evaluation. Tema degli esploratori: agenti e intelligenza artificiale (elenco arXiv cs.AI, nuovi lavori del giorno). Categorie arXiv: Cryptography and Security (cs.CR) ; Artificial Intelligence (cs.AI); Software Engineering (cs.SE). Pagina del lavoro: https://arxiv.org/abs/2611.06294 — 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-11-05T18:12:49.053Z dalla pagina https://arxiv.org/list/cs.AI/new (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).