-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
dependencies: CVE scanner for repository_locations.bzl metadata. #13552
Conversation
This is a custom CVE scanner that consumes the NIST CVE database and heuristically matches against the CPEs, versions and last update stamps in repository_locations.bzl. Future PRs will create a CI job that runs this on a periodic basis (every few hours) to provide a CVE early warning system. Example output: Based on heuristic matching with the NIST CVE database, Envoy may be vulnerable to: CVE ID: CVE-2019-19391 CVSS v3 score: 9.1 Severity: CRITICAL Published date: 2019-11-29 Last modified date: 2019-12-19 Dependencies: com_github_luajit_luajit Description: ** DISPUTED ** In LuaJIT through 2.0.5, as used in Moonjit before 2.1.2 and other products, debug.getinfo has a type confusion issue that leads to arbitrary memory write or read operations, because certain cases involving valid stack levels and > options are mishandled. NOTE: The LuaJIT project owner states that the debug libary is unsafe by definition and that this is not a vulnerability. When LuaJIT was originally developed, the expectation was that the entire debug library had no security guarantees and thus it made no sense to assign CVEs. However, not all users of later LuaJIT derivatives share this perspective. Affected CPEs: - cpe:2.3:a:moonjit_project:moonjit:* - cpe:2.3:a:luajit:luajit:* Risk level: Low Testing: cve_scan_test.py unit tests, manual. Signed-off-by: Harvey Tuch <[email protected]>
Signed-off-by: Harvey Tuch <[email protected]>
Signed-off-by: Harvey Tuch <[email protected]>
@@ -412,6 +412,8 @@ elif [[ "$CI_TARGET" == "docs" ]]; then | |||
# Validate dependency relationships between core/extensions and external deps. | |||
tools/dependency/validate_test.py | |||
tools/dependency/validate.py | |||
# Validate the CVE scanner works. TODO(htuch): create a dedicated tools CI target. | |||
python3.8 tools/dependency/cve_scan_test.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need the python3.8
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, the datetime methods we use are more recent.
Looks great and will need the |
@lizan friendly ping on review. |
This is a custom CVE scanner that consumes the NIST CVE database and
heuristically matches against the CPEs, versions and last update stamps
in repository_locations.bzl.
Future PRs will create a CI job that runs this on a periodic basis
(every few hours) to provide a CVE early warning system.
Example output:
Based on heuristic matching with the NIST CVE database, Envoy may be vulnerable to:
CVE ID: CVE-2019-19391
CVSS v3 score: 9.1
Severity: CRITICAL
Published date: 2019-11-29
Last modified date: 2019-12-19
Dependencies: com_github_luajit_luajit
Description: ** DISPUTED ** In LuaJIT through 2.0.5, as used in Moonjit before
2.1.2 and other products, debug.getinfo has a type confusion issue
that leads to arbitrary memory write or read operations, because
certain cases involving valid stack levels and > options are
mishandled. NOTE: The LuaJIT project owner states that the debug
libary is unsafe by definition and that this is not a vulnerability.
When LuaJIT was originally developed, the expectation was that the
entire debug library had no security guarantees and thus it made no
sense to assign CVEs. However, not all users of later LuaJIT
derivatives share this perspective.
Affected CPEs:
Risk level: Low
Testing: cve_scan_test.py unit tests, manual.
Signed-off-by: Harvey Tuch [email protected]