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

fix: improve experience for users using multiple copies of cve-bin-tool in parallel #4777

Open
terriko opened this issue Feb 6, 2025 · 1 comment
Milestone

Comments

@terriko
Copy link
Contributor

terriko commented Feb 6, 2025

We have a standard set of instructions for folk using cve-bin-tool in parallel jobs that recommends that people separate the database updates from the scans as follows:

https://cve-bin-tool.readthedocs.io/en/latest/how_to_guides/multiple_scans_at_once.html

But it's easy for people to miss that, and we're not perfectly handling the database so that it just magically works, as we've seen in some recent issues including #4773

I think we can do better and have a few ideas we could implement:

  1. Make it so that you can run cve-bin-tool to do an update without requiring a filename to scan. This should maybe be an option (e.g. something like cve-bin-tool --update-only) because in a lot of cases, we want people to know immediately that they need to specify a directory to scan, otherwise they'll see it start running and come back 20 minutes later and the cache will be updated but they'll have no results to look at.
  2. Handle some sort of basic auto-detection of parallel instances and direct people to the doc link above OR automatically switch any jobs to use -u never if there's already a job running and spit out a giant warning message explaining that it was done and why with a link to the docs. Could use a lock file or something for this? This will require some finesse so it won't break people's existing setups and accidentally cause things to never update.

I'm open to better ideas if anyone has any, though.

@terriko terriko added this to the future milestone Feb 6, 2025
@Gyan-max
Copy link

Gyan-max commented Feb 9, 2025

Hi! @terriko I’ve reviewed the issue (#4777) regarding improving the experience for users running multiple copies of cve-bin-tool in parallel. I would like to work on this issue and help implement a solution that introduces a --update-only flag to allow users to update the database without specifying a directory to scan. Additionally, I plan to implement a lock mechanism to prevent parallel database updates and handle the -u never option to ensure smoother execution.

Could you please assign this issue to me? I’d be happy to contribute and ensure it’s resolved effectively.

Thank you!

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