-
-
Notifications
You must be signed in to change notification settings - Fork 70
Open
Description
cyclonedx validate
fails when metadata.component.externalReferences[0].url
is pointing to a url like this:
ssh://git@github.com:my-org/my-repo.git
If I change the :
after github.com
to /
, then the validation works.
I did put an issue on cyclonedx-gradle-plugin but according to them this is a valid format.
More information in the issue:
To Reproduce
- Set the
externalReferences[0].url
tossh://git@github.com:my-org/my-repo.git
like this:
bom.json:
{
"bomFormat" : "CycloneDX",
"specVersion" : "1.6",
"serialNumber" : "urn:uuid:3877e445-1356-42b3-b11e-b0e2d46e87e7",
"version" : 1,
"metadata" : {
"timestamp" : "2025-05-15T09:32:44Z",
"tools" : {
"components" : [
{
"type" : "application",
"author" : "CycloneDX",
"name" : "cyclonedx-gradle-plugin",
"version" : "2.3.0"
}
],
"services" : [ ]
},
"component" : {
"type" : "application",
"externalReferences" : [
{
"type" : "vcs",
"url" : "ssh://git@github.com:my-org/my-repo.git"
}
]
},
},
...
- Validate the SBOM file:
$ cyclonedx --version
0.27.2+f934c99826339cb8dbb83b439eb2c465fb253fb3
$ cyclonedx validate --input-file bom.json
Validation failed:
Value does not match format "iri-reference"
http://cyclonedx.org/schema/bom-1.6.schema.json#/properties/url/anyOf/0
On instance: /metadata/component/externalReferences/0/url:
ssh://git@github.com:my-org/my-repo.git
Value does not match format "iri-reference"
The string value is not a match for the indicated regular expression
http://cyclonedx.org/schema/bom-1.6.schema.json#/definitions/bomLinkDocumentType
On instance: /metadata/component/externalReferences/0/url:
ssh://git@github.com:my-org/my-repo.git
Value does not match format "iri-reference"
The string value is not a match for the indicated regular expression
http://cyclonedx.org/schema/bom-1.6.schema.json#/definitions/bomLinkElementType
On instance: /metadata/component/externalReferences/0/url:
ssh://git@github.com:my-org/my-repo.git
Unable to validate against any JSON schemas.
BOM is not valid.
Metadata
Metadata
Assignees
Labels
No labels