With the emergence of the Node.js ecosystem, JavaScript has become a widely-used programming language for implementing server-side web applications. In this paper, we present the first empirical study of static code analysis tools for detecting vulnerabilities in Node.js code. To conduct a comprehensive tool evaluation, we created the largest known curated dataset of Node.js code vulnerabilities. We characterized and annotated a set of 957 vulnerabilities by analyzing information contained in npm advisory reports. We tested nine different tools and found that many important vulnerabilities appearing in the OWASP Top-10 are not detected by any tool. The three best performing tools combined only detect up to 57.6% of all vulnerabilities in the dataset, but at a very low precision of 0.11%. Our curated dataset offers a new benchmark to help characterize existing Node.js code vulnerabilities and foster the development of better vulnerability detection tools for Node.js code.
翻译:随着Node.js 生态系统的出现, JavaScript 已成为一个广泛用于实施服务器端网络应用程序的编程语言。 在本文中,我们展示了第一个用于在Node.js 代码中检测脆弱性的静态代码分析工具的经验性研究。为了进行全面的工具评价,我们创建了已知的最大的诺德.js 代码脆弱性分类数据集。我们通过分析npm 咨询报告中的信息,对一套957 个脆弱性进行了特征和附加说明。我们测试了九种不同工具,发现在 OWASP 上层- 10 中出现的许多重要脆弱性没有被任何工具探测到。三种最佳工具组合只能探测到数据集中所有脆弱性的57.6%,但精确度非常低,为0. 11%。我们整理的数据集提供了一个新的基准,以帮助描述现有的诺德.js 代码脆弱性,并促进开发更好的Nde.js 代码脆弱性识别工具。