CycloneDX/sbom-utility

Explore using custom struct tags for CycloneDX property versioning

Offen

#24 geöffnet am 18.05.2023

 (2 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Go (20 Forks)auto 404
enhancementhelp wanted

Repository-Metriken

Stars
 (155 Sterne)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

If we want to have special processing for JSON encoding/decoding (e.g., marshal/unmarshal) it would be helpful to enable this via custom struct tags.

For example:

// v1.3 added "compositions"
Compositions []CDXCompositions `json:"compositions,omitempty" cdx:"v1.3"`
// v1.4 added "vulnerabilities", "signature"
Vulnerabilities []CDXVulnerability `json:"vulnerabilities,omitempty" cdx:"v1.4"`

Contributor Guide