You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: additional properties on property type in JSON #371
Currently the definition for a property expects keys name and value but neither of them is required and the presence of other keys is not prohibited through a constraint like "additionalProperties": false
This is an inconsistency compared to other types defined on the schema such as component or dependency which disallow additional properties.
Concretely, that means this sample SBOM validates against the schema, but my argument is that it should not:
This seems like a small thing, but I just spent an hour trying to figure out why cyclonedx-core-java would validate an sbom just fine but then fail to parse it. So I think the spec would benefit from a stronger constraint on the property type.
I'm happy to contribute the spec changes for 1.6 if this gets approved.
changed the title [-]Suggestion to disallow additional properties on `property` type[/-][+]bug: additional properties on `property` type in JOSN[/+]on Feb 8, 2024
changed the title [-]bug: additional properties on `property` type in JOSN[/-][+]bug: additional properties on `property` type in JSON[/+]on Feb 8, 2024
Activity
jkowalleck commentedon Feb 7, 2024
checked, can confirm for JSON:
specification/schema/bom-1.4.schema.json
Lines 1147 to 1162 in 8af880d
in contrast to the JSON, the XML defines
specification/schema/bom-1.4.xsd
Lines 1721 to 1734 in 8af880d
in contrast to JSON, the Protobuff defines
specification/schema/bom-1.5.proto
Lines 606 to 609 in 8af880d
jkowalleck commentedon Feb 7, 2024
@stevespringett if the XML & ProtoBuff are the intended solutions,
should I target a bug fix of the JSON for the upcoming v1.6 then?
stevespringett commentedon Feb 8, 2024
Yes please. Thanks @jkowalleck
[-]Suggestion to disallow additional properties on `property` type[/-][+]bug: additional properties on `property` type in JOSN[/+][-]bug: additional properties on `property` type in JOSN[/-][+]bug: additional properties on `property` type in JSON[/+]agschrei commentedon Feb 8, 2024
Thanks to both of you for the quick turnaround on this!
1.6 dev fix properties json - fixes #371 (#375)
stevespringett commentedon Feb 9, 2024
Thanks for reporting @agschrei . Fix will be included in the upcoming v1.6 specification.
[WIP] v1.6 (#323)
[WIP] v1.6 (#323)
1.6 dev fix properties json - fixes CycloneDX#371 (CycloneDX#375)
[WIP] v1.6 (CycloneDX#323)