owenrumney / go-sarif

Go library for sarif - Static Analysis Results Interchange Format
The Unlicense
66 stars 21 forks source link

Provide schema validation when opening a report #81

Open kehoecj opened 1 week ago

kehoecj commented 1 week ago

The https://github.com/Boeing/config-file-validator was hoping to use go-sarif to provide schema validation of a sarif report. It doesn't look like sarif.Open provides this functionality as it just unmarshalls the JSON. Is there a way in your library to then validate this report after loading it into a report object?

owenrumney commented 1 week ago

@kehoecj - I don't see why not. I'll bake in the schema and run the validation during the open. I'm away for the next few days but I can take a look next week