Skip to content

Commit 3d5668e

Browse files
committed
chore(sbom): minor cleanups from code review
Refresh stale Makefile.am comment about SBOM_LICENSE_TEXT, clarify build_extracted_licensing_infos docstring, and replace a hardcoded wolfssl-5.9.1.spdx.json check with the wildcard glob used elsewhere. Signed-off-by: Sameeh Jubran <sameeh@wolfssl.com>
1 parent 45e2586 commit 3d5668e

3 files changed

Lines changed: 10 additions & 5 deletions

File tree

.github/workflows/sbom.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,10 @@ jobs:
220220
grep -q 'license-text was not provided' /tmp/err || \
221221
{ echo "FAIL: error message missing actionable hint"; \
222222
cat /tmp/err; exit 1; }
223-
test ! -f wolfssl-5.9.1.spdx.json || \
224-
{ echo "FAIL: SBOM file should not exist after refusal"; \
225-
exit 1; }
223+
if ls wolfssl-*.spdx.json >/dev/null 2>&1; then
224+
echo "FAIL: SBOM file should not exist after refusal"
225+
exit 1
226+
fi
226227
227228
- name: License matrix - compound expression
228229
run: |

Makefile.am

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,8 +385,8 @@ WOLFSSL_LIB_DSO_BASENAMES = \
385385
# SBOM_LICENSE_TEXT Path to the actual licence text for any
386386
# LicenseRef-* in SBOM_LICENSE_OVERRIDE. Required
387387
# for SPDX 2.3 conformance whenever a custom
388-
# LicenseRef is in use; without it the SBOM embeds
389-
# a placeholder and validators may reject it.
388+
# LicenseRef is in use; `make sbom` exits with an
389+
# error if it is missing.
390390
sbom:
391391
@if test -z "$(PYTHON3)"; then \
392392
echo ""; \

scripts/gen-sbom

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,10 @@ def build_extracted_licensing_infos(license_expr, license_text):
126126
`licenseDeclared` to be declared once at document level via
127127
`hasExtractedLicensingInfos`. Returns None when no LicenseRef-* is
128128
present so the caller can omit the field entirely.
129+
130+
`license_text=None` produces a placeholder entry; main() rejects
131+
that combination upfront, so this fallback is only reachable from
132+
direct programmatic callers (e.g. tests, library reuse).
129133
"""
130134
refs = extract_license_refs(license_expr)
131135
if not refs:

0 commit comments

Comments
 (0)