Computational evaluation demonstrates automated cross-language static analysis rule generation using language models, indicating enhanced vulnerability detection across diverse software systems.
Rule-based static analysis tools are widely utilized for their high customizability. However, the creation of effective rules presents significant challenges, including the considerable human effort to handle the complexity of rules, and the additional costs involved in developing rules across various programming languages or frameworks. To address the significant challenges in manual rule creation for static analysis, this paper proposes a novel framework that leverages large language models (LLMs) to automate the generation of static analysis rules. The framework is specifically designed to alleviate the substantial human effort typically required in constructing and maintaining rule sets. Furthermore, we introduce a natural language-mediated rule migration methodology, which ensures semantic consistency when transferring functionally similar rules across different programming languages or frameworks. By seamlessly integrating LLMs with existing static analysis tools, our approach not only enhances the scalability and adaptability of rule generation but also enables efficient vulnerability scanning without the need for extensive computational resources such as large GPU clusters. This integration aims to bridge the gap between natural language understanding and program analysis, thereby facilitating more intelligent and resource-efficient static analysis. The method achieved 81.98 % grammatical and 74.73 % functional validity in rule generation for Semgrep, while migrating rules across 4 languages (Python, Java, JavaScript, and Golang). On the real-world engineering evaluation, it uncovered 9 unknown vulnerabilities in the latest version of the Linux Kernel undetectable by now. This work highlights the potential of our LLM-driven framework provides better handling of corner cases and maintains compatibility with industry-standard tools.
No takes yet. Share an insight, caveat, or question.
Hou et al. (2025) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: