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
a9a8fde6
Commit
a9a8fde6
authored
Dec 08, 2021
by
Thiago Figueiró
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove vulnerability_location_image_filter feature flag
Changelog: removed
parent
8ce5dfe2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
29 deletions
+7
-29
config/feature_flags/development/vulnerability_location_image_filter.yml
...flags/development/vulnerability_location_image_filter.yml
+0
-8
ee/app/finders/security/vulnerabilities_finder.rb
ee/app/finders/security/vulnerabilities_finder.rb
+1
-1
ee/spec/finders/security/vulnerabilities_finder_spec.rb
ee/spec/finders/security/vulnerabilities_finder_spec.rb
+6
-20
No files found.
config/feature_flags/development/vulnerability_location_image_filter.yml
deleted
100644 → 0
View file @
8ce5dfe2
---
name
:
vulnerability_location_image_filter
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/69867
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/340915
milestone
:
'
14.4'
type
:
development
group
:
group::container security
default_enabled
:
true
ee/app/finders/security/vulnerabilities_finder.rb
View file @
a9a8fde6
...
...
@@ -99,7 +99,7 @@ module Security
# This filter will not work for InstanceSecurityDashboard, because InstanceSecurityDashboard could have multiple projects.
return
if
vulnerable
.
is_a?
(
InstanceSecurityDashboard
)
if
params
[
:image
].
present?
&&
Feature
.
enabled?
(
:vulnerability_location_image_filter
,
vulnerable
,
default_enabled: :yaml
)
if
params
[
:image
].
present?
@vulnerabilities
=
vulnerabilities
.
with_container_image
(
params
[
:image
])
end
end
...
...
ee/spec/finders/security/vulnerabilities_finder_spec.rb
View file @
a9a8fde6
...
...
@@ -165,29 +165,15 @@ RSpec.describe Security::VulnerabilitiesFinder do
let
(
:filters
)
{
{
image:
[
finding
.
location
[
'image'
]]
}
}
let
(
:feature_enabled
)
{
true
}
before
do
stub_feature_flags
(
vulnerability_location_image_filter:
feature_enabled
)
end
context
'when vulnerability_location_image_filter is disabled'
do
let
(
:feature_enabled
)
{
false
}
it
'does not include cluster vulnerability'
do
is_expected
.
not_to
contain_exactly
(
cluster_vulnerability
)
end
it
'only returns vulnerabilities matching the given image'
do
is_expected
.
to
contain_exactly
(
cluster_vulnerability
)
end
context
'when vulnerability_location_image_filter is enabled'
do
it
'only returns vulnerabilities matching the given image'
do
is_expected
.
to
contain_exactly
(
cluster_vulnerability
)
end
context
'when different report_type is passed'
do
let
(
:filters
)
{
{
report_type:
%w[dast]
,
image:
[
finding
.
location
[
'image'
]]
}}
context
'when different report_type is passed'
do
let
(
:filters
)
{
{
report_type:
%w[dast]
,
image:
[
finding
.
location
[
'image'
]]
}}
it
'returns empty list'
do
is_expected
.
to
be_empty
end
it
'returns empty list'
do
is_expected
.
to
be_empty
end
end
...
...
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