Commit 0e5659f1 authored by Zeff Morgan's avatar Zeff Morgan Committed by Mark Lapierre

Allow for generic DAST count matching

parent 5d114e16
...@@ -248,8 +248,8 @@ module QA ...@@ -248,8 +248,8 @@ module QA
find_element(:container_scan_report).has_content?(/Container scanning detected #{expected}( new)? vulnerabilit/) find_element(:container_scan_report).has_content?(/Container scanning detected #{expected}( new)? vulnerabilit/)
end end
def has_dast_vulnerability_count_of?(expected) def has_dast_vulnerability_count?
find_element(:dast_scan_report).has_content?(/DAST detected #{expected}( new)? vulnerabilit/) find_element(:dast_scan_report).has_content?(/DAST detected \d*( new)? vulnerabilit/)
end end
def has_opened_dismissed_vulnerability?(reason = nil) def has_opened_dismissed_vulnerability?(reason = nil)
......
...@@ -11,7 +11,6 @@ module QA ...@@ -11,7 +11,6 @@ module QA
let(:sast_vuln_count) { 33 } let(:sast_vuln_count) { 33 }
let(:dependency_scan_vuln_count) { 4 } let(:dependency_scan_vuln_count) { 4 }
let(:container_scan_vuln_count) { 8 } let(:container_scan_vuln_count) { 8 }
let(:dast_vuln_count) { 4 }
let(:vuln_name) { "Regular Expression Denial of Service in debug" } let(:vuln_name) { "Regular Expression Denial of Service in debug" }
let(:remediable_vuln_name) { "Authentication bypass via incorrect DOM traversal and canonicalization in saml2-js" } let(:remediable_vuln_name) { "Authentication bypass via incorrect DOM traversal and canonicalization in saml2-js" }
...@@ -80,7 +79,7 @@ module QA ...@@ -80,7 +79,7 @@ module QA
expect(merge_request).to have_sast_vulnerability_count_of(sast_vuln_count) expect(merge_request).to have_sast_vulnerability_count_of(sast_vuln_count)
expect(merge_request).to have_dependency_vulnerability_count_of(dependency_scan_vuln_count) expect(merge_request).to have_dependency_vulnerability_count_of(dependency_scan_vuln_count)
expect(merge_request).to have_container_vulnerability_count_of(container_scan_vuln_count) expect(merge_request).to have_container_vulnerability_count_of(container_scan_vuln_count)
expect(merge_request).to have_dast_vulnerability_count_of(dast_vuln_count) expect(merge_request).to have_dast_vulnerability_count
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment