Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .github/workflows/sbom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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'
Expand Down
Loading