bin/pwn_bdba_groups in pwn-0.4.755 vs bin/pwn_bdba_groups in pwn-0.4.756
- old
+ new
@@ -49,17 +49,21 @@
if list_group_name
groups_resp = PWN::Plugins::BlackDuckBinaryAnalysis.get_groups(
token: token
)
- unless groups_resp.nil?
- group_id = groups_resp[:groups].find { |g| g[:name] == list_group_name }[:id]
+ group = groups_resp[:groups].find { |g| g[:name] == list_group_name }
+
+ unless group.nil?
+ group_id = group[:id]
+
group_details_resp = PWN::Plugins::BlackDuckBinaryAnalysis.get_group_details(
token: token,
group_id: group_id
)
- puts group_details_resp.to_json unless group_details_resp.nil?
+ puts group_details_resp.to_json if group_details_resp[:group].find { |g| g[:name] == list_group_name }
end
+
exit 0
end
group_name = opts[:group_name]
raise "ERROR: BDBA Group Name Not Provided: #{group_name}" if group_name.nil?