Skip to content

Comments

Add cosign#833

Open
Ka0o0 wants to merge 8 commits intockotzbauer:mainfrom
Ka0o0:add-cosign
Open

Add cosign#833
Ka0o0 wants to merge 8 commits intockotzbauer:mainfrom
Ka0o0:add-cosign

Conversation

@Ka0o0
Copy link
Contributor

@Ka0o0 Ka0o0 commented Jan 19, 2026

Hi,
This PR introduces the ability to retrieve SBOMs from Cosign attestations and refactors the SBOM source logic to support multiple sources, closing #805 .

It abstracts the SBOM generation and retrieval process behind a new SBOMSource interface, allowing for greater flexibility and the addition of new sources like Cosign alongside the existing Syft integration.

Note 1 I have currently hardcoded the predicate type of the Cosign source to cyclonedx. Cosign would support different options but I was unsure how to model this in the configuration parameters and whether or not it was actually needed.

Note 2: I have created a sources folder and moved the syft folder into it hence the big change. I can revert this if you want but I think it makes sense to have sources of syft and cosign in a folder.

Best regards

@github-actions github-actions bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jan 19, 2026
@codecov-commenter
Copy link

codecov-commenter commented Jan 19, 2026

Codecov Report

❌ Patch coverage is 1.33333% with 74 lines in your changes missing coverage. Please review.
✅ Project coverage is 11.03%. Comparing base (09054d3) to head (e3efe78).
⚠️ Report is 288 commits behind head on main.

Files with missing lines Patch % Lines
internal/sources/cosign/cosign.go 0.00% 32 Missing ⚠️
internal/sources/source.go 0.00% 21 Missing ⚠️
internal/sources/multi_source.go 0.00% 10 Missing ⚠️
main.go 0.00% 5 Missing ⚠️
internal/daemon/daemon.go 0.00% 4 Missing ⚠️
internal/processor/processor.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #833       +/-   ##
===========================================
- Coverage   25.13%   11.03%   -14.10%     
===========================================
  Files           6       16       +10     
  Lines         565     1450      +885     
===========================================
+ Hits          142      160       +18     
- Misses        406     1267      +861     
- Partials       17       23        +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants