Fixed Snyk rule

This commit is contained in:
Mick Grove 2025-06-26 15:46:14 -07:00
commit abeac9cde9
2 changed files with 10 additions and 8 deletions

View file

@ -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
response_matcher:
- report_response: true
- type: StatusMatch
status: [200]
- type: WordMatch
words: ['"username"']
match_all_words: true

View file

@ -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 {