From fab218212388e0a08ab87fff2126f640e43f70fb Mon Sep 17 00:00:00 2001 From: John Safranek Date: Mon, 30 Nov 2026 10:01:39 -0700 Subject: [PATCH] sbom: expect the canonical lowercase package URL wolfSSL's gen-sbom now writes pkg:github package URLs with the lowercase namespace and name that purl-spec requires, plus the v-stable tag form. Match the whole URL in that form in both the autotools and the embedded checks, as wolfSSL's own job does. --- .github/workflows/sbom.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/sbom.yml b/.github/workflows/sbom.yml index cd0a33fc2..8d522f435 100644 --- a/.github/workflows/sbom.yml +++ b/.github/workflows/sbom.yml @@ -113,13 +113,14 @@ jobs: working-directory: wolfssh run: | python3 - <<'PY' - import glob, json + import glob, json, re cdx = json.load(open(glob.glob('wolfssh-*.cdx.json')[0])) assert cdx['bomFormat'] == 'CycloneDX', cdx.get('bomFormat') assert cdx['specVersion'] == '1.6', cdx.get('specVersion') m = cdx['metadata']['component'] assert m['name'] == 'wolfssh', m['name'] - assert m['purl'].startswith('pkg:github/wolfSSL/wolfssh@'), m['purl'] + assert re.fullmatch(r'pkg:github/wolfssl/wolfssh@v[\d.]+-stable', + m['purl']), m['purl'] props = {p['name'] for p in m.get('properties', [])} # The AM_CPPFLAGS/config.h snapshot must capture real build config; # PACKAGE_VERSION always lands from config.h, so its absence means @@ -288,11 +289,12 @@ jobs: run: | pyspdxtools --infile sbom-embedded/wolfssh-embedded.spdx.json python3 - <<'PY' - import json + import json, re cdx = json.load(open('sbom-embedded/wolfssh-embedded.cdx.json')) m = cdx['metadata']['component'] assert m['name'] == 'wolfssh', m['name'] - assert m['purl'].startswith('pkg:github/wolfSSL/wolfssh@'), m['purl'] + assert re.fullmatch(r'pkg:github/wolfssl/wolfssh@v[\d.]+-stable', + m['purl']), m['purl'] # Embedded identity is the source-set hash (no library artifact exists). algs = {h['alg'] for h in m.get('hashes', [])} assert algs, 'no component hash - source-set (--srcs) hash missing'