CycloneDX / CycloneDX/cyclonedx-core-java

Empty metadata --> tool tag causes parsing exception

Offen
#784 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Java
Sterne
120
Forks
90
Ø Merge
12 Std. 43 Min.
Gemergte PRs (30 T.)
18

Beschreibung

Hello, I have a question regarding an exception I get when parsing a 1.3 CycloneDX SBOM.

According to the specification, the `` tag in the `` section is an `array`, which does not specify a constraint to it's size: https://cyclonedx.org/docs/1.3/json/#metadata_tools

However, when I try to parse an SBOM like this using your library:

```xml



```

I get this exception:

```
com.fasterxml.jackson.databind.JsonMappingException: Cannot coerce empty String ("") to `org.cyclonedx.model.Tool` value (but could if coercion was enabled using `CoercionConfig`)
at [Source: UNKNOWN; byte offset: #UNKNOWN] (through reference chain: org.cyclonedx.model.Bom["metadata"])
```

The SBOM is generated using a tool, but it does not fill out this property.
I was wondering whether this behavior is intended or whether this is a difference to the specification that I did not understand.

Thank you for your time.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Reproduce the exception with the CycloneDX 1.3 XML shown, then trace deserialization through org.cyclonedx.model.Bom metadata and org.cyclonedx.model.Tool. Confirm whether an empty tools element is accepted by the specification, and consider the issue complete when that input is handled consistently without the reported parsing exception.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
java
Bereich
backend
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.