RULEDROID: LLM-Augmented Synthesis of Static Security Detection Rules for Android Apps
- 4 June 2026
- journal article
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Transactions on Software Engineering
- Vol. PP (00985589) , 1-19
Abstract
Android’s vast ecosystem and expansive API surfaces pose a serious challenge to static application security testing (SAST) tools. Mainstream tools such as MobSF, APKHunt, and AUSERA mainly rely on manually crafted rules. Crafting these rules demands considerable effort, yet they still cannot cover every security issue. When Android introduces new APIs, changes its permission model, or revises other security policies, the rules soon fall behind. Without constant maintenance, false positives grow, and true vulnerabilities slip through. Recently released LLM-based detectors are easy to use and potentially support a wide range of vulnerability types, but their findings often lack clear explanations and suffer from high false-positive rates. In this paper, we present RULEDROID, a new framework that leverages LLMs to automatically generate Semgrep-compatible static detection rules from up-to-date official Android security documentation. RULEDROID tackles the limits of pure LLM detection by combining (i) Retrieval-Augmented Generation (RAG), which grounds model outputs in trusted documents, and (ii) a modular workflow that decomposes rule synthesis into welldefined stages. The resulting rules are then applied with proven static-analysis techniques, ensuring consistent and explainable results. We evaluated RULEDROID on three public benchmark datasets. Based on its large and precise rule set, RULEDROID achieved higher coverage and accuracy than traditional SAST tools, and sharply reduced false positives compared with direct LLM scanning. When applied to real-world apps, RULEDROID discovered multiple new vulnerabilities, resulting in 57 CVE IDs being assigned. These results show that RULEDROID combines the broad vulnerability coverage of LLMs with the precision of static analysis, delivering a fully automated docs-to-rules solution for Android security testing.Keywords
Funding Information
- Natural Science Foundation of Shandong Province (ZR2025MS991)
- Open Research Fund of the State Key Laboratory of Internet Architecture (HLW2025MS29)
This publication has 34 references indexed in Scilit:
- Poster: SPECK: From Google Textual Guidelines to Automatic Detection of Android Apps Vulnerabilities2025
- Assessing the Effectiveness of LLMs in Android Application Vulnerability Analysis2025
- Manifest Problems: Analyzing Code Transparency for Android Application Bundles2024
- SecureQwen: Leveraging LLMs for vulnerability detection in python codebasesComputers & Security, 2024
- Outside the Comfort Zone: Analysing LLM Capabilities in Software Vulnerability Detection2024
- CryptoLLM: Harnessing the Power of LLMs to Detect Cryptographic API Misuse2024
- MtdScout: Complementing the Identification of Insecure Methods in Android Apps via Source-to-Bytecode Signature Generation and Tree-based Layered Search2024
- Locating Framework-specific Crashing Faults with Compact and Explainable Candidate Set2023
- ATVHunter: Reliable Version Detection of Third-Party Libraries for Vulnerability Identification in Android Applications2021
- SEALANT: A detection and visualization tool for inter-app security vulnerabilities in androic2017