]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
cve-check: add json format
authorMarta Rybczynska <rybczynska@gmail.com>
Tue, 29 Mar 2022 12:54:31 +0000 (14:54 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 30 Mar 2022 12:07:38 +0000 (13:07 +0100)
commitdf567de36ae5964bee433ebb97e8bf702034994a
tree973bcddc853b4f8ac6e55120677228556e0507a1
parent6dd0012846c22478c96655216a8bce44147956f8
cve-check: add json format

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.

Output formats are now handed by CVE_CHECK_FORMAT_TEXT and
CVE_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.

Signed-off-by: Marta Rybczynska <marta.rybczynska@huawei.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
meta/classes/cve-check.bbclass
meta/lib/oe/cve_check.py