paperbot · PL 论文追踪

全部论文 待读 收藏

P2 What the fork?

What the fork?——npm 包生态中的套壳克隆
ICSE Proceedings of the 44th International Conference on Software Engineering2022匹配度 3/10 · 论文属于程序分析/软件供应链安全领域,使用目录树相似度度量检测 npm 生态中的套壳克隆包,与用户关注的 LLM/Agent 与静态分析交叉、浮点程序分析、贝叶斯程序分析等核心方向均无交集;仅在'大规模工具落地与问题驱动'这一偏好上略有共鸣,但缺少理论形式化与 AI 结合。引用 33 inbox
Elizabeth Wyss, Lorenzo De Carli, Drew Davidson
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:提出 UNWRAPPER,在 npm 全生态中快速检测隐藏的“套壳克隆”包,并揭示其携带未修复漏洞的安全风险。

本文关注 npm 包生态中未被充分研究的 shrinkwrapped clones(套壳克隆):某包复制或近乎复制另一包的代码,却不注明来源。这类克隆会分流原作者关注,或隐藏复制含漏洞代码,逃避审计。作者提出 UNWRAPPER,用基于目录树相似度的包差异度量,并加入预过滤快速排除不可能克隆,从而在全 npm 生态中匹配目标包。原型可在 72.85 秒内将给定包与 1,716,061 个包、20,190,452 个版本比较,适合在线部署。实际分析发现最多 6,292 个此前未知克隆,其中最多 207 个携带原包已修复但克隆未修复的漏洞,且标准 npm audit 无法发现。

问题
研究 npm 生态中套壳克隆包的普遍性、来源匹配和安全隐患,尤其是克隆包复制已知漏洞并绕过审计的问题。
方法
提出 UNWRAPPER,结合基于目录树相似度的包差异度量和快速预过滤,在全 npm 生态中检测并匹配给定包的克隆。
评估
原型在 1,716,061 个 npm 包与 20,190,452 个版本上于 72.85 秒内完成比较,并发现最多 6,292 个未知克隆,其中最多 207 个含原包已修复的漏洞,npm audit 未能发现。
原文摘要(Abstract)

This work presents findings and mitigations on an under-studied issue, which we term shrinkwrapped clones, that is endemic to the npm software package ecosystem. A shrink-wrapped clone is a package which duplicates, or near-duplicates, the code of another package without any indication or refer-ence to the original package. This phenomenon represents a challenge to the hygiene of package ecosystems, as a clone package may siphon interest from the package being cloned, or create hidden duplicates of vulnerable, insecure code which can fly under the radar of audit processes. Motivated by these considerations, we propose UNWRAP-PER, a mechanism to programmatically detect shrinkwrapped clones and match them to their source package. UNWRAP-PER uses a package difference metric based on directory tree similarity, augmented with a prefilter which quickly weeds out packages unlikely to be clones of a target. Overall, our prototype can compare a given package within the entire npm ecosystem (1,716,061 packages with 20,190,452 differ-ent versions) in 72.85 seconds, and it is thus practical for live deployment. Using our tool, we performed an analysis of a subset of npm packages, which resulted in finding up to 6,292 previously unknown shrinkwrapped clones, of which up to 207 carried vulnerabilities from the original package that had already been fixed in the original package. None of such vulnerabilities were discoverable via the standard npm audit process.

链接与引用

DOI 原文 · PDF(开放获取) · DBLP

BibTeX
@inproceedings{WyssCD22,
  title = {What the fork?},
  author = {Elizabeth Wyss and Lorenzo De Carli and Drew Davidson},
  booktitle = {ICSE},
  year = {2022},
  doi = {10.1145/3510003.3510168}
}