Skip to content

feat(ISV-5785): rewrite CycloneDX update logic#418

Merged
mmalina merged 7 commits intokonflux-ci:mainfrom
jedinym:ISV-5785
Apr 30, 2025
Merged

feat(ISV-5785): rewrite CycloneDX update logic#418
mmalina merged 7 commits intokonflux-ci:mainfrom
jedinym:ISV-5785

Conversation

@jedinym
Copy link
Copy Markdown
Contributor

@jedinym jedinym commented Apr 24, 2025

This PR rewrites the CycloneDX SBOM update logic using the new API from sbomlib. We bump the version of all SBOMs to 1.6, so the evidence.identity field supports our tag use case (CycloneDX 1.X is forward-compatible).

CycloneDX index image SBOMs are not supported, because Konflux only generates index image SBOMs in the SPDX format.

@jedinym jedinym force-pushed the ISV-5785 branch 3 times, most recently from 078c54e to 286b269 Compare April 24, 2025 10:44
@jedinym
Copy link
Copy Markdown
Contributor Author

jedinym commented Apr 24, 2025

@wcheang @BorekZnovustvoritel Could you please review?

Copy link
Copy Markdown

@BorekZnovustvoritel BorekZnovustvoritel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice addition, I have only 2 notes about some code comments, the functionality looks good to me 👍

Comment thread sbom/handlers/cyclonedx1.py
Comment thread sbom/handlers/spdx2.py Outdated
Comment thread sbom/test_update_component_sbom.py Outdated
@jedinym jedinym force-pushed the ISV-5785 branch 2 times, most recently from 290b5bd to 9b47c6f Compare April 28, 2025 08:24
@jedinym jedinym marked this pull request as ready for review April 28, 2025 08:28
@jedinym jedinym requested a review from a team as a code owner April 28, 2025 08:28
Copy link
Copy Markdown
Contributor

@mmalina mmalina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's give @johnbieren a chance to review this if he wants to. Otherwise we can merge this later today.

jedinym added 7 commits April 29, 2025 16:13
Signed-off-by: Martin Jediny <jedinym@proton.me>
Signed-off-by: Martin Jediny <jedinym@proton.me>
CycloneDX is forward compatible, so we can bump the version to 1.6. This
allows us to populate more fields.

Signed-off-by: Martin Jediny <jedinym@proton.me>
Signed-off-by: Martin Jediny <jedinym@proton.me>
Signed-off-by: Martin Jediny <jedinym@proton.me>
The CycloneDX handler does not need to support index images, because
Konflux generates index image build SBOMs only in the SPDX format.

Signed-off-by: Martin Jediny <jedinym@proton.me>
Signed-off-by: Martin Jediny <jedinym@proton.me>
@johnbieren
Copy link
Copy Markdown
Collaborator

Let's give @johnbieren a chance to review this if he wants to. Otherwise we can merge this later today.

I think 3 approvals are plenty without also giving mine

@jedinym
Copy link
Copy Markdown
Contributor Author

jedinym commented Apr 30, 2025

Could we merge this today?

@mmalina mmalina merged commit 75c8903 into konflux-ci:main Apr 30, 2025
3 checks passed
@mmalina
Copy link
Copy Markdown
Contributor

mmalina commented Apr 30, 2025

I think 3 approvals are plenty without also giving mine

Totally.

Could we merge this today?

Done. Sorry for the delay.

jedinym added a commit to jedinym/release-service-utils that referenced this pull request May 12, 2025
* refactor(ISV-5785): simplify SPDX handler logic

Signed-off-by: Martin Jediny <jedinym@proton.me>

* feat(ISV-5785): implement CycloneDX handler

Signed-off-by: Martin Jediny <jedinym@proton.me>

* feat(ISV-5785): bump CycloneDX version

CycloneDX is forward compatible, so we can bump the version to 1.6. This
allows us to populate more fields.

Signed-off-by: Martin Jediny <jedinym@proton.me>

* fix(ISV-5785): adjust identity generation

Signed-off-by: Martin Jediny <jedinym@proton.me>

* feat(ISV-5785): add CDX property tests

Signed-off-by: Martin Jediny <jedinym@proton.me>

* feat(ISV-5785): remove CDX index image support

The CycloneDX handler does not need to support index images, because
Konflux generates index image build SBOMs only in the SPDX format.

Signed-off-by: Martin Jediny <jedinym@proton.me>

* fix(ISV-5785): remove leftover comments

Signed-off-by: Martin Jediny <jedinym@proton.me>

---------

Signed-off-by: Martin Jediny <jedinym@proton.me>
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.

5 participants