TL;DR
This paper introduces GPTAid, a framework that uses large language models to automatically generate API security rules, detect misuses, and improve security by analyzing source code and runtime errors, achieving high precision and uncovering many security issues.
Contribution
GPTAid is the first framework to combine LLM-based generation, execution feedback, and differential analysis for precise API misuse detection and rule generation.
Findings
Achieves 92.3% precision in API misuse detection.
Generates six times more APSRs than existing methods.
Identifies 210 potential security bugs in real applications.
Abstract
In this paper, we present a new framework, named GPTAid, for automatic APSRs generation by analyzing API source code with LLM and detecting API misuse caused by incorrect parameter use. To validate the correctness of the LLM-generated APSRs, we propose an execution feedback-checking approach based on the observation that security-critical API misuse is often caused by APSRs violations, and most of them result in runtime errors. Specifically, GPTAid first uses LLM to generate raw APSRs and the Right calling code, and then generates Violation code for each raw APSR by modifying the Right calling code using LLM. Subsequently, GPTAid performs dynamic execution on each piece of Violation code and further filters out the incorrect APSRs based on runtime errors. To further generate concrete APSRs, GPTAid employs a code differential analysis to refine the filtered ones. Particularly, as the…
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.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
