Skip to content

Add a version header, declare the PURL for west spdx - #35

Open
Frauschi wants to merge 1 commit into
wolfSSL:masterfrom
Frauschi:zephyr-module-security-refs
Open

Frauschi wants to merge 1 commit into
wolfSSL:masterfrom
Frauschi:zephyr-module-security-refs

Conversation

@Frauschi

Copy link
Copy Markdown
Member

west spdx only lists a module's identifiers from security: external-references in zephyr/module.yml. wolfPSA had none, so SBOMs gave scanners nothing to match against.

  • zephyr/module.yml: adds pkg:github/wolfssl/wolfpsa@v5.9.4. There's no CPE, because NVD doesn't list wolfPSA yet.
  • wolfpsa/wolfpsa_version.h: adds LIBWOLFPSA_VERSION_STRING/_HEX, in the same form as wolfSSL's version.h. This is the first machine-readable wolfPSA version, and the SBOM tooling can read it. It isn't named version.h because Zephyr puts wolfpsa/ first on the include path, where it would shadow <version.h>.
  • New Version Check workflow: fails when the CHANGELOG heading, the README, the PURL or a pushed tag disagree with the header. The wolfSSL -stable CI pins aren't checked, because CI moves to a new wolfSSL release before the matching wolfPSA release.

Tested: the check passes on this branch, and fails on stale, suffixed or commented-out versions in scratch copies.

Copilot AI balanced review requested due to automatic review settings October 20, 2026 15:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The checker accepts mismatched version suffixes in both the PURL and README.

1 open issue
What changed in this PR

Adds machine-readable wolfPSA release metadata for Zephyr SBOM identification and CI version consistency checks.

Changes:

  • Declares the wolfPSA PURL in Zephyr metadata.
  • Adds public version macros in a distinctively named header.
  • Checks release metadata and pushed tags against the header.
File Description
zephyr/​module.yml Adds the versioned wolfPSA PURL.
wolfpsa/​wolfpsa_version.h Defines string and hexadecimal version macros.
.github/​workflows/​version-check.yml Runs version validation on pushes and pull requests.
.github/​scripts/​check-version.sh Checks release metadata and tag consistency.

Review effort: Balanced

Comment thread .github/scripts/check-version.sh Outdated
Zephyr's west spdx records a module's identifiers in modules-deps.spdx
only from the security: external-references list in zephyr/module.yml.
wolfPSA had none, so an SBOM made with west spdx gave a vulnerability
scanner nothing to match the wolfPSA sources against.

Add the pkg:github PURL of the v5.9.4 release, in the form the wolfSSL SBOM
tooling emits. There is no CPE: NVD does not list wolfPSA yet, and an
unlisted CPE would read as a match that does not exist.

wolfPSA had no machine-readable version, only the CHANGELOG heading and
README text. Add wolfpsa/wolfpsa_version.h with LIBWOLFPSA_VERSION_STRING
and LIBWOLFPSA_VERSION_HEX in the same form as wolfSSL's version.h, with
the decimal digits in place (5.10.12 is 0x05010012). It is also the version
source the SBOM tooling's --version-file/--version-macro needs. The name is
not version.h because the Zephyr module puts wolfpsa/ first on the global
include path, where it would shadow the <version.h> that wolfSSL's
settings.h and wc_port.h fall back to.

Add a Version Check workflow running .github/scripts/check-version.sh. It
fails when the HEX value, the first CHANGELOG heading (skipping an
"Unreleased" section), the module.yml PURL or the README's "wolfPSA vX.Y.Z"
disagree with the header, and on a tag push whose name is not vX.Y.Z.
The wolfSSL -stable pins are not checked, since CI moves to a new wolfSSL
release before the matching wolfPSA release.
@Frauschi
Frauschi force-pushed the zephyr-module-security-refs branch from c21f0ef to 8a4cb1f Compare October 21, 2026 07:41
@Frauschi

Copy link
Copy Markdown
Member Author

The failing CI test is addressed in #36.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants