Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
08791fbe
Commit
08791fbe
authored
Oct 20, 2021
by
Subashis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use disable join for cross db
parent
b74f37f4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
config/feature_flags/development/security_finding_build_disable_joins.yml
...lags/development/security_finding_build_disable_joins.yml
+8
-0
ee/app/models/security/finding.rb
ee/app/models/security/finding.rb
+2
-2
No files found.
config/feature_flags/development/security_finding_build_disable_joins.yml
0 → 100644
View file @
08791fbe
---
name
:
security_finding_build_disable_joins
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/72738
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/342380
milestone
:
'
14.4'
type
:
development
group
:
group::threat insights
default_enabled
:
true
ee/app/models/security/finding.rb
View file @
08791fbe
...
...
@@ -14,7 +14,7 @@ module Security
belongs_to
:scan
,
inverse_of: :findings
,
optional:
false
belongs_to
:scanner
,
class_name:
'Vulnerabilities::Scanner'
,
inverse_of: :security_findings
,
optional:
false
has_one
:build
,
through: :scan
has_one
:build
,
through: :scan
,
disable_joins:
->
{
::
Feature
.
enabled?
(
:security_finding_build_disable_joins
,
default_enabled: :yaml
)
}
enum
confidence:
::
Enums
::
Vulnerability
.
confidence_levels
,
_prefix: :confidence
enum
severity:
::
Enums
::
Vulnerability
.
severity_levels
,
_prefix: :severity
...
...
@@ -36,7 +36,7 @@ module Security
end
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
:with_pipeline_entities
,
->
{
includes
(
build:
[
:job_artifacts
,
:pipeline
])
}
scope
:with_pipeline_entities
,
->
{
preload
(
build:
[
:job_artifacts
,
:pipeline
])
}
scope
:with_scan
,
->
{
includes
(
:scan
)
}
scope
:with_scanner
,
->
{
includes
(
:scanner
)
}
scope
:deduplicated
,
->
{
where
(
deduplicated:
true
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment