lib/pwn/plugins/defect_dojo.rb in pwn-0.4.935 vs lib/pwn/plugins/defect_dojo.rb in pwn-0.4.936
- old
+ new
@@ -386,10 +386,13 @@
# tags: 'optional - comma-delimited list of tag names to tie to scan',
# 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)',
# create_finding_groups: 'optional - flag to create finding groups (defaults to false)'
+ # close_old_findings_product_scope: 'optional - flag to close old findings from engagement (defaults to false)',
+ # close_old_findings: 'optional - flag to close old findings, regardless of engagement (defaults to false)',
+ # push_to_jira: 'optional - flag to push findings to JIRA (defaults to false)'
# )
public_class_method def self.importscan(opts = {})
http_body = {}
@@ -463,10 +466,16 @@
# 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)
+ opts[:close_old_findings_product_scope] ? (http_body[:close_old_findings_product_scope] = true) : (http_body[:close_old_findings_product_scope] = false)
+
+ opts[:close_old_findings] ? (http_body[:close_old_findings] = true) : (http_body[:close_old_findings] = false)
+
+ opts[:push_to_jira] ? (http_body[:push_to_jira] = true) : (http_body[:push_to_jira] = false)
+
api_path = 'import-scan/'
api_path = 'importscan/' if api_version == 'v1'
rest_call(
dd_obj: dd_obj,
@@ -487,11 +496,14 @@
# 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)',
- # create_finding_groups: 'optional - flag to create finding groups (defaults to false)'
+ # create_finding_groups: 'optional - flag to create finding groups (defaults to false)',
+ # close_old_findings_product_scope: 'optional - flag to close old findings from engagement (defaults to false)',
+ # close_old_findings: 'optional - flag to close old findings, regardless of engagement (defaults to false)',
+ # push_to_jira: 'optional - flag to push findings to JIRA (defaults to false)'
# )
public_class_method def self.reimportscan(opts = {})
http_body = {}
@@ -568,10 +580,16 @@
# 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)
+ opts[:close_old_findings_product_scope] ? (http_body[:close_old_findings_product_scope] = true) : (http_body[:close_old_findings_product_scope] = false)
+
+ opts[:close_old_findings] ? (http_body[:close_old_findings] = true) : (http_body[:close_old_findings] = false)
+
+ opts[:push_to_jira] ? (http_body[:push_to_jira] = true) : (http_body[:push_to_jira] = false)
+
api_path = 'reimport-scan/'
api_path = 'reimportscan/' if api_version == 'v1'
rest_call(
dd_obj: dd_obj,
@@ -724,11 +742,14 @@
lead_username: 'required - username of lead to tie to scan',
tags: 'optional - comma-delimited list of tag names to tie to scan',
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)',
- create_finding_groups: 'optional - flag to create finding groups (defaults to false)'
+ create_finding_groups: 'optional - flag to create finding groups (defaults to false)',
+ close_old_findings_product_scope: 'optional - flag to close old findings from engagement (defaults to false)',
+ close_old_findings: 'optional - flag to close old findings, regardless of engagement (defaults to false)',
+ push_to_jira: 'optional - flag to push findings to JIRA (defaults to false)'
)
reimportscan_response = #{self}.reimportscan(
dd_obj: 'required - dd_obj returned from #login_v1 method',
engagement_name: 'required - name of engagement to associate w/ scan',
@@ -737,10 +758,13 @@
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)',
- create_finding_groups: 'optional - flag to create finding groups (defaults to false)'
+ create_finding_groups: 'optional - flag to create finding groups (defaults to false)',
+ close_old_findings_product_scope: 'optional - flag to close old findings from engagement (defaults to false)',
+ close_old_findings: 'optional - flag to close old findings, regardless of engagement (defaults to false)',
+ push_to_jira: 'optional - flag to push findings to JIRA (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'