From abeac9cde9b7ba4dfb4de8f84f166b9111e929de Mon Sep 17 00:00:00 2001 From: Mick Grove Date: Thu, 26 Jun 2025 15:46:14 -0700 Subject: [PATCH] Fixed Snyk rule --- data/rules/snyk.yml | 14 +++++++------- src/main.rs | 4 +++- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/data/rules/snyk.yml b/data/rules/snyk.yml index dfadaaa..e6237e3 100644 --- a/data/rules/snyk.yml +++ b/data/rules/snyk.yml @@ -25,10 +25,10 @@ rules: headers: Authorization: "Bearer {{ TOKEN }}" Accept: application/json - response_matcher: - - report_response: true - - type: StatusMatch - status: [200] - - type: WordMatch - words: ['"username"'] - match_all_words: true \ No newline at end of file + response_matcher: + - report_response: true + - type: StatusMatch + status: [200] + - type: WordMatch + words: ['"username"'] + match_all_words: true \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index 5be8672..0a1e07b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -191,7 +191,9 @@ async fn async_main(args: CommandLineArgs) -> Result<()> { run_scan(&args.global_args, &scan_args, &rules_db, Arc::clone(&datastore)).await?; let exit_code = determine_exit_code(&datastore); - temp_dir.close()?; + if let Err(e) = temp_dir.close() { + eprintln!("Failed to close temporary directory: {}", e); + } std::process::exit(exit_code); } Command::Rules(ref rule_args) => match &rule_args.command {