Generating API Parameter Security Rules with LLM for API Misuse Detection
Not on the map. Why?
Abstract (arXiv)
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 programming language is more precise than natural language, GPTAid identifies the key operations within Violation code by differential analysis, and then generates the corresponding concrete APSR based on the aforementioned operations. These concrete APSRs could be precisely interpreted into applicable detection code, which proven to be effective in API misuse detection. Implementing on the dataset containing 200 randomly selected APIs from eight popular libraries, GPTAid achieves a precision of 92.3%. Moreover, it generates 6 times more APSRs than state-of-the-art detectors on a comparison dataset of previously reported bugs and APSRs. We further evaluated GPTAid on 47 applications, 210 unknown security bugs were found potentially resulting in severe security issues (e.g., system crashes), 150 of which have been confirmed by developers after our reports.
Key facts. Cited by 7 papers in the map (data through 7 Oct 2026). First posted on arXiv 14 Sep 2024.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2024: 1; 2025: 2; 2026: 4.
7 papers.
- 2025Incident Response Planning Using a Lightweight Large Language Model with Reduced Hallucinationcited by 10
- 2024A Middle Path for On-Premises LLM Deployment: Preserving Privacy Without Sacrificing Model Confidentialitycited by 8
- 2025The Hitchhiker's Guide to Program Analysis, Part II: Deep Thoughts by LLMscited by 4
- 2026Hallucination-Resistant Security Planning with a Large Language Modelcited by 1
- 2026Provably Secure Agent Guardrailcited by 0
- 2026Transferable Self-Evolving Playbooks for Agentic Security Auditingcited by 0
- 2026Chai: Agentic Discovery of Cryptographic Misuse Vulnerabilitiescited by 0
- 2026Chai: Agentic Discovery of Cryptographic Misuse Vulnerabilities25 Jun 2026
- 2026Transferable Self-Evolving Playbooks for Agentic Security Auditing15 Jun 2026
- 2026Provably Secure Agent Guardrail28 May 2026
- 2026Hallucination-Resistant Security Planning with a Large Language Model5 Feb 2026
- 2025Incident Response Planning Using a Lightweight Large Language Model with Reduced Hallucination7 Aug 2025
- 2025The Hitchhiker's Guide to Program Analysis, Part II: Deep Thoughts by LLMs16 Apr 2025
- 2024A Middle Path for On-Premises LLM Deployment: Preserving Privacy Without Sacrificing Model Confidentiality15 Oct 2024