Skip to content

Commit

Permalink
feat(checker): Add OpenBLAS
Browse files Browse the repository at this point in the history
  • Loading branch information
qmfrederik committed Feb 1, 2025
1 parent 5ecff54 commit a35331c
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 0 deletions.
1 change: 1 addition & 0 deletions cve_bin_tool/checkers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@
"open_iscsi",
"open_vm_tools",
"openafs",
"openblas",
"opencv",
"openjpeg",
"openldap",
Expand Down
20 changes: 20 additions & 0 deletions cve_bin_tool/checkers/openblas.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright (C) 2025 Keysight Technologies
# SPDX-License-Identifier: GPL-3.0-or-later


"""
CVE checker for OpenBLAS
https://www.cvedetails.com/version-list/26026/106485/1/Openblas-Project-Openblas.html
"""
from __future__ import annotations

from cve_bin_tool.checkers import Checker


class OpenblasChecker(Checker):
CONTAINS_PATTERNS: list[str] = []
FILENAME_PATTERNS: list[str] = []
VERSION_PATTERNS = [r"OpenBLAS ([0-9]+\.[0-9]+\.[0-9]+)"]
VENDOR_PRODUCT = [("openblas-project", "openblas")]
Binary file not shown.
20 changes: 20 additions & 0 deletions test/test_data/openblas.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright (C) 2025 Keysight Technologies
# SPDX-License-Identifier: GPL-3.0-or-later

mapping_test_data = [
{
"product": "openblas",
"version": "0.3.26",
"version_strings": [
"OpenBLAS 0.3.26 NO_LAPACKE DYNAMIC_ARCH NO_AFFIN SINGLE_THREADED"
],
}
]
package_test_data = [
{
"url": "http://de.archive.ubuntu.com/ubuntu/pool/universe/o/openblas/",
"package_name": "libopenblas0-pthread_0.3.26+ds-1_amd64.deb",
"product": "openblas",
"version": "0.3.26",
},
]

0 comments on commit a35331c

Please sign in to comment.