Fix TEA dedup: use PURL-based lookup instead of content hash#12
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
sha256sum sbom-output.json), but enrichment data from deps.dev changes between runs, so the hash was always differentdiscovernever found a match → uploads always attempted → sbomify rejected with "already exists" for the same component+versiontea-cli inspectthat checks by package identity + version (e.g.urn:tei:purl:library.sbomify.com:pkg:docker/library/mariadb@12.2.2)config.yamlbased on source type:pkg:docker/for docker,pkg:oci/for chainguard,pkg:github/for github_release/lockfileTest plan
should_upload=false)should_upload=true)🤖 Generated with Claude Code