{"id":13717409,"url":"https://github.com/microsoft/sbom-tool","last_synced_at":"2025-05-12T15:36:17.485Z","repository":{"id":41342930,"uuid":"498824328","full_name":"microsoft/sbom-tool","owner":"microsoft","description":"The SBOM tool is a highly scalable and enterprise ready tool to create SPDX 2.2 compatible SBOMs for any variety of artifacts.","archived":false,"fork":false,"pushed_at":"2025-05-02T20:25:57.000Z","size":2472,"stargazers_count":1774,"open_issues_count":64,"forks_count":157,"subscribers_count":27,"default_branch":"main","last_synced_at":"2025-05-02T21:26:30.189Z","etag":null,"topics":["sbom","sbom-generator"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/microsoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":"SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-06-01T16:58:49.000Z","updated_at":"2025-04-30T03:56:22.000Z","dependencies_parsed_at":"2023-09-28T21:27:07.865Z","dependency_job_id":"11490d76-adc8-4519-ab93-3f1ff6f7d26a","html_url":"https://github.com/microsoft/sbom-tool","commit_stats":{"total_commits":252,"total_committers":33,"mean_commits":7.636363636363637,"dds":0.7658730158730158,"last_synced_commit":"ad9b9c066955d83eb05736152e0c42634c8d75b9"},"previous_names":[],"tags_count":75,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fsbom-tool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fsbom-tool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fsbom-tool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fsbom-tool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/microsoft","download_url":"https://codeload.github.com/microsoft/sbom-tool/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253766541,"owners_count":21960936,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["sbom","sbom-generator"],"created_at":"2024-08-03T00:01:21.813Z","updated_at":"2025-05-12T15:36:17.459Z","avatar_url":"https://github.com/microsoft.png","language":"C#","funding_links":[],"categories":["Dependency intelligence","Open Source Security","Software Bill of Materials","Official projects","others","C#","SBOM Generation"],"sub_categories":["SCA and SBOM","Network Security","Repositories"],"readme":"# SBOM Tool\n\n[![Build](https://github.com/microsoft/sbom-tool/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/microsoft/sbom-tool/actions/workflows/build.yml)\n![GitHub all releases](https://img.shields.io/github/downloads/microsoft/sbom-tool/total)\n![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/microsoft/sbom-tool?include_prereleases)\n\n## Introduction\n\nThe SBOM tool is a highly scalable and enterprise ready tool to create SPDX 2.2 compatible SBOMs for any variety of artifacts. The tool uses the [Component Detection](https://github.com/microsoft/component-detection) libraries to detect components and the [ClearlyDefined](https://github.com/clearlydefined/clearlydefined) API to populate license information for these components.\n\n## Table of Contents\n\n* [Download and Installation](#download-and-installation)\n* [Run the tool](#run-the-tool)\n* [Integrating SBOM tool to your CI/CD pipelines](#integrating-sbom-tool-to-your-cicd-pipelines)\n* [Telemetry](#telemetry)\n* [Contributing](#contributing)\n* [Security](#security)\n* [Trademarks](#trademarks)\n\n## Download and Installation\n\n### Executables for Windows, Linux, macOS\n\nWe distribute executables and SBOM files of the tool in [GitHub Releases](https://github.com/microsoft/sbom-tool/releases) page. You can go and download binaries manually or use commands below to get the latest version of the tool for your platform.\n\nPlease check the [CLI Reference](docs/sbom-tool-cli-reference.md) document for additional help regarding the CLI tool.\n\n#### Package managers\n\n##### WinGet\n\n```shell\nwinget install Microsoft.SbomTool\n```\n\n##### Homebrew\n\n```shell\nbrew install sbom-tool\n```\n\n#### Manual download\n\n##### Windows (PowerShell)\n\n```powershell\nInvoke-WebRequest -Uri \"https://github.com/microsoft/sbom-tool/releases/latest/download/sbom-tool-win-x64.exe\" -OutFile \"sbom-tool.exe\"\n```\n\n##### Linux (curl)\n\n```bash\ncurl -Lo sbom-tool https://github.com/microsoft/sbom-tool/releases/latest/download/sbom-tool-linux-x64\nchmod +x sbom-tool\n```\n\n##### macOS (curl)\n\n```bash\ncurl -Lo sbom-tool https://github.com/microsoft/sbom-tool/releases/latest/download/sbom-tool-osx-x64\nchmod +x sbom-tool\n```\n\n#### Building SBOM tool as docker image\n\nClone this repo and build the docker image.\n\n```bash\ngit clone https://github.com/microsoft/sbom-tool\ncd sbom-tool\ndocker build . -t ms_sbom_tool\n```\n\nYou can then use the tool normally, by mounting the directories to be scanned using docker bind mounts.\n\n### SBOM .NET Tool\n\nThe sbom-tool can also be installed as a .NET tool using the following command:\n\n```powershell\ndotnet tool install --global Microsoft.Sbom.DotNetTool\n```\n\n### SBOM API NuGet package\n\nPlease add and authenticate the Microsoft GitHub NuGet package [registry](https://github.com/orgs/microsoft/packages?repo_name=sbom-tool) to your nuget.config. Then install the `Microsoft.Sbom.Api` package to your project using these [instructions](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-nuget-registry#installing-a-package)\n\nPlease check the [API Reference](docs/sbom-tool-api-reference.md) document for additional help regarding the SBOM tool C# Api.\n\n## Run the tool\n\n### SBOM Generation\n\nOnce you have installed the command line tool for your OS, run the tool using this command:\n\n```\nsbom-tool generate -b \u003cdrop path\u003e -bc \u003cbuild components path\u003e -pn \u003cpackage name\u003e -pv \u003cpackage version\u003e -ps \u003cpackage supplier\u003e -nsb \u003cnamespace uri base\u003e\n```\n\nThe drop path is the folder where all the files to be shipped are located. All these files will be hashed and added to the files section of the SBOM. The build components path is usually your source folder, tool will scan this folder to search for project files like *.csproj or package.json to see what components were used to build the package. Tool uses [component-detection](https://github.com/microsoft/component-detection) to scan for components and dependencies, visit its Github page to get more information about supported components. The package name and version represent the package the SBOM is describing.\n\nEach SBOM has a unique namespace that uniquely identifies the SBOM, we generate a unique identifier for the namespace field inside the SBOM, however we need a base URI that would be common for your entire organization. For example, a sample value for the `-nsb` parameter could be `https://companyName.com/teamName`, then the generator will create the namespace that would look like `https://companyName.com/teamName/\u003cpackageName\u003e/\u003cpackageVersion\u003e/\u003cnew-guid\u003e`. Read more about the document namespace field [here](https://spdx.github.io/spdx-spec/v2.2.2/document-creation-information/#65-spdx-document-namespace-field).\n\nA more detailed list of available CLI arguments for the tool can be found [here](docs/sbom-tool-arguments.md)\n\n### SBOM Validation\n\nWith an SBOM file in hand, use the tool to validate the output file with the command:\n\n```\nsbom-tool validate -b \u003cdrop path\u003e -o \u003coutput path\u003e -mi SPDX:2.2\n```\n\nThis sample command provides the minimum mandatory arguments required to validate an SBOM:\n     `-b` should be the path same path used to generate the SBOM file.\n     In this scenario, the tool will default to searching for an SBOM at the `\u003cdrop path\u003e\\_manifest\\spdx_2.2\\manifest.spdx.json` path.\n     `-o` is the output path, including file name, where the tool should write the results to.\n     `-mi` is the ManifestInfo, which provides the user's desired name and version of the manifest format.\n\nCurrently only SPDX2.2 is supported.\n\n### SBOM Redact\n\nUse the tool to redact any references to files from a given SBOM or set of SBOMs with either of the following commands:\n\n```\nsbom-tool redact -sd \u003cdirectory containing SBOMs to redact\u003e -o \u003coutput path\u003e\n```\n\n```\nsbom-tool redact -sp \u003cpath to the SBOM to redact\u003e -o \u003coutput path\u003e\n```\n\nThis command will generate a mirrored set of SBOMs in the output directory, but with the file references removed. Note that the SBOM directory and output path arguments can not reference the same directory and the output path should point to an existing, empty directory.\n\n## Integrating SBOM tool to your CI/CD pipelines\n\nYou can follow these guides to integrate the SBOM tool into your CI/CD pipelines\n\n* [Setting up GitHub Actions to use the SBOM tool](docs/setting-up-github-actions.md).\n* [Setting up Azure DevOps Pipelines to use the SBOM tool](docs/setting-up-ado-pipelines.md).\n\n## Telemetry\n\nBy default, telemetry will output to your output file path and will be a JSON blob. No data is submitted to Microsoft.\n\n## Contributing\n\nPlease follow the steps [here](docs/building-from-source.md) to clone and build this repository from source.\n\nThis project welcomes contributions and suggestions.  Most contributions require you to agree to a\nContributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us\nthe rights to use your contribution. For details, visit \u003chttps://cla.opensource.microsoft.com\u003e.\n\nWhen you submit a pull request, a CLA bot will automatically determine whether you need to provide\na CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions\nprovided by the bot. You will only need to do this once across all repos using our CLA.\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\nFor more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or\ncontact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\n\n## Security\n\nMicrosoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).\n\nIf you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described in the [Security.md](https://github.com/microsoft/sbom-tool/blob/main/SECURITY.md).\n\n## Trademarks\n\nThis project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft\ntrademarks or logos is subject to and must follow\n[Microsoft's Trademark \u0026 Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general).\nUse of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.\nAny use of third-party trademarks or logos are subject to those third-party's policies.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrosoft%2Fsbom-tool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicrosoft%2Fsbom-tool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrosoft%2Fsbom-tool/lists"}