The goal of this study is to aid developers in securely accepting dependency updates by measuring if the code changes in an update have passed through a code review process. We implement DepDive, an update audit tool for packages in Crates.io, npm, PyPI, and RubyGems registry. DepDive first (i) identifies the files and the code changes in an update that cannot be traced back to the package's source repository, i.e., phantom artifacts; and then (ii) measures what portion of changes in the update, excluding the phantom artifacts, has passed through a code review process, i.e., code review coverage. Using DepDive, we present an empirical study across the latest ten updates of the most downloaded 1000 packages in each of the four registries. Our study unveils interesting insights while also providing an evaluation of our proposed approach. We find that phantom artifacts are not uncommon in the updates (20.1\% of the analyzed updates had at least one phantom file). The phantoms can appear either due to legitimate reasons, such as in the case of programmatically generated files, or from accidental inclusion, such as in the case of files that are ignored in the repository. However, without provenance tracking, we cannot audit if the changes in these phantom artifacts were code-reviewed or not. Regarding code review coverage (\textit{CRC)}, we find the updates are typically only partially code-reviewed (52.5\% of the time). Further, only 9.0\% of the packages had all their updates in our data set fully code-reviewed, indicating that even the most used packages can introduce non-reviewed code in the software supply chain. We also observe that updates either tend to have very high \textit{CRC} or very low \textit{CRC}, suggesting that packages at the opposite end of the spectrum may require a separate set of treatments.
翻译:此项研究的目标是帮助开发者安全地接受依赖性更新, 测量更新代码的修改是否通过代码审查过程。 我们实施了 DepDive, 用于 Crates.io、 npm、 PyPI 和RubyGems 的软件包更新审计工具。 DepDive 首先 (一) 识别无法追溯到软件包源存储处的文件和更新的代码修改 。 我们发现, 在软件源存储中, 即 幽灵工艺品 ; 然后 (二) 测量更新中的修改部分( 不包括幽灵工艺品) 已经通过代码审查过程。 我们实施了 DepDive, 用于 Crates.io、 npm、 PyPI, 和 RupedGems 的软件更新工具更新工具。 我们的研究首先揭示了有趣的洞察发现, 在软件源存储库中( 分析更新的版本中至少找到一个软体的版本 ) 的版本, 可能是不常见的。 幽灵检的版本也显示我们没有这样的版本。