Skip to content

Dedup uploads per component instead of by TEA product PURL - #20

Merged
vpetersson merged 1 commit into
sbomify:masterfrom
vpetersson-bot:fix/per-component-dedup
Nov 23, 2026
Merged

vpetersson merged 1 commit into
sbomify:masterfrom
vpetersson-bot:fix/per-component-dedup

Conversation

@vpetersson-bot

Copy link
Copy Markdown
Contributor

Problem

For github_release and lockfile apps, the builder decided whether to upload by looking up urn:tei:purl:library.sbomify.com:pkg:github/<repo>@<version> on TEA. That TEI resolves to the product release, not to the component. Once one component of a product had uploaded a version, every other component of that product release looked "already published" and its upload was skipped. That also meant it was never attached to the release.

This is what TEA shows today:

Product release Component Release
Keycloak 26.8.2 Keycloak 26.8.2 ✅
Keycloak JS missing
Dependency Track (bundle) 5.2.2 Dependency Track missing
Dependency Track Frontend 5.2.2 ✅
  • keycloak and keycloak-js both build from keycloak/keycloak, so they share one PURL.
  • dependency-track-frontend creates the bundle's 5.2.2 release, and the bundle's PURL is the backend's (pkg:github/DependencyTrack/dependency-track). The backend run then skips its upload.

Fix

All source types now use the per-component sbomify check that docker/chainguard apps already relied on (sbomify_digest_exists, renamed to sbomify_version_exists). It is keyed on the component version: the image digest for container sources and the config version otherwise. The change is made in both sbom-builder.yml and scripts/run.sh, and it removes the TEA lookup along with the uv setup that existed only for that lookup.

Testing

  • shellcheck -x -S warning scripts/*.sh scripts/*/*.sh and yamllint . both pass.
  • The broken state above was confirmed with tea-cli inspect. The other single-component lockfile/GitHub-release products (caddy, trivy, osv-scanner, syft) and the docker products I sampled are complete.

After merge

Changing the builder does not trigger the per-app workflows. Dispatch SBOM: keycloak-js and SBOM: dependency-track once so the missing SBOMs are uploaded and attached to their 26.8.2 / 5.2.2 releases.

🤖 Generated with Claude Code

The upload check for github_release and lockfile apps looked up
urn:tei:purl:library.sbomify.com:pkg:github/<repo>@<version> on TEA. That
TEI resolves to the product release, not to the component, so once one
component of a product had uploaded a version, every other component of
that product release looked "already published" and was skipped:

- keycloak and keycloak-js share pkg:github/keycloak/keycloak, so the
  Keycloak 26.8.2 release only has the backend SBOM.
- dependency-track-frontend creates the 5.2.2 release of the bundle
  product, whose PURL is the backend's, so the backend was never uploaded.

Use the per-component sbomify check that docker/chainguard apps already
use for every source type, keyed on the component version (image digest
for container sources, config version otherwise).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vpetersson
vpetersson merged commit ec64f77 into sbomify:master Nov 23, 2026
2 checks passed
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