LLM Repository Context Construction Impacts Generated Code Security
Original title: A.S.E 2.0: Understanding How Repository Context Impacts the Security of LLM-Generated Code
Functionality-focused context boosts code pass rates but only by 3.7 pp for security; agents miss safeguards in 64-73% of cases.
LLM coding assistants build repository context before code generation. Functionality-oriented context raises functional pass rate by up to 8.2 pp but secure pass rate by at most 3.7 pp. Withholding safeguards lowers secure pass rate by up to 8.1 pp while inserted insecure exemplars raise exploitable code by 6.3 pp. Coding agents observe relevant safeguards in only 27-36% of trajectories.
- Functionality-oriented context raises functional pass rate by up to 8.2 pp but secure pass rate by at most 3.7 pp
- Withholding a safeguard lowers secure pass rate by up to 8.1 pp
- One inserted insecure exemplar raises correct-but-exploitable code by 6.3 pp
- Coding agents observe relevant safeguards in 27-36% of trajectories
- AI models
- LLMs
From the original article
1 min read at arxiv.orgLarge 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.
By Jiongchi Yu · arxiv.org
A short excerpt; the article and its images belong to the publisher. Summary, key facts and assessment above are AI-written from the article and can be wrong.