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
0d5f9b9f
Commit
0d5f9b9f
authored
Nov 09, 2021
by
Paul Gascou-Vaillancourt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move IaC Scanning UI to CE
This moves the FE code for configuring IaC Scanning back to CE.
parent
c017a014
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
24 deletions
+24
-24
app/assets/javascripts/security_configuration/components/constants.js
...avascripts/security_configuration/components/constants.js
+21
-0
app/assets/javascripts/security_configuration/graphql/configure_iac.mutation.graphql
...rity_configuration/graphql/configure_iac.mutation.graphql
+0
-0
config/known_invalid_graphql_queries.yml
config/known_invalid_graphql_queries.yml
+1
-2
ee/app/assets/javascripts/security_configuration/components/constants.js
...avascripts/security_configuration/components/constants.js
+1
-20
ee/lib/ee/gitlab/gon_helper.rb
ee/lib/ee/gitlab/gon_helper.rb
+0
-2
lib/gitlab/gon_helper.rb
lib/gitlab/gon_helper.rb
+1
-0
No files found.
app/assets/javascripts/security_configuration/components/constants.js
View file @
0d5f9b9f
...
...
@@ -17,6 +17,7 @@ import {
}
from
'
~/vue_shared/security_reports/constants
'
;
import
configureSastMutation
from
'
../graphql/configure_sast.mutation.graphql
'
;
import
configureSastIacMutation
from
'
../graphql/configure_iac.mutation.graphql
'
;
import
configureSecretDetectionMutation
from
'
../graphql/configure_secret_detection.mutation.graphql
'
;
/**
...
...
@@ -162,6 +163,11 @@ export const securityFeatures = [
configurationHelpPath
:
SAST_IAC_CONFIG_HELP_PATH
,
type
:
REPORT_TYPE_SAST_IAC
,
// This field is currently hardcoded because SAST IaC is always available.
// It will eventually come from the Backend, the progress is tracked in
// https://gitlab.com/gitlab-org/gitlab/-/issues/331622
available
:
true
,
// This field will eventually come from the backend, the progress is
// tracked in https://gitlab.com/gitlab-org/gitlab/-/issues/331621
canEnableByMergeRequest
:
true
,
...
...
@@ -269,6 +275,21 @@ export const featureToMutationMap = {
},
}),
},
...(
gon
?.
features
?.
configureIacScanningViaMr
?
{
[
REPORT_TYPE_SAST_IAC
]:
{
mutationId
:
'
configureSastIac
'
,
getMutationPayload
:
(
projectPath
)
=>
({
mutation
:
configureSastIacMutation
,
variables
:
{
input
:
{
projectPath
,
},
},
}),
},
}
:
{}),
[
REPORT_TYPE_SECRET_DETECTION
]:
{
mutationId
:
'
configureSecretDetection
'
,
getMutationPayload
:
(
projectPath
)
=>
({
...
...
ee/
app/assets/javascripts/security_configuration/graphql/configure_iac.mutation.graphql
→
app/assets/javascripts/security_configuration/graphql/configure_iac.mutation.graphql
View file @
0d5f9b9f
File moved
config/known_invalid_graphql_queries.yml
View file @
0d5f9b9f
---
filenames
:
-
ee/app/assets/javascripts/oncall_schedules/graphql/mutations/update_oncall_schedule_rotation.mutation.graphql
-
ee/app/assets/javascripts/security_configuration/graphql/configure_iac.mutation.graphql
-
ee/app/assets/javascripts/oncall_schedules/graphql/mutations/update_oncall_schedule_rotation.mutation.graphql
\ No newline at end of file
ee/app/assets/javascripts/security_configuration/components/constants.js
View file @
0d5f9b9f
import
{
s__
}
from
'
~/locale
'
;
import
{
featureToMutationMap
as
featureToMutationMapCE
}
from
'
~/security_configuration/components/constants
'
;
import
{
REPORT_TYPE_SAST_IAC
,
REPORT_TYPE_DEPENDENCY_SCANNING
,
}
from
'
~/vue_shared/security_reports/constants
'
;
import
configureSastIacMutation
from
'
../graphql/configure_iac.mutation.graphql
'
;
import
{
REPORT_TYPE_DEPENDENCY_SCANNING
}
from
'
~/vue_shared/security_reports/constants
'
;
import
configureDependencyScanningMutation
from
'
../graphql/configure_dependency_scanning.mutation.graphql
'
;
export
const
SMALL
=
'
SMALL
'
;
...
...
@@ -25,21 +21,6 @@ export const CUSTOM_VALUE_MESSAGE = s__(
export
const
featureToMutationMap
=
{
...
featureToMutationMapCE
,
...(
gon
?.
features
?.
configureIacScanningViaMr
?
{
[
REPORT_TYPE_SAST_IAC
]:
{
mutationId
:
'
configureSastIac
'
,
getMutationPayload
:
(
projectPath
)
=>
({
mutation
:
configureSastIacMutation
,
variables
:
{
input
:
{
projectPath
,
},
},
}),
},
}
:
{}),
[
REPORT_TYPE_DEPENDENCY_SCANNING
]:
{
mutationId
:
'
configureDependencyScanning
'
,
getMutationPayload
:
(
projectPath
)
=>
({
...
...
ee/lib/ee/gitlab/gon_helper.rb
View file @
0d5f9b9f
...
...
@@ -15,8 +15,6 @@ module EE
gon
.
subscriptions_url
=
::
Gitlab
::
SubscriptionPortal
::
SUBSCRIPTIONS_URL
gon
.
payment_form_url
=
::
Gitlab
::
SubscriptionPortal
::
PAYMENT_FORM_URL
end
push_frontend_feature_flag
(
:configure_iac_scanning_via_mr
,
current_user
,
default_enabled: :yaml
)
end
# Exposes if a licensed feature is available.
...
...
lib/gitlab/gon_helper.rb
View file @
0d5f9b9f
...
...
@@ -57,6 +57,7 @@ module Gitlab
push_frontend_feature_flag
(
:improved_emoji_picker
,
default_enabled: :yaml
)
push_frontend_feature_flag
(
:new_header_search
,
default_enabled: :yaml
)
push_frontend_feature_flag
(
:suppress_apollo_errors_during_navigation
,
current_user
,
default_enabled: :yaml
)
push_frontend_feature_flag
(
:configure_iac_scanning_via_mr
,
current_user
,
default_enabled: :yaml
)
end
# Exposes the state of a feature flag to the frontend code.
...
...
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