Feat/implement findcpes cpe search#3937
Open
melbiialy wants to merge 2 commits intoeclipse-sw360:mainfrom
Open
Feat/implement findcpes cpe search#3937melbiialy wants to merge 2 commits intoeclipse-sw360:mainfrom
melbiialy wants to merge 2 commits intoeclipse-sw360:mainfrom
Conversation
…ersion Implement findCpes in CveSearchHandler to query CVE Search API and return matching CPE strings. Filter by version when provided; empty or "*" version returns all CPEs. Handle null/empty inputs and wrap IOException in TException. Signed-off-by: melbiialy <mahmoudelbialy109@gmail.com>
Signed-off-by: melbiialy <mahmoudelbialy109@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.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.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.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.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements findCpes in the CveSearch Thrift service to search CPEs by vendor, product and version.
Changes
findCpes(1: string vendor, 2: string product, 3: string version)inCveSearchServiceincvesearch.thriftwith Javadoc.findCpesinCveSearchHandlerthat:CveSearchWrapper.search(vendor, product)to query the CVE Search API and obtainList<CveSearchData>.CveSearchData.getVulnerable_configuration()(map keys)."*"version returns all CPEs.getVersionFromCpe()(version at index 5).IOExceptionfrom the CVE Search API inTExceptionwith cause.findCpesandgetVersionFromCpe, and Thrift docstring for the method.Example usage
findCpes("apache", "httpd", "2.4")→ Set of CPEs likecpe:2.3:a:apache:httpd:2.4:...findCpes("apache", "httpd", "*")→ Set of all Apache httpd CPEsfindCpes("apache", "httpd", "")→ Set of all Apache httpd CPEsDependencies
No new dependencies.
Issue: #3936
Suggest Reviewer
@GMishx @deo002