Commit Graph

16 Commits (master)

Author SHA1 Message Date
Sameeh Jubran 433c6ae85c sbom: name each document after the configuration it describes
Both output files were wolfboot-<version>.{cdx,spdx}.json, so every
configuration at a given version wrote to the same two paths. wolfBoot has
on the order of 100 target configurations and each is a different image
with a different source set, so building a second one overwrote the first
with no warning.

Put TARGET, SIGN and HASH in the name, on the Make and the CMake route
alike, so the two routes stay in step.

This does not fix the identity of the documents themselves. gen-sbom
derives both the CycloneDX serialNumber and the SPDX documentNamespace
from name and version only, so sim and stm32h7 at 2.9.0 still share
urn:uuid:6dc51759-ade2-5967-b392-2f23ed0eb4df, which a tool that keys on
serialNumber treats as one project. That is a wolfGlass change, and it
is not worked around here.

Signed-off-by: Sameeh Jubran <sameeh@wolfssl.com>
2026-08-20 15:22:16 +02:00
Sameeh Jubran a4ef6c4618 sbom: describe the wolfSSL the image really holds
The bootloader is built WOLFCRYPT_ONLY: include/user_settings.h defines
it for every configuration except a wolfHSM server with certificate-chain
verification, so the image carries the crypto subset of wolfSSL and no
TLS.  The SBOM said nothing about that, leaving an integrator to triage
TLS advisories against a bootloader that cannot run TLS.  The re-vendored
generator reads the macro out of the captured configuration and records
the subset; the wolfssl component stays, because it is the identifier NVD
maps wolfSSL advisories to and the wolfcrypt one has no CVEs mapped to it
at all.  wolfcrypt is now nested inside wolfssl rather than beside it,
which is where it ships from.

wolfBoot also stopped emitting a CPE.  NVD has no wolfssl:wolfboot entry,
and an unlisted CPE is indistinguishable to a scanner from a listed one
with no advisories; the submitted identifier is recorded as
wolfssl:sbom:cpe-requested until the dictionary request is published.

The CMake route passed its -D set with no settings header, so it recorded
none of the configuration user_settings.h derives from that set -- a
different document than `make sbom` produced from the same tree, and one
that could not see WOLFCRYPT_ONLY.  It now passes the same SETTINGS_H and
INCLUDE_DIRS the Makefile does.

Signed-off-by: Sameeh Jubran <sameeh@wolfssl.com>
2026-08-20 15:22:16 +02:00
Sameeh Jubran 240bf081b6 sbom: identify the embedded wolfSSL so a CPE-driven scan can see it
Re-vendor the wolfGlass tip that gives every dependency component a CPE
alongside its PURL, and that emits pkg:github identifiers a consumer can
actually resolve.  The wolfSSL entry in a wolfBoot SBOM previously carried
a PURL only, and that PURL pointed at a git tag which does not exist
(wolfSSL releases are tagged `-stable`), so an integrator monitoring NVD
could not match wolfSSL advisories against this firmware.

The CMake route also described a different product than the Make route:
it never declared the wolfSSL dependency, so its `components` array was
empty, and it recorded wolfBoot as a GPL-3.0-only library rather than a
GPL-3.0-or-later firmware image.  Both routes now emit the same component
identity for the same configuration.

wolfCrypt stays inventoried as wolfBoot's own sources.  It is not a
separate NVD product; its advisories are published against
wolfssl:wolfssl, so the wolfSSL identifiers cover that code.

Signed-off-by: Sameeh Jubran <sameeh@wolfssl.com>
2026-08-20 15:22:16 +02:00
Sameeh Jubran 66f6701a02 Vendor wolfGlass SBOM tooling and switch wolfBoot to it
Signed-off-by: Sameeh Jubran <sameeh@wolfssl.com>
2026-08-20 15:22:16 +02:00
Sameeh Jubran 142de77ed3 sbom: generate SBOMs from every wolfBoot build system
wolfBoot ships as source. Users build it in many ways. Before this
change, only the plain Make build could make an SBOM. So a user could not
make an SBOM for the build that the user runs.

This change adds one shared engine (tools/scripts/wolfboot-sbom.sh, which
calls wolfSSL gen-sbom) and a front end for each build system. Every
build makes a CycloneDX 1.6 and SPDX 2.3 document. The engine captures
the configuration with the host compiler, so the SBOM is the same for
GCC, Clang, LLVM, IAR, armcl, CCRX, and XC32.

Routes:
  - Make, arch.mk, and vendor SDKs: make sbom TARGET=<t> SIGN=<a>
  - CMake and the Pico SDK: cmake --build <dir> --target sbom
  - IAR Embedded Workbench: ide-sbom/iar_sbom.py
  - Any IDE with a compilation database: ide-sbom/compdb_sbom.py
  - TI CCS, MPLAB X, Renesas, Xilinx: ide-sbom/route_through_sbom.sh
  - Per-HAL component: make sbom-hal TARGET=<t>
  - Zephyr module: ide-sbom/zephyr_sbom.py

Make the SBOM reproducible. The captured macros can hold an absolute host
path. For example, arch.mk passes -DPICO_SDK_PATH=$(PICO_SDK_PATH). The
driver now redacts each absolute path but keeps the macro name, so the
configuration record stays complete. Add --no-scrub for debug.

Add a validator (ide-sbom/validate_sbom.py) and a CI canary
(.github/workflows/test-sbom.yml) that runs and validates every route.
The canary also checks that no host path leaks into the SBOM.

Add docs/SBOM.md. The tools are product-neutral by design, so they can be
shared across wolfSSL products later without logic changes.

Signed-off-by: Sameeh Jubran <sameeh@wolfssl.com>
2026-08-20 15:22:16 +02:00
Daniele Lacamera 776378ca78 Preparing release v2.8.0 + update copyright 2026-04-16 13:11:56 +02:00
Mattia Moffa b5fab30310 Enable NSC veneers when TZEN=1, even without WOLFCRYPT_TZ 2026-03-18 22:26:32 +01:00
Mattia Moffa 6dfe2671f5 Support stm32h5 TrustZone build via CMake 2026-01-27 18:36:08 +01:00
gojimmypi 7d0e735522
doc polish 2025-11-20 17:05:12 -08:00
gojimmypi eaf029fbc5
CMake Improvements 2025-11-18 17:44:43 -08:00
gojimmypi fbd8dcf8a2
Update Copyright year to 2025 2025-10-15 11:33:53 -07:00
Daniele Lacamera fce6149cf8 Update license GPL2 -> GPL3 2024-04-16 16:46:15 +02:00
David Garske 80ac15693c Fixed STM32H7 UART 5. Added CMake support for DEBUG_UART. Adjust example config to use correct QSPI offsets for update partition. 2023-03-06 16:25:06 +01:00
Cameron McQuinn 98690cbc6d Fix image generation when signing is disabled 2023-01-12 14:57:58 -07:00
Cameron McQuinn 8ace007cd8 Improvements and fixes for CMake 2022-12-15 00:56:57 -07:00
Lealem Amedie 18bfcecd6b wolfBoot cmake support 2022-12-07 13:00:10 -08:00