Skip to content

add signature object to citations for json-based sboms#814

Open
sebtiem wants to merge 1 commit into
CycloneDX:dev_1.7_modelfrom
sebtiem:dev_1.7_model
Open

add signature object to citations for json-based sboms#814
sebtiem wants to merge 1 commit into
CycloneDX:dev_1.7_modelfrom
sebtiem:dev_1.7_model

Conversation

@sebtiem
Copy link
Copy Markdown

@sebtiem sebtiem commented Apr 8, 2026

As specified, in a json-based BOM, a citation can contain a signature object.

See https://cyclonedx.org/docs/1.7/json/#citations_items_signature

@sebtiem sebtiem requested a review from a team as a code owner April 8, 2026 12:49
@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented Apr 8, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity

Metric Results
Complexity 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@mr-zepol
Copy link
Copy Markdown
Contributor

mr-zepol commented May 9, 2026

@sebtiem some changes have been made, could you fix the conflicts please

Signed-off-by: Sebastian Tiemann <setie@mailbox.org>
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(Include.NON_NULL)
@JsonPropertyOrder({"bom-ref", "pointers", "expressions", "timestamp", "attributedTo", "process", "note"})
@JsonPropertyOrder({"bomRef", "pointers", "expressions", "timestamp", "attributedTo", "process", "note", "signature"})
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@JsonPropertyOrder uses "bomRef" instead of "bom-ref", this changes the property order from "bom-ref" to "bomRef". The field is annotated with @JsonProperty("bom-ref"), so the serialized name is "bom-ref". Using the Java field name "bomRef" in the property order may not match Jackson's behavior consistently. However, looking at the test JSON, it uses "bom-ref" as the key, so this could cause ordering issues during serialization.

"process": "task-license-scan",
"note": "Auto-detected by license scanner tool - with both, 'attributedTo' and 'process'"
},
{
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

with this change do the tests still pass? I would expect some of the assertions to fail

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.

2 participants