针对ArkTS的上下文敏感指针分析
Context-Sensitive Pointer Analysis for ArkTS
AI总结:
本文提出针对ArkTS的上下文敏感指针分析框架APAK,通过独特模型和可扩展架构提升静态分析精度,有效降低误报率并提升分析覆盖范围。
摘要:
当前用于生成ArkTS调用图的方法在支持高级静态分析任务如数据流分析和漏洞模式检测时表现出精度限制,而传统JavaScript(JS)/TypeScript(TS)分析工具的工作流程无法解释ArkUI组件树的语义。核心技术瓶颈源于TypeScript动态语言特性中的闭包机制以及涉及OpenHarmony框架API的交互模式。现有的ArkTS静态分析工具难以有效跟踪和精确推导对象引用关系,导致调用图可达性出现断裂和分析覆盖范围缩小。这一技术限制从根本上限制了高级程序分析技术的实现。因此,在本文中,我们提出了一种名为ArkAnalyzer指针分析套件(APAK)的工具,这是首个专门针对ArkTS的上下文敏感指针分析框架。APAK通过独特的ArkTS堆对象模型和高度可扩展的插件架构来解决这些挑战,确保未来能够适应不断演化的OpenHarmony生态系统。在评估中,我们从OpenHarmony生态系统中的1663个真实应用构建数据集来评估APAK,证明APAK在关键指标如有效边覆盖(例如,相比CHA减少了7.1%,相比RTA增加了34.2%)方面优于CHA/RTA方法。边覆盖的改进系统性地将误报率从20%降低到2%,使未来基于我们框架建立更复杂的程序分析工具成为可能。我们提出的APAK已被合并到官方静态分析框架ArkAnalyzer中。
英文摘要:
Current call graph generation methods for ArkTS, a new programming language for OpenHarmony, exhibit precision limitations when supporting advanced static analysis tasks such as data flow analysis and vulnerability pattern detection, while the workflow of traditional JavaScript(JS)/TypeScript(TS) analysis tools fails to interpret ArkUI component tree semantics. The core technical bottleneck originates from the closure mechanisms inherent in TypeScript's dynamic language features and the interaction patterns involving OpenHarmony's framework APIs. Existing static analysis tools for ArkTS struggle to achieve effective tracking and precise deduction of object reference relationships, leading to topological fractures in call graph reachability and diminished analysis coverage. This technical limitation fundamentally constrains the implementation of advanced program analysis techniques. Therefore, in this paper, we propose a tool named ArkAnalyzer Pointer Analysis Kit (APAK), the first context-sensitive pointer analysis framework specifically designed for ArkTS. APAK addresses these challenges through a unique ArkTS heap object model and a highly extensible plugin architecture, ensuring future adaptability to the evolving OpenHarmony ecosystem. In the evaluation, we construct a dataset from 1,663 real-world applications in the OpenHarmony ecosystem to evaluate APAK, demonstrating APAK's superior performance over CHA/RTA approaches in critical metrics including valid edge coverage (e.g., a 7.1% reduction compared to CHA and a 34.2% increase over RTA). The improvement in edge coverage systematically reduces false positive rates from 20% to 2%, enabling future exploration of establishing more complex program analysis tools based on our framework. Our proposed APAK has been merged into the official static analysis framework ArkAnalyzer for OpenHarmony.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。