DCFinder: A dependency confusion detection method based on multi-dimensional dependency analysis
Dependency Confusion Attacks (DCA), which exploit resolver-level source bypass in multi-repository environments, have emerged as a critical threat to software supply chain security. Existing dependency confusion detection tools are limited by incomplete dependency extraction, insufficient transitive dependency analysis, and a lack of cross-repository version-precedence evaluation. We propose DCFinder, an automated dependency confusion detection method based on multi-dimensional dependency analysis. DCFinder first extracts dependencies from heterogeneous configuration sources by combining format-specific parsing for static configuration files with AST-based static analysis for executable build scripts. It then reconstructs multi-layer dependency trees through a source-aware dependency expansion strategy implemented with BFS traversal, where dependency expansion obtains metadata from configured private indexes when available and from PyPI otherwise, and continues recursively through the discovered sub-dependencies. Finally, it performs cross-repository version analysis to determine whether resolver behavior may allow a public package to override an intended private source. We evaluate DCFinder on 28 real-world Python projects with observable multi-index configurations. The results show that DCFinder achieves 88.7% precision and 83.3% recall for resolver-level dependency-confusion condition detection, whereas the evaluated baseline tools report no positive cases under the same setting due to their more limited modeling of cross-index resolution behavior. These results demonstrate that combining heterogeneous dependency extraction, source-aware dependency expansion, and cross-repository version analysis enables more comprehensive auditing of dependency-confusion risks.
Authors
- Xiaokang Yin (ORCID: https://orcid.org/0000-0002-1617-4561)
- Xiaoya Zhu (ORCID: https://orcid.org/0000-0002-4672-902X)
- Jiajia Sun (ORCID: https://orcid.org/0009-0006-7670-3396)
- Fangfang Zhao (ORCID: https://orcid.org/0009-0003-4420-5972)
- Shengli Liu (ORCID: https://orcid.org/0009-0007-0603-4200)
- Jiaqi Chen (ORCID: https://orcid.org/0009-0001-1082-245X)
- Guowei Dong
- Long Liu
Institutions
- PLA Information Engineering University (CN)
Publication Details
- Journal
- Journal of Computer Security
- Published
- 2026-10-30
- DOI
- https://doi.org/10.1177/0926227x261505352
- Primary Topic
- Software Engineering Research
- Type
- article
- Field-Weighted Citation Impact
- 0.00