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

StaticFixer:从静态分析到静态修复

StaticFixer: From Static Analysis to Static Repair

Naman Jain, Shubham Gandhi, Atharv Sonwane, Aditya Kanade, Nagarajan Natarajan, Suresh Parthasarathy, Sriram Rajamani, Rahul Sharma

AI总结:

本文提出 StaticFixer,利用静态分析扰动安全程序生成不安全—安全成对数据,并结合 DSL 与策略学习自动修复非局部信息流漏洞,在数百个 JavaScript 漏洞上优于 CodeT5 和 Codex 基线。

摘要:

传统上,静态分析工具用于检测并标记违反属性的程序。我们表明,静态分析工具也可用于扰动满足某一属性的程序,以构造违反该属性的变体。利用这一洞见,我们可以构建由不安全—安全程序对组成的成对数据集,并学习自动修复属性违规的策略。我们提出了一个名为 StaticFixer 的系统,它使用这种方法自动修复信息流漏洞。由于信息流属性是非局部的(在检查和修复两方面均如此),StaticFixer 还引入了一种新颖的领域特定语言(DSL)以及用于合成非局部修复的策略学习算法。我们使用 StaticFixer 合成修复两类信息流漏洞(未验证的动态调用和跨站脚本)的策略,并表明 StaticFixer 成功修复了来自开源 JavaScript 代码仓库的数百个漏洞,优于使用 CodeT5 和 Codex 构建的神经基线。我们的数据集可从 http://aka.ms/StaticFixer 下载。

英文摘要:

Static analysis tools are traditionally used to detect and flag programs that violate properties. We show that static analysis tools can also be used to perturb programs that satisfy a property to construct variants that violate the property. Using this insight we can construct paired data sets of unsafe-safe program pairs, and learn strategies to automatically repair property violations. We present a system called \sysname, which automatically repairs information flow vulnerabilities using this approach. Since information flow properties are non-local (both to check and repair), \sysname also introduces a novel domain specific language (DSL) and strategy learning algorithms for synthesizing non-local repairs. We use \sysname to synthesize strategies for repairing two types of information flow vulnerabilities, unvalidated dynamic calls and cross-site scripting, and show that \sysname successfully repairs several hundred vulnerabilities from open source {\sc JavaScript} repositories, outperforming neural baselines built using {\sc CodeT5} and {\sc Codex}. Our datasets can be downloaded from \url{http://aka.ms/StaticFixer}.

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

↑