]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
cve-check: add json format
authorMarta Rybczynska <rybczynska@gmail.com>
Fri, 22 Apr 2022 14:17:50 +0000 (16:17 +0200)
committerSteve Sakoman <steve@sakoman.com>
Mon, 25 Apr 2022 15:12:56 +0000 (05:12 -1000)
commit92b6011ab25fd36e2f8900a4db6883cdebc3cd3d
tree46ae47e0d1461f1653316ffaa29fd0ddf9c2258f
parent8c0aa16d76e5492f774fcfe08c829c877991afbd
cve-check: add json format

Backport to dunfell from master df567de36ae5964bee433ebb97e8bf702034994a

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. The text format is enabled by default
to maintain compatibility, while the JSON format is disabled
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: Steve Sakoman <steve@sakoman.com>
meta/classes/cve-check.bbclass
meta/lib/oe/cve_check.py