CycloneDX / CycloneDX/cyclonedx-core-java

Empty metadata --> tool tag causes parsing exception

Ouverte
#784 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Java
Étoiles
120
Forks
90
Merge moyen
12 h 43 min
PR mergées (30 j)
18

Description

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.

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Reproduisez l’exception avec le XML CycloneDX 1.3 présenté, puis suivez la désérialisation à travers org.cyclonedx.model.Bom metadata et org.cyclonedx.model.Tool. Vérifiez si un élément tools vide est accepté par la spécification et considérez l’issue comme terminée lorsque cette entrée est traitée de manière cohérente sans l’exception de parsing signalée.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
java
Domaine
backend
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
45/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.