Skip to content

ci: prove a share change still generates product SBOMs - #47

Open
sameehj wants to merge 4 commits into
masterfrom
ci/sbom-product-canary
Open

sameehj wants to merge 4 commits into
masterfrom
ci/sbom-product-canary

Conversation

@sameehj

@sameehj sameehj commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • On a change to share/, CI copies that copy into a temporary wolfBoot checkout and a temporary wolfTPM checkout.
  • CI then generates each SBOM and validates it. The product repositories keep their pinned copy.
  • The old Make macro name wolfglass_sbom_rule still works, so the current wolfBoot Makefile parses after the copy.

Test plan

  • Confirm the canary workflow runs on this pull request.
  • Confirm the wolfBoot job generates a sim SBOM and validate_sbom.py passes.
  • Confirm the wolfTPM job generates an SBOM and validate_sbom.py passes.
  • Confirm the jobs do not push to wolfBoot or wolfTPM.

Overlay share/ onto wolfBoot and wolfTPM and generate each SBOM.
Keep the old Make macro name so the current wolfBoot Makefile still parses.
Copilot AI balanced review requested due to automatic review settings October 20, 2026 14:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The wolfTPM canary omits the required spdx-tools dependency and fails before validation.

1 open issue
What changed in this PR

Adds CI canaries to check shared SBOM tooling against temporary wolfBoot and wolfTPM checkouts without updating their pinned copies.

Changes:

  • Generate, validate, scan for host paths, and upload product SBOMs.
  • Preserve compatibility with the legacy Make macro name.
File Description
share/​build/​sbom.mk Adds the legacy wolfglass_sbom_rule alias.
.github/​workflows/​sbom-canary.yml Adds wolfBoot and wolfTPM SBOM canary jobs.

Review effort: Balanced

Comment thread .github/workflows/sbom-canary.yml Resolved
The autotools fragment stops when pyspdxtools is absent.
configure records PYSPDXTOOLS. A later install leaves that variable empty.
SourceFileLoader.load_module is gone in Python 3.15, so the low-findings
self-test exited before it ran. Use exec_module, and pass maxsplit to
re.split by name. This is the same fix that landed with #36.

@Frauschi Frauschi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Both canary jobs look right in the logs, and the Make alias expands identically on GNU Make 3.81 and 4.4. One gap: the CMake helper has the same rename problem (inline).

History: da30e72 is already on master via #36, so a rebase drops it. Please also squash 92da754 and 8ef25b9 into the first commit.

Comment thread share/build/sbom.mk
# Products vendored before the rename still call wolfglass_sbom_rule.
# Keep that name so a sync does not break their Makefile.
# Use a recursive reference, not $(value): $(call) must expand $(1) and $(2).
wolfglass_sbom_rule = $(wolfssl_compliance_tooling_sbom_rule)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The CMake helper needs the same alias. wolfBoot cmake/sbom.cmake:116 and wolfTPM CMakeLists.txt:1156 call wolfglass_add_sbom(), which build/sbom.cmake no longer defines. With wolfTPM's arguments against this branch, configure fails with Unknown CMake command "wolfglass_add_sbom". This fixes it:

macro(wolfglass_add_sbom)
    wolfssl_compliance_tooling_add_sbom(${ARGN})
endmacro()

The canary misses it because neither job builds through CMake. A CMake step in the wolfTPM job would cover it.

Line 197 restates line 196 and can go.

run: |
python3 tooling/tools/wolfssl-compliance-tooling-sync \
--src tooling \
--dest product

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please pass --prune. Without it, a file removed from share/ stays in the product, which hides the break this job should catch.

# repositories keep their pinned copy. This job does not push to them.
#
# wolfBoot is the plain-Make product. wolfTPM is the autotools product.
# Add a product here only after it vendors tools/sbom/.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Worth a line here that both products build from their default branch, so a break there fails our share/ PRs.

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.

3 participants