Skip to content

Conversation

@echeng3805
Copy link

@echeng3805 echeng3805 commented Jan 9, 2026

This PR captures the current state of SBOM generation support in SwiftPM, so that @bkhouri and I can create a dev toolchain. We want to add the dev toolchain to some slides.

THIS PR IS NOT INTENDED FOR PRODUCTION

Summary of features:

  • New 'swift package generate-sbom' command for generating SBOMs
  • Integration with 'swift build' command via --sbom-spec flag
  • Support for CycloneDX 1.7 and SPDX 3.0.1 formats
  • Product-based and package-based SBOM generation
  • JSON schema validation for generated SBOMs

Requires: swiftlang/swift-installer-scripts#499

@bkhouri bkhouri changed the title draft: create a Swift dev toolchain with SBOM (Software Bill of Materials) generation support [DNM]: create a Swift dev toolchain with SBOM (Software Bill of Materials) generation support Jan 9, 2026
@bkhouri
Copy link
Contributor

bkhouri commented Jan 9, 2026

@swift-ci test self hosted

@bkhouri
Copy link
Contributor

bkhouri commented Jan 9, 2026

@swift-ci test

@bkhouri
Copy link
Contributor

bkhouri commented Jan 9, 2026

@swift-ci test windows

@bkhouri
Copy link
Contributor

bkhouri commented Jan 9, 2026

The current Windows self hosted build is here: https://ci-external.swift.org/job/pr-swiftpm-windows-self-hosted/3382/

@bkhouri bkhouri changed the title [DNM]: create a Swift dev toolchain with SBOM (Software Bill of Materials) generation support [DNM]: SBOM (Software Bill of Materials) generation support Jan 12, 2026
@bkhouri
Copy link
Contributor

bkhouri commented Jan 12, 2026

@swift-ci test

@bkhouri
Copy link
Contributor

bkhouri commented Jan 12, 2026

@swift-ci test windows

@bkhouri
Copy link
Contributor

bkhouri commented Jan 12, 2026

@swift-ci test

@bkhouri
Copy link
Contributor

bkhouri commented Jan 12, 2026

@swift-ci test windows

@bkhouri
Copy link
Contributor

bkhouri commented Jan 12, 2026

@swift-ci test

1 similar comment
@bkhouri
Copy link
Contributor

bkhouri commented Jan 13, 2026

@swift-ci test

@bkhouri
Copy link
Contributor

bkhouri commented Jan 13, 2026

@swift-ci test windows

@bkhouri
Copy link
Contributor

bkhouri commented Jan 13, 2026

macOS self hosted failed to clone the repository. I'm retriggering all self hosted CI builds

@swift-ci test self hosted

@swiftlang swiftlang deleted a comment from echeng3805 Jan 13, 2026
@bkhouri
Copy link
Contributor

bkhouri commented Jan 13, 2026

@swift-ci test

@bkhouri
Copy link
Contributor

bkhouri commented Jan 13, 2026

Windows platform build was started against the previous comms. Re-triggering Windows builds

@swift-ci test windows

@bkhouri
Copy link
Contributor

bkhouri commented Jan 13, 2026

Windows platform build was started against the previous comms. Re-triggering Windows builds

@swift-ci test windows

@bkhouri
Copy link
Contributor

bkhouri commented Jan 14, 2026

@swift-ci test

@bkhouri
Copy link
Contributor

bkhouri commented Jan 14, 2026

Windows platform build was started against the previous comms. Re-triggering Windows builds

@swift-ci test windows

@bkhouri
Copy link
Contributor

bkhouri commented Jan 14, 2026

The Linux smoke tests failed due to an infrastructure issue. I'm retriggering

@swift-ci smoke test linux

@bkhouri
Copy link
Contributor

bkhouri commented Jan 14, 2026

@swift-ci test windows

@bkhouri
Copy link
Contributor

bkhouri commented Jan 14, 2026

@swift-ci test

@bkhouri
Copy link
Contributor

bkhouri commented Jan 14, 2026

The Windows platform test triggered against commit ID ab223c294e351419e0ef61623c888b9ed939858f, which is the commit before the latest pushed. I am re-triggering the Windows builds again

@swift-ci test windows

@shahmishal
Copy link
Member

Please keep the trigger separate from other content.

@bkhouri
Copy link
Contributor

bkhouri commented Jan 14, 2026

@swift-ci test

@bkhouri
Copy link
Contributor

bkhouri commented Jan 14, 2026

@swift-ci test windows

@bkhouri
Copy link
Contributor

bkhouri commented Jan 24, 2026

@swift-ci test windows

1 similar comment
@bkhouri
Copy link
Contributor

bkhouri commented Jan 26, 2026

@swift-ci test windows

echeng3805 and others added 26 commits January 27, 2026 17:26
This commit adds comprehensive SBOM generation capabilities to Swift Package Manager, supporting both CycloneDX 1.7 and SPDX 3.0.1 specifications.

Key features:
- New 'swift package generate-sbom' command for generating SBOMs
- Integration with 'swift build' command via --sbom flag
- Support for CycloneDX 1.7 and SPDX 3.0.1 formats
- Product-based and package-based SBOM generation
- Dependency graph extraction and relationship tracking
- PURL (Package URL) generation for components
- JSON schema validation for generated SBOMs
- Comprehensive test coverage with fixtures

New modules:
- SBOMModel: Core SBOM data structures and conversion logic
- Validators for CycloneDX and SPDX formats
- Extractors for components, dependencies, and metadata
- Converters for both SBOM specifications

This implementation enables users to generate software bills of materials
for their Swift packages, improving supply chain security and compliance.
This reverts commit ab223c2.
@echeng3805 echeng3805 force-pushed the echeng3805/sbom-squashed branch from b471fc3 to 0a8fd3c Compare January 28, 2026 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants