trailofbits/it-depends

GitHub: trailofbits/it-depends

一款由 Trail of Bits 开发的自动化依赖分析工具,能够为多种编程语言的软件包和源码仓库构建完整的依赖关系图与 SBOM,并支持漏洞扫描。

Stars: 390 | Forks: 24

# It-Depends [![单元测试](https://static.pigsec.cn/wp-content/uploads/repos/2026/05/7dae70a817051456.svg)](https://github.com/trailofbits/it-depends/actions/workflows/tests.yml) [![集成测试](https://static.pigsec.cn/wp-content/uploads/repos/2026/05/822c86ffc6051457.svg)](https://github.com/trailofbits/it-depends/actions/workflows/integration.yml) [![PyPI 版本](https://badge.fury.io/py/it-depends.svg)](https://badge.fury.io/py/it-depends) [![Slack 状态](https://slack.empirehacking.nyc/badge.svg)](https://slack.empirehacking.nyc) It-Depends 是一款能够自动为软件包和任意源代码仓库构建依赖关系图和软件物料清单 (SBOM) 的工具。它支持 Go、JavaScript、Rust、Python、C/C++(cmake 和 autotools)以及 Ubuntu 软件包。 它区别于[类似工具](doc/SIMILAR.md)的特点: * 解析_所有可能的_依赖版本,而不仅仅是单一的可行解析 * 通过 cmake 和 autotools 支持 C/C++,且无需构建项目 * 通过动态分析自动进行原生库依赖映射(_例如_,`pytz` 依赖于 `libtinfo.so.6`) * 针对 [OSV 数据库](https://osv.dev/)进行漏洞扫描 * 软件包之间的依赖相似度比较 ## 安装 ``` pip3 install it-depends ``` 特定生态系统的工具必须单独安装:JavaScript 需安装 `npm`,Rust 需安装 `cargo`,Python 需安装 `pip`,C/C++ 需安装 `autotools`/`cmake`。原生依赖解析和 Ubuntu 软件包分析需要具有可访问 socket 的 Docker 兼容容器运行时环境(_例如_,Docker Desktop、Podman 或 Colima)。 ## 使用 ``` it-depends . # Analyze current directory it-depends . --list # List compatible resolvers it-depends /path/to/project # Analyze a different repository it-depends "pip:numpy" # Analyze a pip package it-depends "ubuntu:libc6@2.35" # Analyze a Ubuntu package it-depends "npm:lodash@>=4.17.0" # Specify a version constraint it-depends --audit "pip:numpy" # Include vulnerability audit it-depends --depth-limit 1 "pip:scikit-learn" # Only direct dependencies it-depends --output-format dot --output-file file.dot . # Output as Graphviz/Dot ``` ## 开发 ``` git clone https://github.com/trailofbits/it-depends cd it-depends make dev uv run it-depends --help make format lint integration ``` ## 致谢 本研究由 [Trail of Bits](https://www.trailofbits.com/) 开发,基于 DARPA 合同号 HR001120C0084(分发声明 A,批准公开分发:分发无限制)支持的工作。本材料中表达的任何观点、发现、结论或建议均属于作者本人,并不一定反映美国政府或 DARPA 的观点。 [Evan Sultanik](https://github.com/ESultanik) 和 [Evan Downing](https://github.com/evandowning) 是当前的积极维护者。[Felipe Manzano](https://github.com/feliam)、[Alessandro Gario](https://github.com/alessandrogario)、[Eric Kilmer](https://github.com/ekilmer)、[Alexander Remie](https://github.com/rmi7) 和 [Henrik Brodin](https://github.com/hbrodin) 均对该工具的创立和开发做出了重大贡献。
标签:C/C++, CMS安全, Docker, Go, JavaScript, OSV, Python, Ruby工具, Rust, SBOM, Trail of Bits, Vercel, WebSocket, 事务性I/O, 云安全监控, 代码安全, 依赖分析, 依赖图, 安全防御评估, 文档安全, 无后门, 漏洞枚举, 硬件无关, 网络流量审计, 请求拦截, 跌倒检测, 软件物料清单, 逆向工具, 静态分析