ENH: Generate SPDX 2.3 Software Bill of Materials at configure time#5817
Draft
ENH: Generate SPDX 2.3 Software Bill of Materials at configure time#5817
Conversation
Implement build-time generation of a Software Bill of Materials (SBOM) in SPDX 2.3 JSON format. The SBOM documents ITK and all enabled third-party dependencies with their names, versions, SPDX license identifiers, and dependency relationships. - Add CMake/ITKSBOMGeneration.cmake with SBOM generation logic - Add ITK_GENERATE_SBOM option (default ON) to CMakeLists.txt - Generate sbom.spdx.json in the build directory at configure time - Install sbom.spdx.json alongside LICENSE, NOTICE, and README.md - Support FFTW as optional GPL dependency in SBOM - Provide itk_sbom_register_package() for remote modules to extend SBOM Co-authored-by: dzenanz <1792121+dzenanz@users.noreply.github.com>
- Fix comment to say 'configure time' not 'build time' - Use HTTPS for libpng and libtiff download URLs - Add hasExtractedLicensingInfo section for custom LicenseRef identifiers Co-authored-by: dzenanz <1792121+dzenanz@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Generate Software Bill of Materials at build time
ENH: Generate SPDX 2.3 Software Bill of Materials at configure time
Feb 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ITK lacks a machine-readable SBOM describing third-party dependencies, versions, and licenses for a given build configuration. The existing
NOTICEfile is static, not build-aware, and not parseable by SBOM tooling.This adds SPDX 2.3 JSON SBOM generation at CMake configure time, producing
sbom.spdx.jsonin the build directory with all enabled ThirdParty modules and their metadata.Changes
CMake/ITKSBOMGeneration.cmake(new): Core SBOM generation moduleitk_generate_sbom()— iteratesITK_MODULES_ENABLED, filters ThirdParty modules, emits SPDX 2.3 JSON with packages, relationships, and extracted licensing info for customLicenseRef-*identifiersitk_sbom_register_package()— public API for remote modules to register their own SBOM entriesCMakeLists.txt:ITK_GENERATE_SBOMoption (defaultON), SBOM generation hook afterITKModuleEnablement, install rule forsbom.spdx.jsonRemote module extensibility
Output structure
Default build produces 22 packages (ITK + 21 ThirdParty deps) with
DESCRIBESandDEPENDS_ONrelationships,hasExtractedLicensingInfofor public-domain custom license refs (NIFTI, GIFTI, SLATEC). Disabled via-DITK_GENERATE_SBOM=OFF.PR Checklist
Refer to the ITK Software Guide for
further development details if necessary.
Original prompt
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.