Skip to content
Snippets Groups Projects
user avatar
Marta Rybczynska authored
This patch implements the YAML output for CVE-check and re-implements
the coverage pass using this format (also simplifies the logic).

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.

Until now the CVE checker was giving information about CVEs found for
a product (or more products) contained in a recipe. However, there was
no easy way to find out which products or recipes have no CVEs. Having
no reported CVEs might mean there are simply none, but can also mean
a product name (CPE) mismatch.

This patch adds CVE_CHECK_COVERAGE option enabling a new type of
statistics. Then we use the new JSON format to report the information.
The legacy text mode report does not contain it.

This option is expected to help with an identification of recipes with
mismatched CPEs, issues in the database and more.

This work is based on [1], but adding the JSON format makes it easier
to implement, without additional result files.

[1] https://lists.openembedded.org/g/openembedded-core/message/159873

This is a backported version of two patches submitted upstream:
https://lists.openembedded.org/g/openembedded-core/message/163745 and
https://lists.openembedded.org/g/openembedded-core/message/163746



The difference is that we bring back the yaml merge function that is
in the lib/ directory in the upstream proposal.

Signed-off-by: default avatarMarta Rybczynska <marta.rybczynska@huawei.com>
Signed-off-by: default avatarMarta Rybczynska <rybczynska@gmail.com>
2d36b90a
History

Oniro Project

Welcome to the Oniro Project bootstrap git repository! You are welcome to take a tour and play with Oniro's initial code contribution in its final steps toward becoming the project's official code base. And, if you feel like joining, we would love to welcome you among the list of Oniro's initiating supporters. These are exciting times! There couldn't be a better moment for joining Oniro!

Learn more about the Oniro Project.

Read the documentation.

*Oniro is a trademark of Eclipse Foundation.

About

The oniro repository is a collection of bitbake layers that implement the build system support in Oniro Project. Check the README.md file in each of the included layers for layer-specific additional information.

The build system documentation is available in the docs subdirectory.

Contributing

See the CONTRIBUTING.md file.

License

See the LICENSES subdirectory.