Skip to content

Commit

Permalink
feat(checker): add nasm checker
Browse files Browse the repository at this point in the history
Signed-off-by: Fabrice Fontaine <fabrice.fontaine@orange.com>
  • Loading branch information
ffontaine committed Jan 24, 2023
1 parent caa5612 commit 39aaaf7
Show file tree
Hide file tree
Showing 5 changed files with 47 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 @@ -167,6 +167,7 @@
"mutt",
"mysql",
"nano",
"nasm",
"nbd",
"ncurses",
"neon",
Expand Down
20 changes: 20 additions & 0 deletions cve_bin_tool/checkers/nasm.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright (C) 2022 Orange
# SPDX-License-Identifier: GPL-3.0-or-later


"""
CVE checker for nasm:
https://www.cvedetails.com/product/14272/Nasm-Netwide-Assembler.html?vendor_id=2638
"""
from __future__ import annotations

from cve_bin_tool.checkers import Checker


class NasmChecker(Checker):
CONTAINS_PATTERNS: list[str] = []
FILENAME_PATTERNS: list[str] = []
VERSION_PATTERNS = [r"NASM ([0-9]+\.[0-9]+\.[0-9]+)"]
VENDOR_PRODUCT = [("nasm", "netwide_assembler")]
Binary file not shown.
Binary file not shown.
26 changes: 26 additions & 0 deletions test/test_data/nasm.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright (C) 2022 Orange
# SPDX-License-Identifier: GPL-3.0-or-later

mapping_test_data = [
{
"product": "netwide_assembler",
"version": "2.12.01",
"version_strings": ["NASM 2.12.01"],
}
]
package_test_data = [
{
"url": "http://rpmfind.net/linux/fedora/linux/development/rawhide/Everything/aarch64/os/Packages/n/",
"package_name": "nasm-2.15.05-3.fc37.aarch64.rpm",
"product": "netwide_assembler",
"version": "2.15.05",
"other_products": [],
},
{
"url": "http://ftp.fr.debian.org/debian/pool/main/n/nasm/",
"package_name": "nasm_2.12.01-1+b1_amd64.deb",
"product": "netwide_assembler",
"version": "2.12.01",
"other_products": [],
},
]

0 comments on commit 39aaaf7

Please sign in to comment.