APILOT: Navigating Large Language Models to Generate Secure Code by Sidestepping Outdated API Pitfalls
Weiheng Bai, Keyang Xuan, Pengxiang Huang, Qiushi Wu, Jianing Wen,, Jingjing Wu, Kangjie Lu

TL;DR
APILOT is a system that improves large language models' ability to generate secure, up-to-date code by maintaining a real-time dataset of outdated APIs and guiding LLMs to avoid deprecated or vulnerable APIs.
Contribution
This work introduces APILOT, a novel approach that leverages a quickly updatable dataset and augmented generation to produce safer, version-aware code from LLMs, addressing outdated API issues.
Findings
Reduces outdated API recommendations by 89.42% on average
Improves code usability by 27.54%
Effective across seven state-of-the-art LLMs
Abstract
With the rapid development of large language models (LLMs), their applications have expanded into diverse fields, such as code assistance. However, the substantial size of LLMs makes their training highly resource- and time-intensive, rendering frequent retraining or updates impractical. Consequently, time-sensitive data can become outdated, potentially misleading LLMs in time-aware tasks. For example, new vulnerabilities are discovered in various programs every day. Without updating their knowledge, LLMs may inadvertently generate code that includes these newly discovered vulnerabilities. Current strategies, such as prompt engineering and fine-tuning, do not effectively address this issue. To address this issue, we propose solution, named APILOT, which maintains a realtime, quickly updatable dataset of outdated APIs. Additionally, APILOT utilizes an augmented generation method that…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAdvanced Malware Detection Techniques · Software Engineering Research · Web Application Security Vulnerabilities
