Re: [OE-core] [PATCH] cve-check: add json format
On Thu, 10 Feb 2022 at 16:28, Marta Rybczynska wrote: >> This isn't part of the standard Python library, you'll have to >> replicate the logic. > > Do you mean copying part of the class or reimplementing it? Reimplement, unless it's so complicated that we need to embed a copy. As this is just dictionary merging, I suspect its easier to just handcode it. Ross -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#161622): https://lists.openembedded.org/g/openembedded-core/message/161622 Mute This Topic: https://lists.openembedded.org/mt/88668523/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [OE-core] [PATCH] cve-check: add json format
On Thu, Feb 10, 2022 at 3:36 PM Ross Burton wrote: > > > +from jsonmerge import Merger > > This isn't part of the standard Python library, you'll have to > replicate the logic. > > Do you mean copying part of the class or reimplementing it? > One suggestion would be to move more of the logic into > lib/oe/cve_check.py so the class doesn't get too big. > > This is possible. Kind regards, Marta -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#161621): https://lists.openembedded.org/g/openembedded-core/message/161621 Mute This Topic: https://lists.openembedded.org/mt/88668523/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [OE-core] [PATCH] cve-check: add json format
On Tue, 25 Jan 2022 at 09:59, Marta Rybczynska wrote: > 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. Nice, thanks. > +from jsonmerge import Merger This isn't part of the standard Python library, you'll have to replicate the logic. One suggestion would be to move more of the logic into lib/oe/cve_check.py so the class doesn't get too big. Ross -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#161614): https://lists.openembedded.org/g/openembedded-core/message/161614 Mute This Topic: https://lists.openembedded.org/mt/88668523/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [OE-core] [PATCH] cve-check: add json format
On Tue, Jan 25, 2022 at 10:59 AM Marta Rybczynska via lists.openembedded.org wrote: > 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. > > 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 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#161276): https://lists.openembedded.org/g/openembedded-core/message/161276 Mute This Topic: https://lists.openembedded.org/mt/88668523/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-