<scp>HapFlow</scp> : The Taint Analysis Framework for OpenHarmony Apps
With the rapid growth of OpenHarmony, a new distributed operating system (OS), security and privacy issues have become major concerns. While taint analysis has proven effective in Android, OpenHarmony still lacks a comparable framework. Additionally, OpenHarmony's programming language, ArkTS, has several unique features compared to other languages like TypeScript and Java, including complex lifecycles, closure mechanisms, and a distinct API ecosystem. Directly adapting existing taint analysis tools for Android cannot achieve effectiveness in OpenHarmony applications. To address this challenge, we propose HapFlow , a novel taint analysis framework tailored specifically for the OpenHarmony platform and ArkTS programs. This work presents: (1) an LLM-assisted method for identifying and categorizing source APIs for OpenHarmony, (2) a lifecycle and callback functions modeling approach that supports declarative UI in ArkTS, and (3) an IFDS-based taint propagation extension that accurately handles closure-induced cross-function data flows in OpenHarmony applications. Therefore, HapFlow enables precise inter-procedural data-flow analysis for OpenHarmony applications. We validate HapFlow 's effectiveness on the HapBench benchmark, achieving 96.15% precision and 94.34% recall. Furthermore, HapFlow identifies 73 sensitive data leak flows across over 3,000 open-source projects with 8 false positives, completing over 98% of analyses within 10 seconds. These results demonstrate HapFlow 's practicability and scalability for taint analysis in OpenHarmony applications.
Authors
- Mingyi Zhou (ORCID: https://orcid.org/0000-0003-3514-0372)
- Haonan Chen (ORCID: https://orcid.org/0009-0002-0755-2572)
- Lei Li (ORCID: https://orcid.org/0000-0001-8723-3461)
- Yulin Zhao (ORCID: https://orcid.org/0000-0003-1266-6056)
Institutions
- Huazhong University of Science and Technology (CN)
- Beihang University (CN)
Publication Details
- Journal
- ACM Transactions on Software Engineering and Methodology
- Published
- 2026-02-24
- DOI
- https://doi.org/10.1145/3793863
- Primary Topic
- Advanced Malware Detection Techniques
- Type
- article
- Field-Weighted Citation Impact
- 0.00