Page MenuHomeFreeBSD

Generate SBOM files as part of the build
Needs ReviewPublic

Authored by khorben on Fri, Apr 17, 5:31 PM.
Tags
None
Referenced Files
F153364645: D56474.diff
Mon, Apr 20, 5:49 PM
Unknown Object (File)
Mon, Apr 20, 7:20 AM
Unknown Object (File)
Sun, Apr 19, 6:21 PM
Unknown Object (File)
Sun, Apr 19, 8:25 AM
Unknown Object (File)
Sun, Apr 19, 3:41 AM
Unknown Object (File)
Sat, Apr 18, 5:58 AM
Unknown Object (File)
Sat, Apr 18, 5:11 AM
Unknown Object (File)
Sat, Apr 18, 5:10 AM
Subscribers

Details

Reviewers
bapt
emaste
philip
Summary

This introduces the following option:

  • MK_SBOM: enables the generation of SBOM files during the build.

This option uses bomtool(1) from the pkgconf project, as provided by the MK_PKGCONF option. Consequently, MK_SBOM is automatically disabled when MK_PKGCONF is disabled.

The following parameters are available as well:

  • BOMTOOL: Path to bomtool(1) (for SPDX version 2 files)
  • SBOMDIR: Source directory for pkg-config files (release/sbom/pkgconfig)
  • SPDXDIR: Destination for SPDX version 2 files (/usr/share/sbom/spdx)

Another tool from the pkgconf project, spdxtool(1), is planned for import and will use the following options:

  • JSONLDDIR: Destination for SPDX version 3 files (/usr/share/sbom/jsonld)
  • SPDXTOOL: Path to spdxtool(1) (for SPDX version 3 files)

Sponsored by: Alpha-Omega, The FreeBSD Foundation

Test Plan

After importing the corresponding .pc files in release/sbom/pkgconfig from https://github.com/illuusio/freebsd-src/tree/sbom-pkgconfig:

$ make buildworld
[...]
$ ls obj/amd64.amd64/tmp/usr/share/sbom/spdx/*.spdx
lib80211.spdx           libelftc.spdx           libpfctl.spdx
lib9p.spdx              libevent1.spdx          libpjdlog.spdx
libalias.spdx           libexecinfo.spdx        libpmc.spdx
[...]

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped