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

Parse and utilize version information from CVE Description #646

Closed
jeremylong opened this issue Jan 22, 2017 · 1 comment
Closed

Parse and utilize version information from CVE Description #646

jeremylong opened this issue Jan 22, 2017 · 1 comment

Comments

@jeremylong
Copy link
Owner

To make dependency-check more accurate the tool should extract version ranges from the CVE text. As an example see https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-3558

"Hibernate Validator 4.1.0 before 4.2.1, 4.3.x before 4.3.2, and 5.x before 5.1.2"

There are also version ranges that utilize the word "through" instead of before.

SELECT vulnerability.id
FROM vulnerability INNER JOIN software ON vulnerability.id = software.cveid  INNER JOIN cpeEntry ON cpeEntry.id = software.cpeentryid
WHERE DESCRIPTION LIKE '% before 0%'
OR DESCRIPTION LIKE '% before 1%'
OR DESCRIPTION LIKE '% before 2%'
OR DESCRIPTION LIKE '% before 3%'
OR DESCRIPTION LIKE '% before 4%'
OR DESCRIPTION LIKE '% before 5%'
OR DESCRIPTION LIKE '% before 6%'
OR DESCRIPTION LIKE '% before 7%'
OR DESCRIPTION LIKE '% before 8%'
OR DESCRIPTION LIKE '% before 9%'
OR DESCRIPTION LIKE '% through 0%'
OR DESCRIPTION LIKE '% through 1%'
OR DESCRIPTION LIKE '% through 2%'
OR DESCRIPTION LIKE '% through 3%'
OR DESCRIPTION LIKE '% through 4%'
OR DESCRIPTION LIKE '% through 5%'
OR DESCRIPTION LIKE '% through 6%'
OR DESCRIPTION LIKE '% through 7%'
OR DESCRIPTION LIKE '% through 8%'
OR DESCRIPTION LIKE '% through 9%'
GROUP BY vulnerability.id
HAVING COUNT(DISTINCT cpeEntry.vendor)=1
AND COUNT(DISTINCT cpeEntry.product)=1
)

Once implemented consider removing the patch for issue #534.

@jeremylong
Copy link
Owner Author

With the JSON data feeds this is no longer needed.

@lock lock bot locked and limited conversation to collaborators Jul 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant