lib/pwn/plugins/defect_dojo.rb in pwn-0.4.719 vs lib/pwn/plugins/defect_dojo.rb in pwn-0.4.720

- old
+ new

@@ -486,11 +486,12 @@ # file: 'required - path of scan results file', # tags: 'optional - comma-delimited list of tag names to tie to scan for unique test resource_uri retrival', # test_resource_uri: 'optional - alternative to tag names to know which test to reimport', # minimum_severity: 'optional - minimum finding severity Info||Low||Medium||High||Critical (Defaults to Info)', # scan_date: 'optional - date in which scan was kicked off (defaults to now)', - # verified: 'optional - flag finding as verified by a tester (defaults to false)' + # verified: 'optional - flag finding as verified by a tester (defaults to false)', + # create_finding_groups: 'optional - flag to create finding groups (defaults to false)' # ) public_class_method def self.reimportscan(opts = {}) http_body = {} @@ -565,10 +566,12 @@ opts[:scan_date] ? (http_body[:scan_date] = opts[:scan_date]) : (http_body[:scan_date] = Time.now.strftime('%Y/%m/%d')) # Defaults to false opts[:verified] ? (http_body[:verified] = true) : (http_body[:verified] = false) + opts[:create_finding_groups] ? (http_body[:create_finding_groups_for_all_findings] = true) : (http_body[:create_finding_groups_for_all_findings] = false) + api_path = 'reimport-scan/' api_path = 'reimportscan/' if api_version == 'v1' rest_call( dd_obj: dd_obj, @@ -733,10 +736,11 @@ file: 'required - path of scan results file', tags: 'optional - comma-delimited list of tag names to tie to scan for unique test resource_uri retrival', test_resource_uri: 'optional - alternative to tag names to know which test to reimport', minimum_severity: 'optional - minimum finding severity Info||Low||Medium||High||Critical (Defaults to Info)', scan_date: 'optional - date in which scan was kicked off (defaults to now)', - verified: 'optional - flag finding as verified by a tester (defaults to false)' + verified: 'optional - flag finding as verified by a tester (defaults to false)', + create_finding_groups: 'optional - flag to create finding groups (defaults to false)' ) finding_list = #{self}.finding_list( dd_obj: 'required dd_obj returned from #login_v1 method', id: 'optional - retrieve single finding by id, otherwise return all'