You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
BomRefDiscriminator.from_bom() does not collect citation bom-refs (CycloneDX 1.7) #1068
CycloneDX 1.7 added bom.citations. Each Citation may carry a bom_ref (cyclonedx/model/citation.py, Citation.bom_ref). The 1.7 schema requires bom-ref values to be unique across all elements, but citation bom-refs are not passed into the discriminator.
JSON and XML serialization both enter with BomRefDiscriminator.from_bom(bom): before writing the document (cyclonedx/output/json.py around line 74, cyclonedx/output/xml.py around line 64). Empty or colliding citation bom-refs are therefore not de-duplicated against the rest of the BOM at output time.
This was left out of scope in #1064 (citations on Bom for v1.7) and noted as a follow-up by jkowalleck: #1064 (comment)
Suggested fix
Include citation bom-refs in from_bom(), for example (c.bom_ref for c in bom.citations), and add tests that cover uniqueness against components, services, and vulnerabilities, plus empty citation bom-refs.
The same gap exists beyond citations. BomRefDiscriminator.from_bom() also does not collect the bom-refs of:
- OrganizationalEntity, OrganizationalContact, PostalAddress
- Occurrence (component evidence)
- DisjunctiveLicense, LicenseExpression, LicenseExpressionDetails
- Standard, Requirement, Level (definitions)
- ModelCard, EnergyProvider (added in the open PR #914)
@jkowalleck should this be tackled here, by making from_bom() collect bom-refs from every model that has one, or would you prefer separate issues per model or area?
Activity
jkowalleck commentedon Nov 16, 2026
lets have this marked as a (accepted/known) defect.
@juliosuas , do you want to work on a fix for this?
juliosuas commentedon Nov 16, 2026
Yes, I'll take it. I'll open a PR that makes BomRefDiscriminator.from_bom() collect citation bom-refs, with a regression test. Thanks for triaging.
wiebe-vandendriessche commentedon Nov 19, 2026
The same gap exists beyond citations. BomRefDiscriminator.from_bom() also does not collect the bom-refs of:
@jkowalleck should this be tackled here, by making from_bom() collect bom-refs from every model that has one, or would you prefer separate issues per model or area?
jkowalleck commentedon Nov 20, 2026
sounds good. Go ahead; and thank you for working on this topic.
PS: lets have one PR that adds all the forgotten things to the
BomRefDiscriminator.from_bom().