Skip to content

Add an SBOM for every wolfMQTT build route - #631

Open
sameehj wants to merge 2 commits into
wolfSSL:masterfrom
sameehj:sbom/compliance-tooling
Open

sameehj wants to merge 2 commits into
wolfSSL:masterfrom
sameehj:sbom/compliance-tooling

Conversation

@sameehj

@sameehj sameehj commented Nov 25, 2026

Copy link
Copy Markdown

Summary

  • Vendor wolfssl-compliance-tooling f5385c8 (current master) into tools/sbom/.
  • make sbom and cmake --build build --target sbom hash libwolfmqtt and read wolfmqtt/options.h. TLS builds record wolfSSL as a dependency.
  • Zephyr, ESP-IDF, QNX, Harmony, STM32Cube, Visual Studio, and Arduino use scripts/sbom-port.sh. .github/workflows/sbom.yml runs the shared validator on each route and checks the vendored pin.

Test plan

  • ./configure --disable-tls --disable-examples && make sbom validates, and two runs with SOURCE_DATE_EPOCH match.
  • cmake -B build -DWOLFMQTT_TLS=no && cmake --build build --target sbom, then install-sbom and uninstall-sbom.
  • scripts/sbom-port.sh for Zephyr, compdb, Visual Studio, and Arduino. Each document validates.
  • Shared tooling tests on f5385c8: identity, compdb, Zephyr, autotools, Make, CMake install, sync, and gen-sbom.
  • CI job tls builds wolfSSL and checks the DEPENDS_ON relationship.
  • CI job compliance_tooling_drift matches the pin.

Made with Cursor

Vendor wolfssl-compliance-tooling f5385c8 so Autotools, CMake, Zephyr, and the IDE builds can publish a CycloneDX and SPDX inventory of libwolfmqtt.
Copilot AI balanced review requested due to automatic review settings November 25, 2026 12:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved configuration and dependency detection defects can produce inaccurate SBOMs across multiple build paths, while source distributions omit required files and explicit empty compiler flags incorrectly cause generation to fail.

8 open issues
What changed in this PR

Adds software bill of materials (SBOM) generation across wolfMQTT’s library and embedded build routes using pinned, shared compliance tooling.

Changes:

  • Adds Autotools and CMake targets for generating, installing, and removing SBOMs.
  • Introduces a port wrapper for Zephyr, compilation databases, Visual Studio, and Arduino.
  • Adds usage documentation and CI checks for generation, reproducibility, dependencies, and vendored-tooling drift.
File Description
zephyr/​CMakeLists.txt Adds a comment documenting the Zephyr SBOM command.
tools/​sbom/​VERSION Records the tooling version.
tools/​sbom/​validate_sbom.py Validates essential SBOM structure and dependency metadata.
tools/​sbom/​sbom.am Provides Automake generation and installation targets.
tools/​sbom/​sbom-driver.py Coordinates configuration capture and SBOM generation.
tools/​sbom/​sbom-driver Provides a shell entry point for the driver.
tools/​sbom/​README.md Documents shared tooling interfaces and synchronization.
tools/​sbom/​frontends/​zephyr_sbom.py Extracts Zephyr module sources and configuration.
tools/​sbom/​frontends/​included_sources.py Discovers source files compiled through includes.
tools/​sbom/​frontends/​iar_sbom.py Extracts IAR project sources and defines.
tools/​sbom/​frontends/​compdb_sbom.py Extracts compilation-database sources and defines.
tools/​sbom/​build/​uninstall-sbom.cmake Removes installed SBOM files.
tools/​sbom/​build/​sbom.mk Provides reusable plain-Make SBOM rules.
tools/​sbom/​build/​sbom.cmake Defines shared CMake SBOM targets.
tools/​sbom/​build/​sbom-with-sde.cmake Handles timestamps and private artifact staging.
tools/​sbom/​build/​sbom-validate.cmake Validates SPDX and produces tag-value output.
tools/​sbom/​build/​sbom-paths.cmake Resolves output filenames consistently.
tools/​sbom/​build/​sbom-fail.cmake Reports missing SBOM prerequisites.
tools/​sbom/​build/​install-sbom.cmake Installs generated SBOM files.
tools/​sbom/​.wolfssl-compliance-tooling-rev Pins the vendored tooling revision.
scripts/​sbom-port.sh Adds wolfMQTT-specific port routing.
README.md Introduces SBOM commands and links documentation.
Makefile.am Integrates SBOM targets and distributes shared helpers.
docs/​SBOM.md Documents build routes, outputs, and licensing options.
configure.ac Detects optional SBOM tools.
CMakeLists.txt Wires wolfMQTT into shared CMake SBOM targets.
.gitignore Allows tracking vendored build helpers.
.github/​workflows/​sbom.yml Adds route validation and tooling-drift checks.

Review effort: Balanced

Comment thread CMakeLists.txt Resolved
Comment thread Makefile.am Resolved
Comment thread scripts/sbom-port.sh Resolved
Comment thread scripts/sbom-port.sh Resolved
Comment thread scripts/sbom-port.sh Resolved
Comment thread scripts/sbom-port.sh Resolved
Comment thread scripts/sbom-port.sh Resolved
Comment thread tools/sbom/sbom-driver.py Resolved
CMake writes the wolfSSL version from the linked tree. The port script preprocesses the settings header. The wolfSSL dependency follows ENABLE_MQTT_TLS. The release tarball includes the port script and the SBOM document. Codespell keeps the CNA acronym in the vendored generator. The vendored included_sources.py mode matches the pin.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants