cve-check: add json format
Quoted 4 lines · Marta Rybczynska via lists.openembedded.org
Add an option to output the CVE check in a JSON-based format. This format is easier to parse in software than the original text-based one and allows post-processing by other tools.
Quoted 10 lines
Output formats are now handed by
CVE_CHECK_FORMAT_TEXTandCVE_CHECK_FORMAT_JSON. Both of them are enabled by default.The JSON output format gets generated in a similar way to the text format with the exception of the manifest: appending to JSON arrays requires parsing the file. Because of that we first write JSON fragments and then assemble them in one pass at the end.
Any comments on this approach? It is also building a foundation for adding also per-package statistics and easier post-processing. For example, I do have a script processing the JSON to get a CSV spreadsheet.
Kind regards,
Marta