CycloneDX / CycloneDX/cyclonedx-core-java

Empty metadata --> tool tag causes parsing exception

Aperta
#784 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Java
Stelle
120
Fork
90
Merge medio
12h 43m
PR unite (30g)
18

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java
Ambito
backend
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.