Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upimplement multiprocessing of CVE retrieval and massively overhaul & enhance pastebin feature #16
Conversation
ryran
added some commits
Oct 30, 2016
ryran
self-assigned this
Oct 30, 2016
ryran
added
the
enhancement
label
Oct 30, 2016
ryran
changed the title from
Threadfun
to
implement multiprocessing of CVE retrieval and massively overhaul & enhance pastebin feature
Oct 30, 2016
ryran
merged commit bd867bd
into
master
Oct 30, 2016
ryran
deleted the
threadfun
branch
Nov 8, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
ryran commentedOct 30, 2016
•
edited
#15 #14
Search queries (
--q-xxx) are always done by a single API (or IAVM Mapper app) request.However, each CVE retrieval was a separate http request against the API and when querying dozens or hundreds of CVEs in serial, the time starts really adding up.
These commits implement multiprocessing for CVE retrieval.
By default, there will be
NUM_CPUS + 1separate worker processes used for making requests. Configurable via-Wor--workers, e.g., on my 4-core system, the help page printed:With these commits, the pastebin system is also massively more robust and handles lots of errors. Woo hoo! Especially important: it gracefully exits (& explains) when trying to send too much data to pastebin (i.e.,
>= 512 KiB). When there are exceptions with the pastebin stuff, approporiate messages are now printed but rhsecapi also actually offers to print the gathered data (that would have been posted to pastebin) to stdout instead.Last but not least, Ctrl-c still works, even when in the middle the multi-process CVE retrieval.