diff --git a/sploitscan/cli.py b/sploitscan/cli.py index bd7f9e0..71992d4 100644 --- a/sploitscan/cli.py +++ b/sploitscan/cli.py @@ -151,7 +151,6 @@ def main( Orchestrate SploitScan workflow for one or more CVE IDs. """ config = load_config(config_path=config_path, debug=debug) - all_results: List[Dict[str, Any]] = [] selected = _selected(methods) @@ -375,7 +374,7 @@ def cli() -> None: clone_cvelistV5_repo(config=cfg) if args.keywords: - cve_ids = search_cve_by_keywords(args.keywords) + cve_ids = search_cve_by_keywords(args.keywords, cfg) if not cve_ids: raise SystemExit("No valid CVE IDs found for the provided keywords.") else: diff --git a/sploitscan/search.py b/sploitscan/search.py index 77b8285..107b9c5 100644 --- a/sploitscan/search.py +++ b/sploitscan/search.py @@ -9,7 +9,7 @@ from .constants import NUCLEI_URL -def search_cve_by_keywords(keywords: Iterable[str]) -> List[str]: +def search_cve_by_keywords(keywords: Iterable[str], cfg: Dict[str, Any]) -> List[str]: """ Aggregate CVE IDs matching all keywords across: - Local cvelistV5 JSON database (if present) @@ -22,7 +22,7 @@ def search_cve_by_keywords(keywords: Iterable[str]) -> List[str]: results: Set[str] = set() # Local grep - local_cve_ids = grep_local_db(kws) + local_cve_ids = grep_local_db(kws, config=cfg) if local_cve_ids: results.update(local_cve_ids)