Skip to content

feat(checker): sort binary checkers #5230

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
8 changes: 5 additions & 3 deletions cve_bin_tool/version_scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ def __init__(
self.error_mode = error_mode
self.cve_db = CVEDB(sources=sources)
self.validate = validate
self.logger.info("Checkers loaded: %s" % (", ".join(self.checkers.keys())))
self.logger.info(
"Checkers loaded: %s" % (", ".join(sorted(self.checkers.keys())))
)
self.language_checkers = valid_files
self.language_checkers_names = self.available_language_checkers()

Expand Down Expand Up @@ -102,7 +104,7 @@ def available_checkers(cls) -> list[str]:
)
]
all_checker_names = list(BUILTIN_CHECKERS.keys()) + entrypoint_checker_names
return all_checker_names
return sorted(all_checker_names)

def remove_skiplist(self, skips: list[str]) -> None:
"""Remove specific checkers If a checker is in the skip list, it will be removed from this dictionary. If it's not found or is not a valid checker name, it logs error messages."""
Expand All @@ -120,7 +122,7 @@ def remove_skiplist(self, skips: list[str]) -> None:
def print_checkers(self) -> None:
"""Print checkers and logs an informational message that lists the names of the checkers stored in the dictionary"""

self.logger.info(f'Checkers: {", ".join(self.checkers.keys())}')
self.logger.info(f'Checkers: {", ".join(sorted(self.checkers.keys()))}')

def number_of_checkers(self) -> int:
"""return the number of checkers"""
Expand Down
Loading