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
If a property is required, it should also not be an empty string. There are many places in the BOM schema where we use "required": [...] but do not also verify that these properties have "minLength": 1.
`component.name` and `service.name` are required as per CycloneDX specification, but the schema doesn't sufficiently enforce this requirement (CycloneDX/specification#461).
Because DT trims names from the BOM during model conversion, empty or blank names end up becoming `null`. Since the respective database columns have a `NOT NULL` constraint on them, inserting or updating such components will always fail.
Usually we would not want to try to "repair" data, but the name being empty appears to be so common that there's no other sensible way for us to deal with it.
With this change, empty names will end up being saved as `-` instead, to signal the absence of a proper value.
FixesDependencyTrack#2821
Signed-off-by: nscuro <[email protected]>
If a property is required, it should also not be an empty string. There are many places in the BOM schema where we use
"required": [...]
but do not also verify that these properties have"minLength": 1
.An example is
.components[].name
:specification/schema/bom-1.6.schema.json
Line 831 in 8e131b1
It may be that optional properties should have this constraint as well. Consider the following example:
If
whatever
does not have a version, it would be more clear if that key were to be omitted rather than provided as an empty string.The text was updated successfully, but these errors were encountered: