Open
Description
problem
we have a lot of documents here, and while they claim to stick to the specs and authoritative guides, this needs to checked/reviewed manually.
what we might automate is:
detect which schema version the respective examples intend to comply to, and check that they actually do this.
possible solution
the following process it intended to run on each change of the default branch, as well as on every pull-request:
- rename all CycloneDX example files to
*.cdx.{json,xml}
-- so they are distinguished from other files in the example folders - traverse over all example files -
*.cdx.{json,xml}
- detect the schema
- JSON:
$.schemaVersion
starts with main version - like1.2.xyz
->CycloneDX v1.2
- XML: see the actual XML schema of the document root node
- JSON:
- validate against the respective schema
- detect the schema
Implementation details:
- unclear whether to use one/many of our existing CycloneDX libraries, or to implement a standalone-solution in here.
pro/cons of using existing library
+ easy to implement, as most work was done already
+ maintenance can be driven by dependabot/renovate
- rely on the library being up-to-date
pro/cons of standalone
+ independent
- initial development might be slow
- needs manual maintenance
Activity