grype/schema/cyclonedx
Alex Goodman 24d5d4ffb2
Upgrade tool management (#1842)
* upgrade tool management

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* update version file on release

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

---------

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
2024-05-09 16:25:00 -04:00
..
.gitignore feat: swap custom cyclone-dx model for cyclone-dx library (#1038) 2022-12-22 16:35:09 +00:00
cyclonedx.json Upgrade syft to v0.91.0 (#1508) 2023-09-20 16:39:23 -04:00
cyclonedx.xsd Upgrade syft to v0.91.0 (#1508) 2023-09-20 16:39:23 -04:00
Makefile Upgrade tool management (#1842) 2024-05-09 16:25:00 -04:00
README.md Upgrade syft to v0.91.0 (#1508) 2023-09-20 16:39:23 -04:00
spdx.xsd Upgrade syft to v0.91.0 (#1508) 2023-09-20 16:39:23 -04:00

CycloneDX Schemas

grype generates a CycloneDX output. This validation is similar to what is done in syft, validating output against CycloneDX schemas.

Validation is done with xmllint, which requires a copy of all schemas because it can't work with HTTP references. The schemas are modified to reference local copies of dependent schemas.

Updating

You will need to go to https://github.com/CycloneDX/specification/blob/1.5/schema and download the latest bom-#.#.xsd and spdx.xsd.

Additionally, for xmllint to function you will need to patch the bom schema with the location to the SPDX schema by changing:

<xs:import namespace="http://cyclonedx.org/schema/spdx" schemaLocation="http://cyclonedx.org/schema/spdx"/>

To:

<xs:import namespace="http://cyclonedx.org/schema/spdx" schemaLocation="spdx.xsd"/>