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
b28b4f98
Commit
b28b4f98
authored
Dec 15, 2020
by
Paul Gascou-Vaillancourt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use input types in DAST mutations
Leverage input types in DAST GraphQL mutations
parent
a30bdc7f
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
54 additions
and
99 deletions
+54
-99
ee/app/assets/javascripts/on_demand_scans/components/on_demand_scans_form.vue
...ripts/on_demand_scans/components/on_demand_scans_form.vue
+5
-3
ee/app/assets/javascripts/on_demand_scans/graphql/dast_on_demand_scan_create.mutation.graphql
...scans/graphql/dast_on_demand_scan_create.mutation.graphql
+2
-12
ee/app/assets/javascripts/security_configuration/dast_profiles/components/dast_profiles.vue
..._configuration/dast_profiles/components/dast_profiles.vue
+4
-2
ee/app/assets/javascripts/security_configuration/dast_profiles/graphql/dast_scanner_profiles_delete.mutation.graphql
...les/graphql/dast_scanner_profiles_delete.mutation.graphql
+2
-4
ee/app/assets/javascripts/security_configuration/dast_profiles/graphql/dast_site_profiles_delete.mutation.graphql
...ofiles/graphql/dast_site_profiles_delete.mutation.graphql
+2
-2
ee/app/assets/javascripts/security_configuration/dast_scanner_profiles/components/dast_scanner_profile_form.vue
...scanner_profiles/components/dast_scanner_profile_form.vue
+5
-3
ee/app/assets/javascripts/security_configuration/dast_scanner_profiles/graphql/dast_scanner_profile_create.mutation.graphql
...iles/graphql/dast_scanner_profile_create.mutation.graphql
+2
-20
ee/app/assets/javascripts/security_configuration/dast_scanner_profiles/graphql/dast_scanner_profile_update.mutation.graphql
...iles/graphql/dast_scanner_profile_update.mutation.graphql
+2
-22
ee/app/assets/javascripts/security_configuration/dast_site_profiles_form/components/dast_site_profile_form.vue
..._site_profiles_form/components/dast_site_profile_form.vue
+5
-3
ee/app/assets/javascripts/security_configuration/dast_site_profiles_form/graphql/dast_site_profile_create.mutation.graphql
...es_form/graphql/dast_site_profile_create.mutation.graphql
+2
-4
ee/app/assets/javascripts/security_configuration/dast_site_profiles_form/graphql/dast_site_profile_update.mutation.graphql
...es_form/graphql/dast_site_profile_update.mutation.graphql
+2
-9
ee/spec/frontend/on_demand_scans/components/on_demand_scans_form_spec.js
...d/on_demand_scans/components/on_demand_scans_form_spec.js
+5
-3
ee/spec/frontend/security_configuration/dast_scanner_profiles_form/components/dast_scanner_profiles_form_spec.js
...ofiles_form/components/dast_scanner_profiles_form_spec.js
+10
-8
ee/spec/frontend/security_configuration/dast_site_profiles_form/components/dast_site_profile_form_spec.js
...e_profiles_form/components/dast_site_profile_form_spec.js
+6
-4
No files found.
ee/app/assets/javascripts/on_demand_scans/components/on_demand_scans_form.vue
View file @
b28b4f98
...
...
@@ -174,9 +174,11 @@ export default {
.
mutate
({
mutation
:
dastOnDemandScanCreateMutation
,
variables
:
{
fullPath
:
this
.
projectPath
,
dastScannerProfileId
:
this
.
selectedScannerProfile
.
id
,
dastSiteProfileId
:
this
.
selectedSiteProfile
.
id
,
input
:
{
fullPath
:
this
.
projectPath
,
dastScannerProfileId
:
this
.
selectedScannerProfile
.
id
,
dastSiteProfileId
:
this
.
selectedSiteProfile
.
id
,
},
},
})
.
then
(({
data
:
{
dastOnDemandScanCreate
:
{
pipelineUrl
,
errors
}
}
})
=>
{
...
...
ee/app/assets/javascripts/on_demand_scans/graphql/dast_on_demand_scan_create.mutation.graphql
View file @
b28b4f98
mutation
dastOnDemandScanCreate
(
$fullPath
:
ID
!
$dastScannerProfileId
:
DastScannerProfileID
$dastSiteProfileId
:
DastSiteProfileID
!
)
{
dastOnDemandScanCreate
(
input
:
{
fullPath
:
$fullPath
dastScannerProfileId
:
$dastScannerProfileId
dastSiteProfileId
:
$dastSiteProfileId
}
)
{
mutation
dastOnDemandScanCreate
(
$input
:
DastOnDemandScanCreateInput
!)
{
dastOnDemandScanCreate
(
input
:
$input
)
{
pipelineUrl
errors
}
...
...
ee/app/assets/javascripts/security_configuration/dast_profiles/components/dast_profiles.vue
View file @
b28b4f98
...
...
@@ -172,8 +172,10 @@ export default {
.
mutate
({
mutation
:
deletion
.
mutation
,
variables
:
{
projectFullPath
,
profileId
,
input
:
{
fullPath
:
projectFullPath
,
profileId
,
},
},
update
(
store
,
{
data
=
{}
})
{
const
errors
=
data
[
`
${
profileType
}
Delete`
]?.
errors
??
[];
...
...
ee/app/assets/javascripts/security_configuration/dast_profiles/graphql/dast_scanner_profiles_delete.mutation.graphql
View file @
b28b4f98
mutation
dastScannerProfileDelete
(
$projectFullPath
:
ID
!,
$profileId
:
DastScannerProfileID
!)
{
scannerProfilesDelete
:
dastScannerProfileDelete
(
input
:
{
fullPath
:
$projectFullPath
,
id
:
$profileId
}
)
{
mutation
dastScannerProfileDelete
(
$input
:
DastScannerProfileDeleteInput
!)
{
scannerProfilesDelete
:
dastScannerProfileDelete
(
input
:
$input
)
{
errors
}
}
ee/app/assets/javascripts/security_configuration/dast_profiles/graphql/dast_site_profiles_delete.mutation.graphql
View file @
b28b4f98
mutation
dastSiteProfileDelete
(
$
projectFullPath
:
ID
!,
$profileId
:
DastSiteProfileID
!)
{
siteProfilesDelete
:
dastSiteProfileDelete
(
input
:
{
fullPath
:
$projectFullPath
,
id
:
$profileId
}
)
{
mutation
dastSiteProfileDelete
(
$
input
:
DastSiteProfileDeleteInput
!)
{
siteProfilesDelete
:
dastSiteProfileDelete
(
input
:
$input
)
{
errors
}
}
ee/app/assets/javascripts/security_configuration/dast_scanner_profiles/components/dast_scanner_profile_form.vue
View file @
b28b4f98
...
...
@@ -171,9 +171,11 @@ export default {
this
.
hideErrors
();
const
variables
=
{
projectFullPath
:
this
.
projectFullPath
,
...(
this
.
isEdit
?
{
id
:
this
.
profile
.
id
}
:
{}),
...
serializeFormObject
(
this
.
form
),
input
:
{
fullPath
:
this
.
projectFullPath
,
...(
this
.
isEdit
?
{
id
:
this
.
profile
.
id
}
:
{}),
...
serializeFormObject
(
this
.
form
),
},
};
this
.
$apollo
...
...
ee/app/assets/javascripts/security_configuration/dast_scanner_profiles/graphql/dast_scanner_profile_create.mutation.graphql
View file @
b28b4f98
mutation
dastScannerProfileCreate
(
$projectFullPath
:
ID
!
$profileName
:
String
!
$spiderTimeout
:
Int
!
$targetTimeout
:
Int
!
$scanType
:
DastScanTypeEnum
!
$useAjaxSpider
:
Boolean
!
$showDebugMessages
:
Boolean
!
)
{
dastScannerProfileCreate
(
input
:
{
fullPath
:
$projectFullPath
profileName
:
$profileName
spiderTimeout
:
$spiderTimeout
targetTimeout
:
$targetTimeout
scanType
:
$scanType
useAjaxSpider
:
$useAjaxSpider
showDebugMessages
:
$showDebugMessages
}
)
{
mutation
dastScannerProfileCreate
(
$input
:
DastScannerProfileCreateInput
!)
{
dastScannerProfileCreate
(
input
:
$input
)
{
errors
}
}
ee/app/assets/javascripts/security_configuration/dast_scanner_profiles/graphql/dast_scanner_profile_update.mutation.graphql
View file @
b28b4f98
mutation
dastScannerProfileUpdate
(
$id
:
DastScannerProfileID
!
$projectFullPath
:
ID
!
$profileName
:
String
!
$spiderTimeout
:
Int
!
$targetTimeout
:
Int
!
$scanType
:
DastScanTypeEnum
!
$useAjaxSpider
:
Boolean
!
$showDebugMessages
:
Boolean
!
)
{
dastScannerProfileUpdate
(
input
:
{
id
:
$id
fullPath
:
$projectFullPath
profileName
:
$profileName
spiderTimeout
:
$spiderTimeout
targetTimeout
:
$targetTimeout
scanType
:
$scanType
useAjaxSpider
:
$useAjaxSpider
showDebugMessages
:
$showDebugMessages
}
)
{
mutation
dastScannerProfileUpdate
(
$input
:
DastScannerProfileUpdateInput
!)
{
dastScannerProfileUpdate
(
input
:
$input
)
{
id
errors
}
...
...
ee/app/assets/javascripts/security_configuration/dast_site_profiles_form/components/dast_site_profile_form.vue
View file @
b28b4f98
...
...
@@ -105,9 +105,11 @@ export default {
const
{
errorMessage
}
=
this
.
i18n
;
const
variables
=
{
fullPath
:
this
.
fullPath
,
...(
this
.
isEdit
?
{
id
:
this
.
siteProfile
.
id
}
:
{}),
...
serializeFormObject
(
this
.
form
.
fields
),
input
:
{
fullPath
:
this
.
fullPath
,
...(
this
.
isEdit
?
{
id
:
this
.
siteProfile
.
id
}
:
{}),
...
serializeFormObject
(
this
.
form
.
fields
),
},
};
this
.
$apollo
...
...
ee/app/assets/javascripts/security_configuration/dast_site_profiles_form/graphql/dast_site_profile_create.mutation.graphql
View file @
b28b4f98
mutation
dastSiteProfileCreate
(
$fullPath
:
ID
!,
$profileName
:
String
!,
$targetUrl
:
String
)
{
dastSiteProfileCreate
(
input
:
{
fullPath
:
$fullPath
,
profileName
:
$profileName
,
targetUrl
:
$targetUrl
}
)
{
mutation
dastSiteProfileCreate
(
$input
:
DastSiteProfileCreateInput
!)
{
dastSiteProfileCreate
(
input
:
$input
)
{
id
errors
}
...
...
ee/app/assets/javascripts/security_configuration/dast_site_profiles_form/graphql/dast_site_profile_update.mutation.graphql
View file @
b28b4f98
mutation
dastSiteProfileUpdate
(
$id
:
DastSiteProfileID
!
$fullPath
:
ID
!
$profileName
:
String
!
$targetUrl
:
String
)
{
dastSiteProfileUpdate
(
input
:
{
id
:
$id
,
fullPath
:
$fullPath
,
profileName
:
$profileName
,
targetUrl
:
$targetUrl
}
)
{
mutation
dastSiteProfileUpdate
(
$input
:
DastSiteProfileUpdateInput
!)
{
dastSiteProfileUpdate
(
input
:
$input
)
{
id
errors
}
...
...
ee/spec/frontend/on_demand_scans/components/on_demand_scans_form_spec.js
View file @
b28b4f98
...
...
@@ -200,9 +200,11 @@ describe('OnDemandScansForm', () => {
expect
(
subject
.
vm
.
$apollo
.
mutate
).
toHaveBeenCalledWith
({
mutation
:
dastOnDemandScanCreate
,
variables
:
{
dastScannerProfileId
:
passiveScannerProfile
.
id
,
dastSiteProfileId
:
nonValidatedSiteProfile
.
id
,
fullPath
:
projectPath
,
input
:
{
dastScannerProfileId
:
passiveScannerProfile
.
id
,
dastSiteProfileId
:
nonValidatedSiteProfile
.
id
,
fullPath
:
projectPath
,
},
},
});
});
...
...
ee/spec/frontend/security_configuration/dast_scanner_profiles_form/components/dast_scanner_profiles_form_spec.js
View file @
b28b4f98
...
...
@@ -189,14 +189,16 @@ describe('DAST Scanner Profile', () => {
expect
(
wrapper
.
vm
.
$apollo
.
mutate
).
toHaveBeenCalledWith
({
mutation
,
variables
:
{
profileName
,
spiderTimeout
,
targetTimeout
,
projectFullPath
,
scanType
,
useAjaxSpider
,
showDebugMessages
,
...
mutationVars
,
input
:
{
profileName
,
spiderTimeout
,
targetTimeout
,
fullPath
:
projectFullPath
,
scanType
,
useAjaxSpider
,
showDebugMessages
,
...
mutationVars
,
},
},
});
});
...
...
ee/spec/frontend/security_configuration/dast_site_profiles_form/components/dast_site_profile_form_spec.js
View file @
b28b4f98
...
...
@@ -173,10 +173,12 @@ describe('DastSiteProfileForm', () => {
it
(
'
triggers GraphQL mutation
'
,
()
=>
{
expect
(
requestHandlers
[
mutationKind
]).
toHaveBeenCalledWith
({
profileName
,
targetUrl
,
fullPath
,
...
mutationVars
,
input
:
{
profileName
,
targetUrl
,
fullPath
,
...
mutationVars
,
},
});
});
...
...
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