diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-20 14:18:08 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-20 14:18:08 +0300 |
commit | 5afcbe03ead9ada87621888a31a62652b10a7e4f (patch) | |
tree | 9918b67a0d0f0bafa6542e839a8be37adf73102d /spec/services/security | |
parent | c97c0201564848c1f53226fe19d71fdcc472f7d0 (diff) |
Add latest changes from gitlab-org/gitlab@16-4-stable-eev16.4.0-rc42
Diffstat (limited to 'spec/services/security')
-rw-r--r-- | spec/services/security/ci_configuration/dependency_scanning_create_service_spec.rb | 2 | ||||
-rw-r--r-- | spec/services/security/merge_reports_service_spec.rb | 105 |
2 files changed, 58 insertions, 49 deletions
diff --git a/spec/services/security/ci_configuration/dependency_scanning_create_service_spec.rb b/spec/services/security/ci_configuration/dependency_scanning_create_service_spec.rb index 7ac2249642a..abd412097d2 100644 --- a/spec/services/security/ci_configuration/dependency_scanning_create_service_spec.rb +++ b/spec/services/security/ci_configuration/dependency_scanning_create_service_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' RSpec.describe Security::CiConfiguration::DependencyScanningCreateService, :snowplow, - feature_category: :software_composition_analysis do + feature_category: :software_composition_analysis do subject(:result) { described_class.new(project, user).execute } let(:branch_name) { 'set-dependency-scanning-config-1' } diff --git a/spec/services/security/merge_reports_service_spec.rb b/spec/services/security/merge_reports_service_spec.rb index 809d0b27c20..c141bbe5b5a 100644 --- a/spec/services/security/merge_reports_service_spec.rb +++ b/spec/services/security/merge_reports_service_spec.rb @@ -16,78 +16,87 @@ RSpec.describe Security::MergeReportsService, '#execute', feature_category: :cod let(:identifier_wasc) { build(:ci_reports_security_identifier, external_id: '13', external_type: 'wasc') } let(:finding_id_1) do - build(:ci_reports_security_finding, - identifiers: [identifier_1_primary, identifier_1_cve], - scanner: scanner_1, - severity: :low - ) + build( + :ci_reports_security_finding, + identifiers: [identifier_1_primary, identifier_1_cve], + scanner: scanner_1, + severity: :low + ) end let(:finding_id_1_extra) do - build(:ci_reports_security_finding, - identifiers: [identifier_1_primary, identifier_1_cve], - scanner: scanner_1, - severity: :low - ) + build( + :ci_reports_security_finding, + identifiers: [identifier_1_primary, identifier_1_cve], + scanner: scanner_1, + severity: :low + ) end let(:finding_id_2_loc_1) do - build(:ci_reports_security_finding, - identifiers: [identifier_2_primary, identifier_2_cve], - location: build(:ci_reports_security_locations_sast, start_line: 32, end_line: 34), - scanner: scanner_2, - severity: :medium - ) + build( + :ci_reports_security_finding, + identifiers: [identifier_2_primary, identifier_2_cve], + location: build(:ci_reports_security_locations_sast, start_line: 32, end_line: 34), + scanner: scanner_2, + severity: :medium + ) end let(:finding_id_2_loc_1_extra) do - build(:ci_reports_security_finding, - identifiers: [identifier_2_primary, identifier_2_cve], - location: build(:ci_reports_security_locations_sast, start_line: 32, end_line: 34), - scanner: scanner_2, - severity: :medium - ) + build( + :ci_reports_security_finding, + identifiers: [identifier_2_primary, identifier_2_cve], + location: build(:ci_reports_security_locations_sast, start_line: 32, end_line: 34), + scanner: scanner_2, + severity: :medium + ) end let(:finding_id_2_loc_2) do - build(:ci_reports_security_finding, - identifiers: [identifier_2_primary, identifier_2_cve], - location: build(:ci_reports_security_locations_sast, start_line: 42, end_line: 44), - scanner: scanner_2, - severity: :medium - ) + build( + :ci_reports_security_finding, + identifiers: [identifier_2_primary, identifier_2_cve], + location: build(:ci_reports_security_locations_sast, start_line: 42, end_line: 44), + scanner: scanner_2, + severity: :medium + ) end let(:finding_cwe_1) do - build(:ci_reports_security_finding, - identifiers: [identifier_cwe], - scanner: scanner_3, - severity: :high - ) + build( + :ci_reports_security_finding, + identifiers: [identifier_cwe], + scanner: scanner_3, + severity: :high + ) end let(:finding_cwe_2) do - build(:ci_reports_security_finding, - identifiers: [identifier_cwe], - scanner: scanner_1, - severity: :critical - ) + build( + :ci_reports_security_finding, + identifiers: [identifier_cwe], + scanner: scanner_1, + severity: :critical + ) end let(:finding_wasc_1) do - build(:ci_reports_security_finding, - identifiers: [identifier_wasc], - scanner: scanner_1, - severity: :medium - ) + build( + :ci_reports_security_finding, + identifiers: [identifier_wasc], + scanner: scanner_1, + severity: :medium + ) end let(:finding_wasc_2) do - build(:ci_reports_security_finding, - identifiers: [identifier_wasc], - scanner: scanner_2, - severity: :critical - ) + build( + :ci_reports_security_finding, + identifiers: [identifier_wasc], + scanner: scanner_2, + severity: :critical + ) end let(:report_1_findings) { [finding_id_1, finding_id_2_loc_1, finding_id_2_loc_1_extra, finding_cwe_2, finding_wasc_1] } |