feat: add make sbom / install-sbom / uninstall-sbom targets#227
Open
MarkAtwood wants to merge 2 commits into
Open
feat: add make sbom / install-sbom / uninstall-sbom targets#227MarkAtwood wants to merge 2 commits into
MarkAtwood wants to merge 2 commits into
Conversation
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.
There was a problem hiding this comment.
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, andmake uninstall-sbomtargets (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 on lines
+60
to
+67
| PRODUCT = wolfengine | ||
| VERSION = $(shell grep -m1 'AC_INIT' $(srcdir)/configure.ac | sed "s/.*\[//;s/\].*//") | ||
| GEN_SBOM = $(WOLFSSL_DIR)/scripts/gen-sbom | ||
|
|
||
| SBOM_OUT_DIR = $(builddir) | ||
| SBOM_CDX = $(SBOM_OUT_DIR)/$(PRODUCT)-$(VERSION).cdx.json | ||
| SBOM_SPDX_J = $(SBOM_OUT_DIR)/$(PRODUCT)-$(VERSION).spdx.json | ||
| SBOM_SPDX_TV = $(SBOM_OUT_DIR)/$(PRODUCT)-$(VERSION).spdx |
Comment on lines
+71
to
+85
| sbom: all | ||
| @if test -z "$(WOLFSSL_DIR)"; then \ | ||
| echo "ERROR: WOLFSSL_DIR not set. Usage: make sbom WOLFSSL_DIR=/path/to/wolfssl"; \ | ||
| exit 1; \ | ||
| fi | ||
| @if test -z "$(PYTHON3)"; then \ | ||
| echo "ERROR: python3 not found in PATH."; exit 1; fi | ||
| $(MAKE) install DESTDIR=$(abs_builddir)/_sbom_stage | ||
| $(PYTHON3) $(GEN_SBOM) \ | ||
| --name $(PRODUCT) \ | ||
| --version $(VERSION) \ | ||
| --supplier "wolfSSL Inc." \ | ||
| --options-h $(WOLFSSL_INCLUDEDIR)/wolfssl/options.h \ | ||
| --lib `find $(abs_builddir)/_sbom_stage$(libdir) -name 'libwolfengine.so.*.*.*' | head -1` | ||
| rm -rf $(abs_builddir)/_sbom_stage |
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.
Summary
make sbom,make install-sbom, andmake uninstall-sbomtargets to wolfEngine's autotools build for EU CRA compliance evidence (CycloneDX 1.6 + SPDX 2.3 output)AC_CHECK_PROGchecks forpython3andpyspdxtoolsinconfigure.acUsage
WOLFSSL_DIRmust point to a wolfssl checkout containingscripts/gen-sbom(branchfeat/sbom-embedded, ormasteronce wolfSSL/wolfssl#10343 merges).Notes
options.h; feature flags come from the installed wolfssl.--options-his read from$(WOLFSSL_INCLUDEDIR)/wolfssl/options.h(defaults to$(WOLFSSL_DIR)/include; override withmake sbom WOLFSSL_INCLUDEDIR=...if wolfssl headers live elsewhere)1:4:0produceslibwolfengine.so.1.0.4, notlibwolfengine.so.1.4.0— the staged.sois located withfindrather than a hardcoded version suffixuninstall-hookdependency ensuresmake uninstallremoves SBOM files