A Prompt-Based Framework for Loop Vulnerability Detection Using Local LLMs
Adeyemi Adeseye, Aisvarya Adeseye

TL;DR
This paper introduces a prompt-based framework leveraging local LLMs to detect loop vulnerabilities in Python code, addressing limitations of static analyzers and enhancing security and performance analysis.
Contribution
It presents a novel prompt-based approach for local LLMs to identify loop-related vulnerabilities, improving detection accuracy over existing methods.
Findings
Phi outperforms LLaMA in precision, recall, and F1-score.
Effective prompts are crucial for accurate vulnerability detection.
The framework successfully detects control, security, and resource issues in loops.
Abstract
Loop vulnerabilities are one major risky construct in software development. They can easily lead to infinite loops or executions, exhaust resources, or introduce logical errors that degrade performance and compromise security. The problem are often undetected by traditional static analyzers because such tools rely on syntactic patterns, which makes them struggle to detect semantic flaws. Consequently, Large Language Models (LLMs) offer new potential for vulnerability detection because of their ability to understand code contextually. Moreover, local LLMs unlike commercial ones like ChatGPT or Gemini addresses issues such as privacy, latency, and dependency concerns by facilitating efficient offline analysis. Consequently, this study proposes a prompt-based framework that utilize local LLMs for the detection of loop vulnerabilities within Python 3.7+ code. The framework targets three…
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
TopicsWeb Application Security Vulnerabilities · Software Engineering Research · Information and Cyber Security
