paperbot · PL 论文追踪

全部论文 待读 收藏

Defensive Capability Analysis for JavaScript Libraries

JavaScript 库的防御性能力分析
ASE Proceedings of the 41st IEEE/ACM International Conference on Automated Software Engineering2026引用 0 inbox
Wenyuan Xu, Anders Møller
crossref: 2026-10-09

AI 速览

一句话:提出一种防御性能力分析,结合静态分析与轻量运行时保护,可靠报告 JavaScript 库的能力使用并支持供应链安全审计。

JavaScript 供应链安全中的恶意软件检测、安全审计和运行时策略构建都依赖能力分析,但现有方法在 JavaScript 动态特性下缺乏可靠性保证。本文提出面向 JavaScript 库的防御性能力分析:在轻量受保护运行时下,可靠报告代码实际行使的每一项能力。分析只跟踪与能力相关的对象,在对象使用位置报告能力使用;当相关对象通过未精确建模的操作逃逸时,则保守报告。针对少数会破坏分析的动态语言特性,作者用轻量运行时执行机制阻断这些模式,作为静态分析的补充。该工作已实现,并在大规模良性及恶意 npm 包数据集上评估。结果表明方法可扩展到真实包,能高精度定位能力使用位置,与 98.2% 的良性库保持兼容;在恶意包中检测到 99.8% 的能力使用,其余情况被运行时保护阻断。研究还发现至少 72.9% 的 npm 包不使用任何安全敏感能力,说明能力分析可显著减少实际审计工作量。

问题
JavaScript 供应链安全任务需要可靠的能力分析,但现有方法在 JavaScript 动态特性下无法提供健全性保证。
方法
提出防御性能力分析,只跟踪能力相关对象,结合静态分析与轻量运行时保护;对未精确建模的逃逸操作保守报告,并用运行时阻断会破坏分析的动态模式。
评估
在大型良性与恶意 npm 包数据集上实现并评估,考察可扩展性、能力使用定位精度、良性库兼容性以及恶意包能力使用检出率。
原文摘要(Abstract)

Capability analysis is a key building block for JavaScript supply-chain security tasks such as malware detection, security auditing, and runtime policy construction. However, existing approaches do not provide guarantees in the presence of JavaScript’s dynamic features. We present a defensive capability analysis for JavaScript libraries that soundly reports every exercised capability for code executed under a lightweight protected runtime. The analysis tracks only objects that are relevant to capabilities. It reports capability usage either at the program locations where such objects are used, or conservatively when relevant objects escape through operations that the analysis does not model precisely. To address a small number of dynamic language features that would otherwise invalidate this analysis, we complement the static analysis with a lightweight runtime enforcement mechanism that blocks those patterns. We implement the approach and evaluate it on large datasets of benign and malicious npm packages. The results show that the approach scales to real-world packages, pinpoints capability-usage locations with high accuracy, and remains compatible with 98.2% of benign libraries when using the protected runtime. Moreover, it detects capability usage in 99.8% of the malicious packages in our dataset, while the remaining cases are blocked by the runtime protection. Our study also shows that at least 72.9% of the npm packages use no security-sensitive capabilities at all, suggesting that capability analysis can substantially reduce auditing effort in practice.

链接与引用

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

BibTeX
@inproceedings{paperbot12532,
  title = {Defensive Capability Analysis for JavaScript Libraries},
  author = {Wenyuan Xu and Anders Møller},
  booktitle = {ASE},
  year = {2026},
  doi = {10.1145/3832783.3837491}
}