arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2503.02091cs.SE
收藏

Android应用中哪些代码语句实现了隐私行为?

Which Code Statements Implement Privacy Behaviors in Android Applications?

Chia-Yi Su, Aakash Bansal, Vijayanta Jain, Sepideh Ghanavati, Sai Teja Peddinti, Collin McMillan

AI总结:

本研究通过实证分析确定了Android代码中与隐私行为最相关的语句类型,并提出了一种基于微调三个大型语言模型的自动检测方法,其与人工判断的一致性达到或超过人工间一致性水平。

摘要:

软件中的“隐私行为”是指软件为了某项服务或功能而使用个人信息的行为,例如网站利用位置信息来提供与用户相关的内容。法规或应用商店要求程序员提供描述这些隐私行为的隐私声明和标签。尽管已经开发了许多工具和研究原型来帮助程序员通过分析源代码生成这些声明,但这些方法通常相当粗粒度(即处于整个方法或文件级别,而不是语句级别)。然而,这并不一定是隐私行为在代码中存在的方式。隐私行为嵌入在代码中的特定语句中。目前的文献没有研究程序员认为哪些语句最重要、这些观点的一致性如何,或者如何检测它们。在本文中,我们进行了一项实证研究,以考察程序员认为哪些语句与隐私行为最相关。我们发现,进行函数调用的表达式语句与隐私行为的关联度最高,而隐私标签的类型对所选语句的属性影响很小。然后,我们提出了一种自动检测这些隐私相关语句的方法,通过使用研究中的数据对三个大型语言模型进行微调。我们观察到,我们的方法与参与者之间的一致性,与两名参与者之间的一致性相当或更高。我们的研究和检测方法可以帮助程序员理解代码中的哪些语句会影响移动应用程序中的隐私。

英文摘要:

A "privacy behavior" in software is an action where the software uses personal information for a service or a feature, such as a website using location to provide content relevant to a user. Programmers are required by regulations or application stores to provide privacy notices and labels describing these privacy behaviors. Although many tools and research prototypes have been developed to help programmers generate these notices by analyzing the source code, these approaches are often fairly coarse-grained (i.e., at the level of whole methods or files, rather than at the statement level). But this is not necessarily how privacy behaviors exist in code. Privacy behaviors are embedded in specific statements in code. Current literature does not examine what statements programmers see as most important, how consistent these views are, or how to detect them. In this paper, we conduct an empirical study to examine which statements programmers view as most-related to privacy behaviors. We find that expression statements that make function calls are most associated with privacy behaviors, while the type of privacy label has little effect on the attributes of the selected statements. We then propose an approach to automatically detect these privacy-relevant statements by fine-tuning three large language models with the data from the study. We observe that the agreement between our approach and participants is comparable to or higher than an agreement between two participants. Our study and detection approach can help programmers understand which statements in code affect privacy in mobile applications.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑