Skip to content

feat: update SBOM external reference type for source code URLs from `… - #233

Merged
tngraf merged 4 commits into
mainfrom
231-update-sbom-external-reference-type-for-source-code-urls
Jul 11, 2026
Merged

feat: update SBOM external reference type for source code URLs from `…#233
tngraf merged 4 commits into
mainfrom
231-update-sbom-external-reference-type-for-source-code-urls

Conversation

@tngraf

@tngraf tngraf commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Update SBOM external reference type for source code URLs from distribution
to source-distribution.

@tngraf
tngraf requested a review from gernot-h July 6, 2026 08:29
@tngraf tngraf linked an issue Jul 6, 2026 that may be closed by this pull request
Comment thread capycli/bom/map_bom.py
component,
ExternalReferenceType.DISTRIBUTION,
CaPyCliBom.SOURCE_URL_COMMENT)
ExternalReferenceType.SOURCE_DISTRIBUTION, "")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should we perhaps make this backward-compatible in central places when consuming an SBOM, probably users still have old (custom) scanners in use?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think there's get_ext_ref_source_url() for backward-compatible parsing, can we just call it here?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Good point. Unfortunately get_ext_ref_source_url() returns a string, but we need the ExternalReference. I have fixed it accordingly.

@gernot-h

Copy link
Copy Markdown
Collaborator

Just cosmetics, I think it would be better if we would use None instead of "" for the comment parameter in get_ext_ref(), think this expresses better our intention. This would however mean a bunch of changes to your MR, not sure if it's worth the effort.

@gernot-h

Copy link
Copy Markdown
Collaborator

Apart from the comments above, the PR looks good, but I didn't test it yet, let me know if I should give it a try!

@tngraf

tngraf commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator Author

Just cosmetics, I think it would be better if we would use None instead of "" for the comment parameter in get_ext_ref(), think this expresses better our intention. This would however mean a bunch of changes to your MR, not sure if it's worth the effort.

Honstly, I added "" and I didn't care... now it is None.

@tngraf

tngraf commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator Author

Just cosmetics, I think it would be better if we would use None instead of "" for the comment parameter in get_ext_ref(), think this expresses better our intention. This would however mean a bunch of changes to your MR, not sure if it's worth the effort.

Aaarrgghhh, mypy error incompatible type "None"; expected "str"

@tngraf
tngraf merged commit e4e93eb into main Jul 11, 2026
5 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.

Update SBOM external reference type for source code URLs

3 participants