Modular call graph construction for security scanning of Node.js applications
Benjamin Barslev Nielsen, Martin Toldam Torp, Anders Møller
摘要
Most of the code in typical Node.js applications comes from thirdparty libraries that consist of a large number of interdependent modules. Because of the dynamic features of JavaScript, it is difficult to obtain detailed information about the module dependencies, which is vital for reasoning about the potential consequences of security vulnerabilities in libraries, and for many other software development tasks. The underlying challenge is how to construct precise call graphs that capture the connectivity between functions in the modules. In this work we present a novel approach to call graph construction for Node.js applications that is modular, taking into account the modular structure of Node.js applications, and sufficiently accurate and efficient to be practically useful. We demonstrate experimentally that the constructed call graphs are useful for security scanning, reducing the number of false positives by 81% compared to npm audit and with zero false negatives. Compared to js-callgraph, the call graph construction is significantly more accurate and efficient. The experiments also show that the analysis time is reduced substantially when reusing modular call graphs.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 22 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- SecBench.js: An Executable Security Benchmark Suite for Server-Side JavaScript 引用了 SYNODE: Understanding and Automatically Preventing Injection Attacks on NODE.JS
- SecBench.js: An Executable Security Benchmark Suite for Server-Side JavaScript 引用了 Extracting taint specifications for JavaScript libraries
- SecBench.js: An Executable Security Benchmark Suite for Server-Side JavaScript 引用了 Small World with High Risks: A Study of Security Threats in the npm Ecosystem
- SYNODE: Understanding and Automatically Preventing Injection Attacks on NODE.JS 引用了 Thou Shalt Not Depend on Me: Analysing the Use of Outdated JavaScript Libraries on the Web
- Demystifying the Vulnerability Propagation and Its Evolution via Dependency Trees in the NPM Ecosystem 引用了 Detecting locations in JavaScript programs affected by breaking library changes
- Demystifying the Vulnerability Propagation and Its Evolution via Dependency Trees in the NPM Ecosystem 引用了 Small World with High Risks: A Study of Security Threats in the npm Ecosystem
- Demystifying the Vulnerability Propagation and Its Evolution via Dependency Trees in the NPM Ecosystem 引用了 Thou Shalt Not Depend on Me: Analysing the Use of Outdated JavaScript Libraries on the Web
- Extracting taint specifications for JavaScript libraries 引用了 SYNODE: Understanding and Automatically Preventing Injection Attacks on NODE.JS
- Extracting taint specifications for JavaScript libraries 引用了 Small World with High Risks: A Study of Security Threats in the npm Ecosystem
- Extracting taint specifications for JavaScript libraries 引用了 Thou Shalt Not Depend on Me: Analysing the Use of Outdated JavaScript Libraries on the Web
- Practical Automated Detection of Malicious npm Packages 引用了 Small World with High Risks: A Study of Security Threats in the npm Ecosystem
- Small World with High Risks: A Study of Security Threats in the npm Ecosystem 引用了 SYNODE: Understanding and Automatically Preventing Injection Attacks on NODE.JS
- Small World with High Risks: A Study of Security Threats in the npm Ecosystem 引用了 Thou Shalt Not Depend on Me: Analysing the Use of Outdated JavaScript Libraries on the Web
引用它的顶会 Paper22
- Demystifying the Vulnerability Propagation and Its Evolution via Dependency Trees in the NPM EcosystemChengwei Liu, Sen Chen, Lingling Fan, Bihuan Chen 等ICSE 2022 · 94 次引用
- Practical Automated Detection of Malicious npm PackagesAdriana Sejfia, Max SchäferICSE 2022 · 65 次引用
- Tai-e: A Developer-Friendly Static Analysis Framework for Java by Harnessing the Good Designs of ClassicsTian Tan, Yue LiISSTA 2023 · 26 次引用
- AutoPruner: transformer-based call graph pruningThanh Le-Cong, Hong Jin Kang, Truong Giang Nguyen, Stefanus Agus Haryono 等FSE 2022 · 21 次引用
- SecBench.js: An Executable Security Benchmark Suite for Server-Side JavaScriptMasudul Hasan Masud Bhuiyan, Adithya Srinivas Parthasarathy, Nikos Vasilakis, Michael Pradel 等ICSE 2023 · 20 次引用
它引用的 Paper5
- Small World with High Risks: A Study of Security Threats in the npm EcosystemMarkus Zimmermann, Cristian-Alexandru Staicu, Cam Tenny, Michael PradelUSENIX Security 2019 · 281 次引用
- Thou Shalt Not Depend on Me: Analysing the Use of Outdated JavaScript Libraries on the WebTobias Lauinger, Abdelberi Chaabane, Sajjad Arshad, William Robertson 等NDSS 2017 · 183 次引用
- SYNODE: Understanding and Automatically Preventing Injection Attacks on NODE.JSCristian-Alexandru Staicu, Michael Pradel, Benjamin LivshitsNDSS 2018 · 91 次引用
- Extracting taint specifications for JavaScript librariesCristian-Alexandru Staicu, Martin Toldam Torp, Max Schäfer, Anders Møller 等ICSE 2020 · 34 次引用
- Detecting locations in JavaScript programs affected by breaking library changesAnders Møller, Benjamin Barslev Nielsen, Martin Toldam TorpOOPSLA 2020 · 32 次引用
相关 Paper
- Reducing Static Analysis Unsoundness with Approximate InterpretationMathias Rud Laursen, Wenyuan Xu, Anders MøllerPLDI 2024 · 5 次引用
- From Noise to Signal: Precisely Identify Affected Packages of Known Vulnerabilities in npm EcosystemYingyuan Pu, Lingyun Ying, Yacong GuNDSS 2026 · 4 次引用
- Efficient Static Vulnerability Analysis for JavaScript with Multiversion Dependency GraphsMafalda Ferreira, Miguel Monteiro, Tiago Brito, Miguel E. Coimbra 等PLDI 2024 · 13 次引用
- ProfMal: Detecting Malicious NPM Packages by the Synergy between Static and Dynamic AnalysisYiheng Huang, Wen Zheng, Susheng Wu, Bihuan Chen 等ASE 2025 · 2 次引用
- Scaling JavaScript Abstract Interpretation to Detect and Exploit Node.js Taint-style VulnerabilityMingqing Kang, Yichao Xu, Song Li, Rigel Gjomemo 等S&P 2023
