microsoft/component-detection
GitHub: microsoft/component-detection
微软开源的跨生态包扫描工具,用于在构建时自动检测项目中使用的开源组件并生成依赖图。
Stars: 540 | Forks: 126
Component Detection
自动检测您使用的开源库。
**Component Detection** (CD) 是一个旨在构建时使用的包扫描工具。它能跨多种包生态系统生成所有检测到的组件的基于图的输出。 Component Detection 也可以作为库来使用,以检测您自己应用程序中的依赖项。  ## 功能特性 Component Detection 支持检测以下生态系统中的库: | 生态系统 | 扫描 | 图创建 | | -------------------------------------------------------------------------------- | ----------------------------------------------- | -------------- | | CocoaPods | ✔ | ✔ | | [Go](docs/detectors/go.md) | ✔ | ❌ | | [Gradle (仅限 lockfiles)](docs/detectors/gradle.md) | ✔ | ❌ | | [Linux (Debian, Alpine, Rhel, Centos, Fedora, Ubuntu)](docs/detectors//linux.md) | ✔ (通过 [syft](https://github.com/anchore/syft)) | ❌ | | [Maven](docs/detectors/maven.md) | ✔ | ✔ | | [NPM (包括 Yarn, Pnpm)](docs/detectors/npm.md) | ✔ | ✔ | | [NuGet (包括 Paket)](docs/detectors/nuget.md) | ✔ | ✔ | | [Pip (Python)](docs/detectors/pip.md) | ✔ | ✔ | | [Poetry (Python, 仅限 lockfiles)](docs/detectors/poetry.md) | ✔ | ❌ | | Ruby | ✔ | ✔ | | Rust | ✔ | ✔ | 有关完整功能的概述,请参阅 [feature-overview.md](docs/feature-overview.md) ## 入门指南 要克隆并运行此应用程序,您需要在计算机上安装 [Git](https://git-scm.com) 和 [.NET 6](https://aka.ms/download-dotnet)。在您的命令行中执行: ``` # Clone 这个 repository $ git clone https://github.com/microsoft/component-detection # 进入该 repository $ cd component-detection # 运行 app $ dotnet run --project ".\src\Microsoft.ComponentDetection\Microsoft.ComponentDetection.csproj" scan --SourceDirectory [PATH TO THE REPO TO SCAN] ``` 查看 [检测器参数](docs/detector-arguments.md) 获取有关如何使用该工具的更多信息。 ## 下载 您可以[下载](https://github.com/microsoft/component-detection/releases/latest)适用于 Windows、macOS 和 Linux 的最新版本 Component Detection。 ### 使用 Codespaces 您可以使用 [GitHub Codespaces](https://docs.github.com/en/codespaces/overview) 在云端运行和开发 Component Detection。为此,请单击存储库顶部的绿色“Code”按钮,然后选择“Open with Codespaces”。这将打开一个新的 Codespace,其中包含已克隆并准备就绪的存储库。 ### 使用 VS Code DevContainer 这与 Codespaces 类似: 1. 确保您满足[要求](https://code.visualstudio.com/docs/remote/containers#_getting-started)并按照 VS Code 中 DevContainer 的安装步骤操作 2. `git clone https://github.com/microsoft/component-detection` 3. 在 VS Code 中打开此存储库 4. 此时应弹出一个通知,提示在容器中重新打开工作区。如果没有,请打开 [`Command Palette`](https://code.visualstudio.com/docs/getstarted/tips-and-tricks#_command-palette) 并输入 `Dev Containers: Reopen in Container`。 # 遥测 默认情况下,遥测数据将以 JSON blob 的形式输出到您的输出文件路径中。不会向 Microsoft 提交任何数据。 # 行为准则 本项目采用了 [Microsoft 开源行为准则](https://opensource.microsoft.com/codeofconduct/)。 有关更多信息,请参阅[行为准则常见问题解答](https://opensource.microsoft.com/codeofconduct/faq/) 或通过 [opencode@microsoft.com](mailto:opencode@microsoft.com) 联系我们,提出任何其他问题或评论。 # 商标 本项目可能包含项目、产品或服务的商标或徽标。Microsoft 商标或徽标的授权使用受 Microsoft 商标与品牌指南的约束并必须遵循该指南。在修改后的本项目版本中使用 Microsoft 商标或徽标不得引起混淆或暗示 Microsoft 的赞助。任何第三方商标或徽标的使用均受制于这些第三方的政策。标签:NuGet, WebSocket, 云安全监控, 依赖分析, 包管理器, 图谱输出, 子域名暴力破解, 开源库扫描, 微软, 构建时扫描, 漏洞扫描基础工具, 组件检测, 统一API, 自动化检测, 请求拦截, 静态分析