Skip to content

feat: add make sbom / install-sbom / uninstall-sbom targets#227

Open
MarkAtwood wants to merge 4 commits into
wolfSSL:masterfrom
MarkAtwood:feat/add-make-sbom
Open

feat: add make sbom / install-sbom / uninstall-sbom targets#227
MarkAtwood wants to merge 4 commits into
wolfSSL:masterfrom
MarkAtwood:feat/add-make-sbom

Conversation

@MarkAtwood

Copy link
Copy Markdown

Summary

  • Adds make sbom, make install-sbom, and make uninstall-sbom targets to wolfEngine's autotools build for EU CRA compliance evidence (CycloneDX 1.6 + SPDX 2.3 output)
  • Adds AC_CHECK_PROG checks for python3 and pyspdxtools in configure.ac

Usage

make sbom WOLFSSL_DIR=/path/to/wolfssl
# produces: wolfengine-1.4.0.cdx.json  wolfengine-1.4.0.spdx.json  wolfengine-1.4.0.spdx
pyspdxtools --infile wolfengine-1.4.0.spdx.json   # must pass

make install-sbom   # installs to $(datadir)/doc/wolfengine/
make uninstall-sbom

WOLFSSL_DIR must point to a wolfssl checkout containing scripts/gen-sbom (branch feat/sbom-embedded, or master once wolfSSL/wolfssl#10343 merges).

Notes

  • wolfEngine has no generated options.h; feature flags come from the installed wolfssl. --options-h is read from $(WOLFSSL_INCLUDEDIR)/wolfssl/options.h (defaults to $(WOLFSSL_DIR)/include; override with make sbom WOLFSSL_INCLUDEDIR=... if wolfssl headers live elsewhere)
  • wolfEngine's libtool version-info 1:4:0 produces libwolfengine.so.1.0.4, not libwolfengine.so.1.4.0 — the staged .so is located with find rather than a hardcoded version suffix
  • uninstall-hook dependency ensures make uninstall removes SBOM files

Adds CycloneDX + SPDX SBOM generation via wolfssl's gen-sbom script.
Usage: make sbom WOLFSSL_DIR=/path/to/wolfssl

wolfEngine has no generated options.h; uses installed wolfssl's
options.h (via WOLFSSL_INCLUDEDIR, defaults to WOLFSSL_DIR/include).
Library SONAME discovered dynamically from staged install since
libtool version-info 1:4:0 produces libwolfengine.so.1.0.4.
Copilot AI review requested due to automatic review settings June 23, 2026 22:34
@MarkAtwood MarkAtwood requested a review from sameehj June 23, 2026 22:36

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.

Pull request overview

Adds SBOM generation + install/uninstall targets to the autotools build to produce CycloneDX 1.6 and SPDX 2.3 outputs (via wolfSSL’s scripts/gen-sbom), and wires tool detection into configure.ac.

Changes:

  • Adds make sbom, make install-sbom, and make uninstall-sbom targets (plus uninstall hook integration).
  • Introduces configure-time detection for SBOM-related tools (python3, pyspdxtools).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
Makefile.am Adds SBOM build/install/uninstall targets and staging logic for SBOM generation artifacts.
configure.ac Adds AC_CHECK_PROG checks for SBOM-related tools.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Makefile.am Outdated
Comment thread Makefile.am Outdated
Replace the inline SBOM recipe with the shared, product-agnostic
scripts/sbom.am used across the wolfSSL autotools stack. wolfEngine
just declares what it is (a libwolfengine shared library that links both
wolfSSL and OpenSSL) and includes the fragment, gaining reproducible
output, license/version pinning, SPDX validation, dependency recording
(wolfssl + openssl), and an install/uninstall hook. Switch configure to
AC_PATH_PROG + AC_SUBST, expand the README, and add a SBOM CI workflow.

Signed-off-by: Sameeh Jubran <sameeh@wolfssl.com>
@sameehj sameehj force-pushed the feat/add-make-sbom branch from 88495c6 to ce3c236 Compare July 10, 2026 09:50
@dgarske dgarske requested review from jackctj117 and rlm2002 July 10, 2026 18:44

@rlm2002 rlm2002 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.

Skoll Code Review

Scan type: reviewOverall recommendation: REQUEST_CHANGES
Findings: 5 total — 3 posted, 2 skipped
3 finding(s) posted as inline comments (see file-level comments below)

Posted findings

  • [High] SBOM build-options capture omits AM_CFLAGS, where all wolfEngine feature macros livescripts/sbom.am:131-133
  • [Medium] config.h fallback path never matches wolfEngine's include/config.hscripts/sbom.am:132
  • [Low] PR trigger 'branches: [*]' does not match slashed base branches.github/workflows/sbom.yml:8-9

Skipped findings

  • [Low] SBOM 'records the configured build options' claim is inaccurate as implemented
  • [Info] install-sbom is opt-in but uninstall-sbom is hooked into uninstall (minor asymmetry)

Review generated by Skoll

Comment thread scripts/sbom.am
Comment thread scripts/sbom.am
Comment thread .github/workflows/sbom.yml
Sync scripts/sbom.am with the canonical wolfSSL copy (capture
AM_CFLAGS/CFLAGS, overridable SBOM_CONFIG_H, $(docdir) sbomdir,
[[:space:]] version parse, GNU-make/uninstall docs), set
SBOM_CONFIG_H=include/config.h and ship the fragment via EXTRA_DIST so the
WE_* feature macros land in the SBOM, and widen the workflow pull_request
filter to '**'.

Signed-off-by: Sameeh Jubran <sameeh@wolfssl.com>
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.

5 participants