TL;DR
This paper presents the first large-scale longitudinal study of "implicit dependencies"—libraries that a project uses directly in its code but fails to declare in its build configuration. By analyzing thousands of Java projects, the researchers found that over 34% of project versions harbor these hidden dependencies, leading to silent breaking changes and significant security blind spots that standard audit tools often miss.
What Problem Does This Paper Address?
In modern software development, we stand on the shoulders of giants by using package managers like Maven or NPM. We declare direct dependencies, and the manager automatically pulls in transitive dependencies (the libraries our libraries need).
The danger arises when a developer directly calls code from one of these transitive libraries without declaring it in their pom.xml. This creates an implicit dependency. Because it isn't declared, the developer has no direct control over its version. Instead, the version is determined by the "nearest-first" resolution strategy of the package manager. If a direct dependency is updated, the version of the implicit dependency might shift silently—a phenomenon called version drift. This can lead to "fragile builds" that break unexpectedly or "hidden vulnerabilities" where a project is using a known-vulnerable method from a library it doesn't even know it's using.
Methods
The authors developed a lightweight points-to analysis tool using the SootUp framework to identify these hidden links. Unlike standard reachability analysis, which often only looks at method calls, their approach scans Java bytecode for class types, method invocations, and field accesses.
The study's workflow (illustrated in Figure 1) involves:
- Identification: Comparing the actual entities referenced in a project's bytecode against the libraries declared in its
pom.xml. - Evolutionary Tracking: Analyzing how these dependencies change across multiple versions of the same project to see if they persist or grow.
- Risk Assessment: Using tools like revapi to detect breaking changes caused by version drift and mapping implicit dependencies to the National Vulnerability Database (NVD) and OSV to identify security risks.
Datasets
The researchers constructed a massive dataset comprising two main parts:
- Maven Central Repository (MCR): 1,157 of the most-used libraries, covering 19,812 individual versions. They used a sampling strategy to ensure they captured the full lifecycle (earliest to latest versions) of each library.
- GitHub: 972 modules from popular Java repositories to compare "published" artifacts with "in-development" code.
Key Insights and Ideas
- The "Second-Level" Trap: A staggering 73.16% of implicit dependencies occur at the second level of the dependency tree (the dependencies of your direct dependencies). This suggests developers often mistake these "close neighbors" for libraries they have already declared.
- Frameworks as Catalysts: Large, modular frameworks like Spring are major sources of implicit dependencies. Because Spring modules are often used together, developers frequently call utilities from a sub-module (like
spring-core) that was pulled in by another module (likespring-boot) without realizing it needs its own declaration. - Persistence over Time: Implicit dependencies aren't just "short-lived anomalies." In 39.7% of the studied projects, the number of implicit dependencies actually increased over time.
- The SCA Blind Spot: Most Software Composition Analysis (SCA) tools prioritize declared dependencies. The study found that implicit dependencies are just as likely to be vulnerable as declared ones, but because they are "ghosts" in the configuration, they represent a structural blind spot for security audits.
Key Results
- Prevalence: 34.12% of analyzed versions contained at least one implicit dependency.
- Breaking Changes: 48% of implicit dependencies underwent version drift that introduced breaking changes. The authors confirmed that in 22% of cases, the project was actively using the specific program entities that broke.
- Security Impact: 30.28% of implicit dependencies are affected by known CVEs. Crucially, the authors manually confirmed 36 CVEs where the root project was directly invoking a vulnerable method in an undeclared library.
- Resolution: While 36.38% of implicit dependencies eventually disappeared, only 15.4% were "fixed" by being promoted to direct dependencies. Most were resolved "accidentally" when developers simply stopped using the relevant code.
Limitations and Future Work
The study primarily relies on static analysis, which can introduce false positives (e.g., code that is referenced but never actually executed at runtime). It is also focused strictly on the Java/Maven ecosystem; while the authors found evidence of similar issues in NPM and PyPI via commit message searches, the quantitative impact on those ecosystems remains to be explored.
Future work could involve developing IDE plugins that warn developers in real-time when they import a class from an undeclared transitive dependency, effectively nipping the problem in the bud during the development phase.
Summary updated