Skip to content

fix: update location handling #4769

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

Merged
merged 1 commit into from
Feb 5, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 2 additions & 16 deletions cve_bin_tool/version_scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,7 @@
from cve_bin_tool.log import LOGGER
from cve_bin_tool.parsers.parse import available_parsers, parse, valid_files
from cve_bin_tool.strings import parse_strings
from cve_bin_tool.util import (
DirWalk,
ProductInfo,
ScanInfo,
find_product_location,
inpath,
validate_location,
)
from cve_bin_tool.util import DirWalk, ProductInfo, ScanInfo, inpath

if sys.version_info >= (3, 10):
from importlib import metadata as importlib_metadata
Expand Down Expand Up @@ -288,15 +281,8 @@ def run_checkers(self, filename: str, lines: str) -> Iterator[ScanInfo]:
f'{file_path} {result["is_or_contains"]} {dummy_checker_name} {version}'
)
for vendor, product in checker.VENDOR_PRODUCT:
location = find_product_location(product)
if location is None:
location = "NotFound"
if validate_location(location) is False:
raise ValueError(
f"Invalid location {location} for {product}"
)
yield ScanInfo(
ProductInfo(vendor, product, version, location),
ProductInfo(vendor, product, version, file_path),
file_path,
)

Expand Down
Loading