bin/pwn_bdba_scan in pwn-0.4.803 vs bin/pwn_bdba_scan in pwn-0.4.804

- old
+ new

@@ -33,10 +33,14 @@ end options.on('-tTYPE', '--report-type=TYPE', '<Optional - Black Duck Binary Analysis Scan Report Type csv_libs|csv_vulns|pdf (Default: csv_vulns)>') do |t| opts[:report_type] = t end + + options.on('-vVERSION', '--version=VERSION', '<Optional - Version to Associate w/ Specific Scan (Default: nil)>') do |v| + opts[:version] = v + end end.parse! if opts.empty? puts `#{$PROGRAM_NAME} --help` exit 1 @@ -66,10 +70,12 @@ report_only = opts[:report_only] ||= false report_type_str = opts[:report_type] ||= 'csv_vulns' report_type = report_type_str.to_s.to_sym + version = opts[:version] + groups_resp = PWN::Plugins::BlackDuckBinaryAnalysis.get_groups( token: token ) parent_arr = groups_resp[:groups].select { |g| g[:name] == parent_group_name } @@ -81,10 +87,11 @@ unless report_only puts "Uploading/Scanning: #{target_file}" PWN::Plugins::BlackDuckBinaryAnalysis.upload_file( token: token, file: target_file, - group_id: parent_id + group_id: parent_id, + version: version ) end scan_progress_resp = {} scan_progress_busy_duration = 0