bin/pwn_bdba_scan in pwn-0.4.788 vs bin/pwn_bdba_scan in pwn-0.4.789
- old
+ new
@@ -1,8 +1,9 @@
#!/usr/bin/env ruby
# frozen_string_literal: false
+require 'cgi'
require 'optparse'
require 'pwn'
require 'yaml'
opts = {}
@@ -99,10 +100,10 @@
end
break if scan_progress_resp[:products].none? { |p| p[:status] == 'B' }
end
- product_id = scan_progress_resp[:products].find { |p| p[:name] == File.basename(target_file) }[:product_id]
+ product_id = scan_progress_resp[:products].find { |p| p[:name] == File.basename(CGI.escape(target_file)) }[:product_id]
scan_report_resp = PWN::Plugins::BlackDuckBinaryAnalysis.generate_product_report(
token: token,
product_id: product_id,
type: report_type,