lib/pwn/plugins/defect_dojo.rb in pwn-0.4.940 vs lib/pwn/plugins/defect_dojo.rb in pwn-0.4.941
- old
+ new
@@ -99,11 +99,11 @@
method: :post,
url: "#{base_dd_api_uri}/#{rest_call}",
headers: {
authorization: dd_obj[:authz_header]
},
- payload: http_body.to_json,
+ payload: http_body,
verify_ssl: false,
timeout: request_timeout,
open_timeout: request_timeout
)
else
@@ -447,11 +447,11 @@
end
# Should only ever return 1 result so we should be good here
http_body[:lead] = user_by_username_object.first[:id]
end
- http_body[:tags] = opts[:tags].to_s.strip.chomp.scrub.gsub("\s,\s", ',').split(',') if opts[:tags]
+ http_body[:tags] = opts[:tags].to_s.strip.chomp.scrub.gsub("\s,\s", ',').split(',').join("\n") if opts[:tags]
minimum_severity = opts[:minimum_severity].to_s.strip.chomp.scrub.downcase.capitalize
case minimum_severity
when '', 'Info', 'Low', 'Medium', 'High', 'Critical'
# Defaults to 'Info'
@@ -553,10 +553,10 @@
tests_by_engagement_object = test_list[:results].select do |test|
test[:engagement] == engagement_resource_uri
end
end
- http_body[:tags] = opts[:tags].to_s.strip.chomp.scrub.gsub("\s,\s", ',').split(',') if opts[:tags]
+ http_body[:tags] = opts[:tags].to_s.strip.chomp.scrub.gsub("\s,\s", ',').split(',').join("\n") if opts[:tags]
http_body[:test] = opts[:test_resource_uri] if opts[:test_resource_uri]
minimum_severity = opts[:minimum_severity].to_s.strip.chomp.scrub.downcase.capitalize
case minimum_severity