LLNL / Surfactant

Modular framework for file information extraction and dependency analysis to generate accurate SBOMs
MIT License
24 stars 16 forks source link

JSON schema for validation #161

Open mcutshaw opened 8 months ago

mcutshaw commented 8 months ago

Is your feature request related to a problem? Please describe. Currently we don't appear to have an included copy of the full JSON schema. Ideally we would be able to include a copy and programmatically compare against it for development work, potentially CI/CD tests and just general use for SBOM validation.

Describe the solution you'd like We could use something like https://pypi.org/project/jsonschema/ in conjunction with including a JSON copy of the schema. I'd be happy to handle this one, however I would want to verify that there would be no issue including that additional dependency, the correct JSON schema to be included (and that we're able to include it), and any additional input.

Describe alternatives you've considered None

Additional context None

nightlark commented 8 months ago

This sounds like it would probably be an optional dependency used for tests, which would be fine.

The only issue is that technically the CyTRICS schema hasn't been publicly released yet (in some sense, we just happen to have dataclasses that closely map to it and read/write a format that matches the schema).

mcutshaw commented 8 months ago

Understood, I'll look into this on my side and see what peoples thoughts are.