Skip to content

Conversation

dervoeti
Copy link
Member

@dervoeti dervoeti commented Oct 17, 2024

Same thing as stackabletech/operator-templating#448, but for our product images. It probably makes sense for the same person to review both this PR and the other.


Use OCI type for PURLs, according to https://github.com/package-url/purl-spec/blob/master/PURL-TYPES.rst#oci

This is more correct in general and most importantly makes the PURL equal to the one Trivy generates for our container images.

This PR is a bit more complicated than the one for operators, since I had to extract the product name (e.g. "kafka") and the architecture before generating the PURL.

I also added another small change to this PR:
The --source-name passed to Syft is now just the name of the image. Currently, it would be sdp/kafka. This change changes it to just kafka. The parameter ist reflected in .metadata.component.name in the SBOM and I think just kafka is the correct value here, it should not include the repository.

@dervoeti dervoeti requested a review from Techassi October 17, 2024 08:27
@dervoeti dervoeti changed the title fix: make PURLs use oci type fix: make PURLs use oci type / fixed SBOM component name Oct 18, 2024
@dervoeti dervoeti self-assigned this Oct 21, 2024
@dervoeti dervoeti requested a review from NickLarsenNZ October 21, 2024 10:56
NickLarsenNZ
NickLarsenNZ previously approved these changes Oct 22, 2024
Copy link
Member

@NickLarsenNZ NickLarsenNZ left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@NickLarsenNZ NickLarsenNZ left a comment

Choose a reason for hiding this comment

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

One more change

@NickLarsenNZ NickLarsenNZ self-requested a review October 22, 2024 13:33
Copy link
Member

@NickLarsenNZ NickLarsenNZ left a comment

Choose a reason for hiding this comment

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

LGTM

@dervoeti dervoeti dismissed Techassi’s stale review October 22, 2024 13:34

Fixed the mentioned issues

@dervoeti dervoeti merged commit 0c5dbc4 into main Oct 22, 2024
9 checks passed
@dervoeti dervoeti deleted the fix/oci-purls branch October 22, 2024 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants