RuleDroid: LLM-Augmented Synthesis of Static Security Detection Rules for Android Apps

IF 6 1区 计算机科学 Q1 COMPUTER SCIENCE, SOFTWARE ENGINEERING
IEEE Transactions on Software Engineering Pub Date : 2026-08-01 Epub Date: 2026-06-04 DOI:10.1109/TSE.2026.3700217
Zhentao Xie;Mingyang Chen;Yaqi Gao;Shishuai Yang;Wenrui Diao;Xiangyu Liu;Kehuan Zhang
{"title":"RuleDroid: LLM-Augmented Synthesis of Static Security Detection Rules for Android Apps","authors":"Zhentao Xie;Mingyang Chen;Yaqi Gao;Shishuai Yang;Wenrui Diao;Xiangyu Liu;Kehuan Zhang","doi":"10.1109/TSE.2026.3700217","DOIUrl":null,"url":null,"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 <sc>RuleDroid</small>, a new framework that leverages LLMs to automatically generate Semgrep-compatible static detection rules from up-to-date official Android security documentation. <sc>RuleDroid</small> tackles the limits of pure LLM detection by combining (i) <bold>Retrieval-Augmented Generation (RAG)</b>, which grounds model outputs in trusted documents, and (ii) a modular <bold>workflow</b> that decomposes rule synthesis into well-defined stages. The resulting rules are then applied with proven static-analysis techniques, ensuring consistent and explainable results. We evaluated <sc>RuleDroid</small> on three public benchmark datasets. Based on its large and precise rule set, <sc>RuleDroid</small> 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, <sc>RuleDroid</small> discovered multiple new vulnerabilities, resulting in 57 CVE IDs being assigned. These results show that <sc>RuleDroid</small> 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.","PeriodicalId":13324,"journal":{"name":"IEEE Transactions on Software Engineering","volume":"52 8","pages":"2488-2506"},"PeriodicalIF":6.0000,"publicationDate":"2026-08-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"IEEE Transactions on Software Engineering","FirstCategoryId":"94","ListUrlMain":"https://ieeexplore.ieee.org/document/11551147/","RegionNum":1,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"2026/6/4 0:00:00","PubModel":"Epub","JCR":"Q1","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
引用次数: 0

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 well-defined 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.
RULEDROID: Android应用静态安全检测规则的llm增强综合
Android庞大的生态系统和广泛的API界面对静态应用程序安全测试(SAST)工具构成了严峻的挑战。主流工具如MobSF、APKHunt和AUSERA主要依赖于手工制作的规则。制定这些规则需要付出相当大的努力,但它们仍然不能涵盖所有安全问题。当Android引入新的api、改变其权限模型或修改其他安全策略时,这些规则很快就会落后。如果没有持续的维护,就会出现误报,而真正的漏洞就会溜走。最近发布的基于llm的检测器易于使用,并且可能支持广泛的漏洞类型,但他们的发现往往缺乏明确的解释,并且存在高假阳性率。在本文中,我们提出了RuleDroid,这是一个利用llm从最新的官方Android安全文档中自动生成与semgrep兼容的静态检测规则的新框架。RuleDroid通过结合(i)检索增强生成(RAG)来解决纯LLM检测的局限性,该生成将模型输出置于可信文档中,以及(ii)将规则合成分解为定义良好的阶段的模块化工作流。然后将生成的规则应用于经过验证的静态分析技术,以确保结果的一致性和可解释性。我们在三个公共基准数据集上评估了RuleDroid。基于其庞大而精确的规则集,RuleDroid比传统的SAST工具获得了更高的覆盖率和准确性,与直接LLM扫描相比,大大减少了误报。当应用于现实世界的应用程序时,RuleDroid发现了多个新的漏洞,导致分配了57个CVE id。这些结果表明,RuleDroid结合了llm的广泛漏洞覆盖和静态分析的精确性,为Android安全测试提供了一个完全自动化的文档到规则解决方案。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
IEEE Transactions on Software Engineering
IEEE Transactions on Software Engineering 工程技术-工程:电子与电气
CiteScore
9.70
自引率
10.80%
发文量
724
审稿时长
6 months
期刊介绍: IEEE Transactions on Software Engineering seeks contributions comprising well-defined theoretical results and empirical studies with potential impacts on software construction, analysis, or management. The scope of this Transactions extends from fundamental mechanisms to the development of principles and their application in specific environments. Specific topic areas include: a) Development and maintenance methods and models: Techniques and principles for specifying, designing, and implementing software systems, encompassing notations and process models. b) Assessment methods: Software tests, validation, reliability models, test and diagnosis procedures, software redundancy, design for error control, and measurements and evaluation of process and product aspects. c) Software project management: Productivity factors, cost models, schedule and organizational issues, and standards. d) Tools and environments: Specific tools, integrated tool environments, associated architectures, databases, and parallel and distributed processing issues. e) System issues: Hardware-software trade-offs. f) State-of-the-art surveys: Syntheses and comprehensive reviews of the historical development within specific areas of interest.
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信
小红书