Commit 6f1fc23f authored by Dylan Griffith's avatar Dylan Griffith

Merge branch 'secure_finding_allowlist' into 'master'

Allowlist security finding relation for cross-db query

See merge request gitlab-org/gitlab!72081
parents 50001036 17f2fd67
...@@ -34,7 +34,7 @@ module Security ...@@ -34,7 +34,7 @@ module Security
.where('security_scans.id = security_findings.scan_id') .where('security_scans.id = security_findings.scan_id')
.where('vulnerability_feedback.project_fingerprint = security_findings.project_fingerprint')) .where('vulnerability_feedback.project_fingerprint = security_findings.project_fingerprint'))
end end
scope :latest, -> { joins(:scan).merge(Security::Scan.latest_successful_by_build) } scope :latest, -> { joins(:scan).merge(Security::Scan.latest_successful_by_build).allow_cross_joins_across_databases(url: 'https://gitlab.com/gitlab-org/gitlab/-/issues/341796') }
scope :ordered, -> { order(severity: :desc, confidence: :desc, id: :asc) } scope :ordered, -> { order(severity: :desc, confidence: :desc, id: :asc) }
scope :with_pipeline_entities, -> { includes(build: [:job_artifacts, :pipeline]) } scope :with_pipeline_entities, -> { includes(build: [:job_artifacts, :pipeline]) }
scope :with_scan, -> { includes(:scan) } scope :with_scan, -> { includes(:scan) }
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
- "./ee/spec/features/merge_trains/user_adds_to_merge_train_when_pipeline_succeeds_spec.rb" - "./ee/spec/features/merge_trains/user_adds_to_merge_train_when_pipeline_succeeds_spec.rb"
- "./ee/spec/features/projects/pipelines/pipeline_spec.rb" - "./ee/spec/features/projects/pipelines/pipeline_spec.rb"
- "./ee/spec/finders/ee/namespaces/projects_finder_spec.rb" - "./ee/spec/finders/ee/namespaces/projects_finder_spec.rb"
- "./ee/spec/finders/security/findings_finder_spec.rb"
- "./ee/spec/graphql/ee/resolvers/namespace_projects_resolver_spec.rb" - "./ee/spec/graphql/ee/resolvers/namespace_projects_resolver_spec.rb"
- "./ee/spec/lib/ee/gitlab/background_migration/migrate_approver_to_approval_rules_spec.rb" - "./ee/spec/lib/ee/gitlab/background_migration/migrate_approver_to_approval_rules_spec.rb"
- "./ee/spec/lib/ee/gitlab/background_migration/migrate_security_scans_spec.rb" - "./ee/spec/lib/ee/gitlab/background_migration/migrate_security_scans_spec.rb"
......
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