-
-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation for custom.json #107
Comments
Hi @macariem, I decided to rethink the experimental "custom" validation in favor of a (future) implementation of OWASP Software Component Verification Standard (SCVS) and its planned "maturity model profiles" (see https://scvs.owasp.org/ and profile example: https://scvs.owasp.org/bom-maturity-model/profiles/examples/ntia-minimum-elements/). In truth, what I coded was based upon rules for SBOM construction/contents we set within my company, IBM, which I was not sure extended as a general rule to everyone. In fact, we can achieve most of IBM's needs with the utility using a custom JSON schema along with the new "patch" command to test for required values. The custom validation functionality is still in the code, but I removed any draft docs hoping to revisit it for a near-future release. I would welcome hearing of what custom validation (use cases) you may have so that I can factor them in future plans (and test for them when I get around to coding). Thanks for the issue and I truly welcome any dialog on the topic :) |
I want to perform extra validation as follows:
|
@macariem Thanks for sharing your use cases. Just wanted to share some initial thoughts on them...
Yes, this is common and one I have... in order to accomplish this, I create a custom JSON schema (variant) file based upon the base CycloneDX schema file and add it to sbom-utility (see https://github.com/CycloneDX/sbom-utility?tab=readme-ov-file#example-validate-using-custom-schema-variants). It can be referenced using the
The addition of conditional logic would be very valuable indeed. However, JSON schema (or even XML schema) cannot easily accomplish this for various reasons (e.g., arrays entries are allowed to not be unique/no unique keys and ordering not guaranteed)... The aforementioned OWASP SCVS standard (which addresses maturity/policy MAY be able to eventually handle such use cases. In any event, the "custom" validation code never was able to support conditional logic (since it is not supported in JSON schema). |
Have you tried the |
Is there a documentation for making a custom.json?
The text was updated successfully, but these errors were encountered: