Skip to content

Fix TEA dedup: use PURL-based lookup instead of content hash#12

Merged
vpetersson merged 1 commit into
masterfrom
fix/tea-purl-dedup
Mar 4, 2026
Merged

Fix TEA dedup: use PURL-based lookup instead of content hash#12
vpetersson merged 1 commit into
masterfrom
fix/tea-purl-dedup

Conversation

@vpetersson
Copy link
Copy Markdown
Contributor

Summary

  • The TEA dedup check was hashing the augmented SBOM content (sha256sum sbom-output.json), but enrichment data from deps.dev changes between runs, so the hash was always different
  • TEA discover never found a match → uploads always attempted → sbomify rejected with "already exists" for the same component+version
  • Replaced with PURL-based tea-cli inspect that checks by package identity + version (e.g. urn:tei:purl:library.sbomify.com:pkg:docker/library/mariadb@12.2.2)
  • PURLs are constructed from config.yaml based on source type: pkg:docker/ for docker, pkg:oci/ for chainguard, pkg:github/ for github_release/lockfile

Test plan

  • Verify TEA check correctly detects already-published versions (should output should_upload=false)
  • Verify new versions still get uploaded (should output should_upload=true)
  • Verify PURL construction for each source type (docker, chainguard, github_release, lockfile)

🤖 Generated with Claude Code

The previous TEA check hashed the augmented SBOM content, but enrichment
data from deps.dev changes between runs, producing a new hash every time.
TEA never found a match, so uploads were always attempted — and rejected
by sbomify with "already exists" for the same component+version.

Switch to PURL-based TEA lookup (tea-cli inspect) which checks by
package identity and version rather than content hash. Construct the
PURL from config.yaml based on source type (docker, chainguard,
github_release, lockfile).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vpetersson vpetersson merged commit 253cdb1 into master Mar 4, 2026
60 of 61 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.

1 participant