Skip to content

WP-7651: Ship the package SBOM inside the image - #102

Merged
maxim-voronko merged 1 commit into
developmentfrom
feature/WP-7651-sbom-in-image
Nov 6, 2026
Merged

maxim-voronko merged 1 commit into
developmentfrom
feature/WP-7651-sbom-in-image

Conversation

@maxim-voronko

Copy link
Copy Markdown
Member

Jira: WP-7651

What

  • Dockerfile and Dockerfile.redhat, the same change in both: the installer stage copies files/wsc_app*_sbom.json together with the package. If the SBOM of the installed package is there (the package name with _sbom.json in place of .tar.gz, as on S3), the build checks that it carries the SHA-256 of the package and puts it at /opt/WebSpellChecker/sbom/wproofreader.cdx.json. A mismatch fails the build, so an image never gets the SBOM of another build.
  • Without that file the build goes on as before and logs No SBOM file for <package>, the image has none. SBOMs named after other packages are ignored.
  • README, "Create Docker image", step 2: how to add the SBOM to a build and how to read it from an image.
  • Dockerfile.ubuntu-prebuilt is unchanged: it copies /opt/WebSpellChecker from the Docker Hub image, so it keeps the SBOM.

Why

Image scanners find the operating system packages and the LanguageTool jars on their own, but not our C/C++ libraries, TensorFlow or the Rust crates compiled into AppServer. Trivy and Docker Scout read a CycloneDX file found in an image, and only when its name ends in .cdx.json; Snyk Container and Grype do not read it.

Testing

  • The installer block, taken verbatim from both Dockerfiles, in BuildKit and in the legacy builder: no SBOM (builds, nothing in the image), matching SBOM (in the image, owned by wsc), wrong hash (the build fails with the message), SBOM of another package (ignored).
  • Full builds of Dockerfile with the Linux x64 package 6.17.0.0 build 1086: with the SBOM next to the package it is in the image byte for byte and Docker Scout lists our Conan, cargo and Maven components; without it the image builds as before and has no sbom directory.
  • Trivy read the same file at the same path on the 6.19.0.0 image.
  • Dockerfile.redhat was not built.

Release

  • Builds without an SBOM in files/, including customer builds, work as before.
  • Release images get the SBOM once the Image Release Pipeline puts it next to the package; until then they are built as today, without it.

@maxim-voronko
maxim-voronko merged commit 6da0683 into development Nov 6, 2026
@maxim-voronko
maxim-voronko deleted the feature/WP-7651-sbom-in-image branch November 6, 2026 10:01
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.

2 participants