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
7b196922
Commit
7b196922
authored
Mar 26, 2021
by
Daniel Tian
Committed by
Mikołaj Wawrzyniak
Mar 26, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add vulnerability survey request feature flag and SVG image [RUN ALL RSPEC] [RUN AS-IF-FOSS]
parent
0e8dfef6
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
28 additions
and
0 deletions
+28
-0
ee/app/assets/javascripts/security_dashboard/security_charts_init.js
...ts/javascripts/security_dashboard/security_charts_init.js
+1
-0
ee/app/assets/javascripts/security_dashboard/vulnerability_report_init.js
...vascripts/security_dashboard/vulnerability_report_init.js
+2
-0
ee/app/controllers/groups/security/dashboard_controller.rb
ee/app/controllers/groups/security/dashboard_controller.rb
+4
-0
ee/app/controllers/groups/security/vulnerabilities_controller.rb
...controllers/groups/security/vulnerabilities_controller.rb
+1
-0
ee/app/controllers/projects/security/dashboard_controller.rb
ee/app/controllers/projects/security/dashboard_controller.rb
+1
-0
ee/app/controllers/projects/security/vulnerability_report_controller.rb
...lers/projects/security/vulnerability_report_controller.rb
+1
-0
ee/app/controllers/security/application_controller.rb
ee/app/controllers/security/application_controller.rb
+1
-0
ee/app/controllers/security/vulnerabilities_controller.rb
ee/app/controllers/security/vulnerabilities_controller.rb
+1
-0
ee/app/helpers/ee/projects_helper.rb
ee/app/helpers/ee/projects_helper.rb
+2
-0
ee/app/helpers/groups/security_features_helper.rb
ee/app/helpers/groups/security_features_helper.rb
+1
-0
ee/app/helpers/security_helper.rb
ee/app/helpers/security_helper.rb
+1
-0
ee/config/feature_flags/ops/vulnerability_management_survey.yml
...fig/feature_flags/ops/vulnerability_management_survey.yml
+8
-0
ee/spec/helpers/groups/security_features_helper_spec.rb
ee/spec/helpers/groups/security_features_helper_spec.rb
+1
-0
ee/spec/helpers/projects_helper_spec.rb
ee/spec/helpers/projects_helper_spec.rb
+2
-0
ee/spec/helpers/security_helper_spec.rb
ee/spec/helpers/security_helper_spec.rb
+1
-0
No files found.
ee/app/assets/javascripts/security_dashboard/security_charts_init.js
View file @
7b196922
...
...
@@ -34,6 +34,7 @@ export default (el, dashboardType) => {
emptyStateSvgPath
:
el
.
dataset
.
emptyStateSvgPath
,
groupFullPath
:
el
.
dataset
.
groupFullPath
,
securityConfigurationPath
:
el
.
dataset
.
securityConfigurationPath
,
surveyRequestSvgPath
:
el
.
dataset
.
surveyRequestSvgPath
,
};
let
component
;
...
...
ee/app/assets/javascripts/security_dashboard/vulnerability_report_init.js
View file @
7b196922
...
...
@@ -39,6 +39,7 @@ export default (el, dashboardType) => {
pipelineSecurityBuildsFailedPath
,
hasJiraVulnerabilitiesIntegrationEnabled
,
securityConfigurationPath
,
surveyRequestSvgPath
,
}
=
el
.
dataset
;
if
(
isUnavailable
)
{
...
...
@@ -63,6 +64,7 @@ export default (el, dashboardType) => {
noPipelineRunScannersHelpPath
,
groupFullPath
,
securityConfigurationPath
,
surveyRequestSvgPath
,
hasVulnerabilities
:
parseBoolean
(
hasVulnerabilities
),
scanners
:
scanners
?
JSON
.
parse
(
scanners
)
:
[],
hasJiraVulnerabilitiesIntegrationEnabled
:
parseBoolean
(
...
...
ee/app/controllers/groups/security/dashboard_controller.rb
View file @
7b196922
...
...
@@ -4,6 +4,10 @@ class Groups::Security::DashboardController < Groups::ApplicationController
feature_category
:vulnerability_management
before_action
do
push_frontend_feature_flag
(
:vulnerability_management_survey
,
type: :ops
,
default_enabled: :yaml
)
end
def
show
render
:unavailable
unless
dashboard_available?
end
...
...
ee/app/controllers/groups/security/vulnerabilities_controller.rb
View file @
7b196922
...
...
@@ -7,6 +7,7 @@ module Groups
before_action
do
push_frontend_feature_flag
(
:custom_security_scanners
,
current_user
)
push_frontend_feature_flag
(
:vulnerability_management_survey
,
type: :ops
,
default_enabled: :yaml
)
end
feature_category
:vulnerability_management
...
...
ee/app/controllers/projects/security/dashboard_controller.rb
View file @
7b196922
...
...
@@ -10,6 +10,7 @@ module Projects
before_action
only:
[
:index
]
do
push_frontend_feature_flag
(
:security_auto_fix
,
project
,
default_enabled:
false
)
push_frontend_feature_flag
(
:vulnerability_management_survey
,
type: :ops
,
default_enabled: :yaml
)
end
feature_category
:static_application_security_testing
...
...
ee/app/controllers/projects/security/vulnerability_report_controller.rb
View file @
7b196922
...
...
@@ -8,6 +8,7 @@ module Projects
before_action
do
push_frontend_feature_flag
(
:custom_security_scanners
,
current_user
)
push_frontend_feature_flag
(
:vulnerability_management_survey
,
type: :ops
,
default_enabled: :yaml
)
end
feature_category
:vulnerability_management
...
...
ee/app/controllers/security/application_controller.rb
View file @
7b196922
...
...
@@ -7,6 +7,7 @@ module Security
before_action
:check_feature_enabled!
before_action
do
push_frontend_feature_flag
(
:instance_security_dashboard
,
default_enabled:
true
)
push_frontend_feature_flag
(
:vulnerability_management_survey
,
type: :ops
,
default_enabled: :yaml
)
end
feature_category
:vulnerability_management
...
...
ee/app/controllers/security/vulnerabilities_controller.rb
View file @
7b196922
...
...
@@ -6,6 +6,7 @@ module Security
before_action
do
push_frontend_feature_flag
(
:custom_security_scanners
,
current_user
)
push_frontend_feature_flag
(
:vulnerability_management_survey
,
type: :ops
,
default_enabled: :yaml
)
end
end
end
ee/app/helpers/ee/projects_helper.rb
View file @
7b196922
...
...
@@ -251,6 +251,7 @@ module EE
has_vulnerabilities:
'false'
,
has_jira_vulnerabilities_integration_enabled:
project
.
configured_to_create_issues_from_vulnerabilities?
.
to_s
,
empty_state_svg_path:
image_path
(
'illustrations/security-dashboard_empty.svg'
),
survey_request_svg_path:
image_path
(
'illustrations/security-dashboard_empty.svg'
),
security_dashboard_help_path:
help_page_path
(
'user/application_security/security_dashboard/index'
),
no_vulnerabilities_svg_path:
image_path
(
'illustrations/issues.svg'
),
project_full_path:
project
.
full_path
,
...
...
@@ -264,6 +265,7 @@ module EE
project_full_path:
project
.
full_path
,
vulnerabilities_export_endpoint:
api_v4_security_projects_vulnerability_exports_path
(
id:
project
.
id
),
empty_state_svg_path:
image_path
(
'illustrations/security-dashboard-empty-state.svg'
),
survey_request_svg_path:
image_path
(
'illustrations/security-dashboard_empty.svg'
),
no_vulnerabilities_svg_path:
image_path
(
'illustrations/issues.svg'
),
dashboard_documentation:
help_page_path
(
'user/application_security/security_dashboard/index'
),
not_enabled_scanners_help_path:
help_page_path
(
'user/application_security/index'
,
anchor:
'quick-start'
),
...
...
ee/app/helpers/groups/security_features_helper.rb
View file @
7b196922
...
...
@@ -43,6 +43,7 @@ module Groups::SecurityFeaturesHelper
group_full_path:
group
.
full_path
,
no_vulnerabilities_svg_path:
image_path
(
'illustrations/issues.svg'
),
empty_state_svg_path:
image_path
(
'illustrations/security-dashboard-empty-state.svg'
),
survey_request_svg_path:
image_path
(
'illustrations/security-dashboard_empty.svg'
),
dashboard_documentation:
help_page_path
(
'user/application_security/security_dashboard/index'
),
vulnerabilities_export_endpoint:
expose_path
(
api_v4_security_groups_vulnerability_exports_path
(
id:
group
.
id
)),
scanners:
VulnerabilityScanners
::
ListService
.
new
(
group
).
execute
.
to_json
...
...
ee/app/helpers/security_helper.rb
View file @
7b196922
...
...
@@ -7,6 +7,7 @@ module SecurityHelper
no_vulnerabilities_svg_path:
image_path
(
'illustrations/issues.svg'
),
empty_dashboard_state_svg_path:
image_path
(
'illustrations/security-dashboard-empty-state.svg'
),
empty_state_svg_path:
image_path
(
'illustrations/operations-dashboard_empty.svg'
),
survey_request_svg_path:
image_path
(
'illustrations/security-dashboard_empty.svg'
),
project_add_endpoint:
security_projects_path
,
project_list_endpoint:
security_projects_path
,
instance_dashboard_settings_path:
settings_security_dashboard_path
,
...
...
ee/config/feature_flags/ops/vulnerability_management_survey.yml
0 → 100644
View file @
7b196922
---
name
:
vulnerability_management_survey
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/56620
rollout_issue_url
:
milestone
:
'
13.11'
type
:
ops
group
:
group::threat insights
default_enabled
:
false
ee/spec/helpers/groups/security_features_helper_spec.rb
View file @
7b196922
...
...
@@ -160,6 +160,7 @@ RSpec.describe Groups::SecurityFeaturesHelper do
group_full_path:
group
.
full_path
,
no_vulnerabilities_svg_path:
'/images/illustrations/issues.svg'
,
empty_state_svg_path:
'/images/illustrations/security-dashboard-empty-state.svg'
,
survey_request_svg_path:
'/images/illustrations/security-dashboard_empty.svg'
,
dashboard_documentation:
'/help/user/application_security/security_dashboard/index'
,
vulnerabilities_export_endpoint:
"/api/v4/security/groups/
#{
group
.
id
}
/vulnerability_exports"
,
scanners:
'[]'
...
...
ee/spec/helpers/projects_helper_spec.rb
View file @
7b196922
...
...
@@ -135,6 +135,7 @@ RSpec.describe ProjectsHelper do
has_vulnerabilities:
'false'
,
has_jira_vulnerabilities_integration_enabled:
'true'
,
empty_state_svg_path:
start_with
(
'/assets/illustrations/security-dashboard_empty'
),
survey_request_svg_path:
start_with
(
'/assets/illustrations/security-dashboard_empty'
),
security_dashboard_help_path:
'/help/user/application_security/security_dashboard/index'
,
project_full_path:
project
.
full_path
,
no_vulnerabilities_svg_path:
start_with
(
'/assets/illustrations/issues-'
),
...
...
@@ -155,6 +156,7 @@ RSpec.describe ProjectsHelper do
vulnerabilities_export_endpoint:
"/api/v4/security/projects/
#{
project
.
id
}
/vulnerability_exports"
,
no_vulnerabilities_svg_path:
start_with
(
'/assets/illustrations/issues-'
),
empty_state_svg_path:
start_with
(
'/assets/illustrations/security-dashboard-empty-state'
),
survey_request_svg_path:
start_with
(
'/assets/illustrations/security-dashboard_empty'
),
dashboard_documentation:
'/help/user/application_security/security_dashboard/index'
,
security_dashboard_help_path:
'/help/user/application_security/security_dashboard/index'
,
not_enabled_scanners_help_path:
help_page_path
(
'user/application_security/index'
,
anchor:
'quick-start'
),
...
...
ee/spec/helpers/security_helper_spec.rb
View file @
7b196922
...
...
@@ -14,6 +14,7 @@ RSpec.describe SecurityHelper do
no_vulnerabilities_svg_path:
image_path
(
'illustrations/issues.svg'
),
empty_dashboard_state_svg_path:
image_path
(
'illustrations/security-dashboard-empty-state.svg'
),
empty_state_svg_path:
image_path
(
'illustrations/operations-dashboard_empty.svg'
),
survey_request_svg_path:
image_path
(
'illustrations/security-dashboard_empty.svg'
),
project_add_endpoint:
security_projects_path
,
project_list_endpoint:
security_projects_path
,
instance_dashboard_settings_path:
settings_security_dashboard_path
,
...
...
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