Lune

ASE2022Top-tier venue

Not All Dependencies are Equal: An Empirical Study on Production Dependencies in NPM

Jasmine Latendresse, Suhaib Mujahid, Diego Elias Costa, Emad Shihab

Abstract

Modern software systems are often built by leveraging code written by others in the form of libraries and packages to accelerate their development. While there are many benefits to using third-party packages, software projects often become dependent on a large number of software packages. Consequently, developers are faced with the difficult challenge of maintaining their project dependencies by keeping them up-to-date and free of security vulnerabilities. However, how often are project dependencies used in production where they could pose a threat to their project's security? We conduct an empirical study on 100 JavaScript projects using the Node Package Manager (npm) to quantify how often project dependencies are released to production and analyze their characteristics and their impact on security. Our results indicate that less than 1% of the installed dependencies are released to production. Our analysis reveals that the functionality of a package is not enough to determine if it will be released to production or not. In fact, 59% of the installed dependencies configured as runtime dependencies are not used in production, and 28.2% of the dependencies configured as development dependencies are used in production, debunking two common assumptions of dependency management. Findings also indicate that most security alerts target dependencies not used in production, making them highly unlikely to be a risk for the security of the software. Our study unveils a more complex side of dependency management: not all dependencies are equal. Dependencies used in production are more sensitive to security exposure and should be prioritized. However, current tools lack the appropriate support in identifying production dependencies.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

9 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Pinning Is Futile: You Need More Than Local Dependency Versioning to Defend against Supply Chain Attacks cites Practical Automated Detection of Malicious npm Packages
  • Pinning Is Futile: You Need More Than Local Dependency Versioning to Defend against Supply Chain Attacks cites Flexible and Optimal Dependency Management via Max-SMT
  • Pinning Is Futile: You Need More Than Local Dependency Versioning to Defend against Supply Chain Attacks cites A Qualitative Study of Dependency Management and Its Security Implications
  • A Qualitative Study of Dependency Management and Its Security Implications cites Thou Shalt Not Depend on Me: Analysing the Use of Outdated JavaScript Libraries on the Web
  • Dependency-Induced Waste in Continuous Integration: An Empirical Study of Unused Dependencies in the npm Ecosystem cites A Qualitative Study of Dependency Management and Its Security Implications
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers9

  1. Flexible and Optimal Dependency Management via Max-SMTDonald Pinckney, Federico Cassano, Arjun Guha, Jonathan Bell et al.ICSE 2023 · 10 citations
  2. Automatically Resolving Dependency-Conflict Building Failures via Behavior-Consistent Loosening of Library Version ConstraintsHuiyan Wang, Shuguan Liu, Lingyu Zhang, Chang XuFSE 2023 · 8 citations
  3. Where to Go Now? Finding Alternatives for Declining Packages in the npm EcosystemSuhaib Mujahid, Diego Elias Costa, Rabe Abdalkareem, Emad ShihabASE 2023 · 7 citations
  4. Dependency-Induced Waste in Continuous Integration: An Empirical Study of Unused Dependencies in the npm EcosystemNimmi Rashinika Weeraddana, Mahmoud Alfadel, Shane McIntoshFSE 2024 · 6 citations
  5. Pinning Is Futile: You Need More Than Local Dependency Versioning to Defend against Supply Chain AttacksHao He, Bogdan Vasilescu, Christian KästnerFSE 2025 · 3 citations

Builds on3

  1. Thou Shalt Not Depend on Me: Analysing the Use of Outdated JavaScript Libraries on the WebTobias Lauinger, Abdelberi Chaabane, Sajjad Arshad, William Robertson et al.NDSS 2017 · 183 citations
  2. A Qualitative Study of Dependency Management and Its Security ImplicationsIvan Pashchenko, Duc-Ly Vu, Fabio MassacciCCS 2020 · 84 citations
  3. Practical Automated Detection of Malicious npm PackagesAdriana Sejfia, Max SchäferICSE 2022 · 65 citations

Related papers

  1. 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 citations
  2. Insecure Ingredients? Exploring Dependency Update Patterns of Bundled JavaScript Packages on the WebBen Swierzy, Marc Ohm, Michael MeierICSE 2026
  3. Demystifying the Vulnerability Propagation and Its Evolution via Dependency Trees in the NPM EcosystemChengwei Liu, Sen Chen, Lingling Fan, Bihuan Chen et al.ICSE 2022 · 94 citations
  4. Modular call graph construction for security scanning of Node.js applicationsBenjamin Barslev Nielsen, Martin Toldam Torp, Anders MøllerISSTA 2021 · 47 citations
  5. "I wasn't sure if this is indeed a security risk": Data-driven Understanding of Security Issue Reporting in GitHub Repositories of Open Source npm PackagesRajdeep Ghosh, Shiladitya De, Mainack MondalUSENIX Security 2025
Dusk over the sea between two cliffs drawn in fine vertical lines