Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve ingestion of CPEs #510

Open
ctron opened this issue Jul 5, 2024 · 1 comment
Open

Improve ingestion of CPEs #510

ctron opened this issue Jul 5, 2024 · 1 comment

Comments

@ctron
Copy link
Contributor

ctron commented Jul 5, 2024

For PURLs we do have an optimized importer by now. A list of PURLs from an SBOM get's batch importer, with an upsert strategy.

However, for CPEs we still have the single "get or insert" strategy. As there seem to be a lot of CPEs in the SBOMs now, that hurts performance a lot.

The idea is to replicate the ingestion process from PURLs and apply the same pattern to CPEs. Batch insertion, plus upsert. A quick check for a single RHEL style SBOMs shows that this should bring down operations quite a bit, just by avoiding duplicates:

➜  sbom bzcat rhel-br-9.2.0.json.bz2 | grep cpe: | sort | wc
   4940    9880  348225
➜  sbom bzcat rhel-br-9.2.0.json.bz2 | grep cpe: | sort -u | wc
     27      54    1944

On the other hand, those CPEs are of type "security" and we can skip them at first. Also see: #509 … However, in the future we might want to ingest this information anyway. So we need to improve the CPE creationg process.

@bobmcwhirter
Copy link
Contributor

I'm now using the pih CPEs to contextualize product-status from CSAF, so yes please, CPEs would be good. I'm currently relying upon graph.ingest_cpe(...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants