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
35e8701f
Commit
35e8701f
authored
Nov 18, 2020
by
Dheeraj Joshi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor site validation component
* Use fullPath for consistency * Remove header validation feature flag
parent
d708c675
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
43 deletions
+5
-43
config/feature_flags/development/security_on_demand_scans_http_header_validation.yml
...pment/security_on_demand_scans_http_header_validation.yml
+0
-8
ee/app/assets/javascripts/security_configuration/dast_site_validation/components/dast_site_validation_modal.vue
...site_validation/components/dast_site_validation_modal.vue
+2
-12
ee/app/assets/javascripts/security_configuration/dast_site_validation/graphql/dast_site_validation_create.mutation.graphql
...tion/graphql/dast_site_validation_create.mutation.graphql
+2
-2
ee/app/controllers/projects/security/dast_profiles_controller.rb
...controllers/projects/security/dast_profiles_controller.rb
+0
-1
ee/spec/frontend/security_configuration/dast_site_validation/components/dast_site_validation_modal_spec.js
..._validation/components/dast_site_validation_modal_spec.js
+1
-20
No files found.
config/feature_flags/development/security_on_demand_scans_http_header_validation.yml
deleted
100644 → 0
View file @
d708c675
---
name
:
security_on_demand_scans_http_header_validation
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/42812
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/276403
milestone
:
'
13.6'
type
:
development
group
:
group::dynamic analysis
default_enabled
:
false
ee/app/assets/javascripts/security_configuration/dast_site_validation/components/dast_site_validation_modal.vue
View file @
35e8701f
...
...
@@ -11,12 +11,10 @@ import {
GlSkeletonLoader
,
GlTruncate
,
}
from
'
@gitlab/ui
'
;
import
{
omit
}
from
'
lodash
'
;
import
{
__
,
s__
}
from
'
~/locale
'
;
import
*
as
Sentry
from
'
~/sentry/wrapper
'
;
import
ClipboardButton
from
'
~/vue_shared/components/clipboard_button.vue
'
;
import
download
from
'
~/lib/utils/downloader
'
;
import
glFeatureFlagsMixin
from
'
~/vue_shared/mixins/gl_feature_flags_mixin
'
;
import
{
cleanLeadingSeparator
,
joinPaths
,
stripPathTail
}
from
'
~/lib/utils/url_utility
'
;
import
{
DAST_SITE_VALIDATION_MODAL_ID
,
...
...
@@ -44,7 +42,6 @@ export default {
GlSkeletonLoader
,
GlTruncate
,
},
mixins
:
[
glFeatureFlagsMixin
()],
props
:
{
fullPath
:
{
type
:
String
,
...
...
@@ -85,14 +82,7 @@ export default {
};
},
validationMethodOptions
()
{
const
isHttpHeaderValidationEnabled
=
this
.
glFeatures
.
securityOnDemandScansHttpHeaderValidation
;
const
enabledValidationMethods
=
omit
(
DAST_SITE_VALIDATION_METHODS
,
[
!
isHttpHeaderValidationEnabled
?
DAST_SITE_VALIDATION_METHOD_HTTP_HEADER
:
''
,
]);
return
Object
.
values
(
enabledValidationMethods
);
return
Object
.
values
(
DAST_SITE_VALIDATION_METHODS
);
},
urlObject
()
{
try
{
...
...
@@ -187,7 +177,7 @@ export default {
await
this
.
$apollo
.
mutate
({
mutation
:
dastSiteValidationCreateMutation
,
variables
:
{
projectF
ullPath
:
this
.
fullPath
,
f
ullPath
:
this
.
fullPath
,
dastSiteTokenId
:
this
.
tokenId
,
validationPath
:
this
.
validationPath
,
validationStrategy
:
this
.
validationMethod
,
...
...
ee/app/assets/javascripts/security_configuration/dast_site_validation/graphql/dast_site_validation_create.mutation.graphql
View file @
35e8701f
mutation
dastSiteValidationCreate
(
$
projectF
ullPath
:
ID
!
$
f
ullPath
:
ID
!
$dastSiteTokenId
:
DastSiteTokenID
!
$validationPath
:
String
!
$validationStrategy
:
DastSiteValidationStrategyEnum
)
{
dastSiteValidationCreate
(
input
:
{
fullPath
:
$
projectF
ullPath
fullPath
:
$
f
ullPath
dastSiteTokenId
:
$dastSiteTokenId
validationPath
:
$validationPath
strategy
:
$validationStrategy
...
...
ee/app/controllers/projects/security/dast_profiles_controller.rb
View file @
35e8701f
...
...
@@ -6,7 +6,6 @@ module Projects
before_action
do
authorize_read_on_demand_scans!
push_frontend_feature_flag
(
:security_on_demand_scans_site_validation
,
@project
)
push_frontend_feature_flag
(
:security_on_demand_scans_http_header_validation
,
@project
)
end
feature_category
:dynamic_application_security_testing
...
...
ee/spec/frontend/security_configuration/dast_site_validation/components/dast_site_validation_modal_spec.js
View file @
35e8701f
...
...
@@ -51,9 +51,6 @@ describe('DastSiteValidationModal', () => {
{},
{
propsData
:
defaultProps
,
provide
:
{
glFeatures
:
{
securityOnDemandScansHttpHeaderValidation
:
true
},
},
attrs
:
{
static
:
true
,
visible
:
true
,
...
...
@@ -287,22 +284,6 @@ describe('DastSiteValidationModal', () => {
});
});
describe
(
'
with the "securityOnDemandScansHttpHeaderValidation" feature flag disabled
'
,
()
=>
{
beforeEach
(()
=>
{
createFullComponent
({
provide
:
{
glFeatures
:
{
securityOnDemandScansHttpHeaderValidation
:
false
,
},
},
});
});
it
(
'
does not render the http-header validation method
'
,
()
=>
{
expect
(
findRadioInputForValidationMethod
(
'
header
'
)).
toBe
(
null
);
});
});
describe
.
each
(
validationMethods
)(
'
"%s" validation submission
'
,
validationMethod
=>
{
beforeEach
(
async
()
=>
{
createFullComponent
();
...
...
@@ -318,7 +299,7 @@ describe('DastSiteValidationModal', () => {
findValidateButton
().
trigger
(
'
click
'
);
expect
(
requestHandlers
.
dastSiteValidationCreate
).
toHaveBeenCalledWith
({
projectFullPath
:
fullPath
,
fullPath
,
dastSiteTokenId
:
tokenId
,
validationPath
:
wrapper
.
vm
.
validationPath
,
validationStrategy
:
wrapper
.
vm
.
validationMethod
,
...
...
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