diff --git a/secator/cli.py b/secator/cli.py index 377896b2..ddd1fd75 100644 --- a/secator/cli.py +++ b/secator/cli.py @@ -658,7 +658,7 @@ def report_show(report_query, output, runner_type, time_delta, type, query, work # Load all report paths load_all_reports = any([not Path(p).exists() for p in report_query]) all_reports = [] - if load_all_reports: + if load_all_reports or workspace: all_reports = list_reports(workspace=workspace, type=runner_type, timedelta=human_to_timedelta(time_delta)) if not report_query: report_query = all_reports @@ -1093,31 +1093,6 @@ def install_tools(cmds): sys.exit(return_code) -@install.command('cves') -@click.option('--force', is_flag=True) -def install_cves(force): - """Install CVEs (enables passive vulnerability search).""" - if CONFIG.offline_mode: - console.print('[bold red]Cannot run this command in offline mode.[/]') - return - cve_json_path = f'{CONFIG.dirs.cves}/circl-cve-search-expanded.json' - if not os.path.exists(cve_json_path) or force: - with console.status('[bold yellow]Downloading zipped CVEs from cve.circl.lu ...[/]'): - Command.execute('wget https://cve.circl.lu/static/circl-cve-search-expanded.json.gz', cwd=CONFIG.dirs.cves) - with console.status('[bold yellow]Unzipping CVEs ...[/]'): - Command.execute(f'gunzip {CONFIG.dirs.cves}/circl-cve-search-expanded.json.gz', cwd=CONFIG.dirs.cves) - with console.status(f'[bold yellow]Installing CVEs to {CONFIG.dirs.cves} ...[/]'): - with open(cve_json_path, 'r') as f: - for line in f: - data = json.loads(line) - cve_id = data['id'] - cve_path = f'{CONFIG.dirs.cves}/{cve_id}.json' - with open(cve_path, 'w') as f: - f.write(line) - console.print(f'CVE saved to {cve_path}') - console.print(':tada: CVEs installed successfully !', style='bold green') - - #--------# # UPDATE # #--------#