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
b91845f1
Commit
b91845f1
authored
Oct 20, 2021
by
Philip Cunningham
Committed by
Vitali Tatarintev
Oct 20, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract common DastSiteProfile mutation arguments
parent
f8a75d53
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
54 deletions
+46
-54
ee/app/graphql/mutations/app_sec/dast/site_profiles/shared_arguments.rb
.../mutations/app_sec/dast/site_profiles/shared_arguments.rb
+42
-0
ee/app/graphql/mutations/dast_site_profiles/create.rb
ee/app/graphql/mutations/dast_site_profiles/create.rb
+2
-26
ee/app/graphql/mutations/dast_site_profiles/delete.rb
ee/app/graphql/mutations/dast_site_profiles/delete.rb
+1
-1
ee/app/graphql/mutations/dast_site_profiles/update.rb
ee/app/graphql/mutations/dast_site_profiles/update.rb
+1
-27
No files found.
ee/app/graphql/mutations/app_sec/dast/site_profiles/shared_arguments.rb
0 → 100644
View file @
b91845f1
# frozen_string_literal: true
module
Mutations
module
AppSec
module
Dast
module
SiteProfiles
module
SharedArguments
extend
ActiveSupport
::
Concern
SiteProfileID
=
::
Types
::
GlobalIDType
[
::
DastSiteProfile
]
included
do
argument
:full_path
,
GraphQL
::
Types
::
ID
,
required:
true
,
description:
'Project the site profile belongs to.'
argument
:profile_name
,
GraphQL
::
Types
::
String
,
required:
true
,
description:
'Name of the site profile.'
argument
:target_url
,
GraphQL
::
Types
::
String
,
required:
false
,
description:
'URL of the target to be scanned.'
argument
:target_type
,
Types
::
DastTargetTypeEnum
,
required:
false
,
description:
'Type of target to be scanned.'
argument
:request_headers
,
GraphQL
::
Types
::
String
,
required:
false
,
description:
'Comma-separated list of request header names and values to be '
\
'added to every request made by DAST.'
argument
:auth
,
::
Types
::
Dast
::
SiteProfileAuthInputType
,
required:
false
,
description:
'Parameters for authentication.'
end
end
end
end
end
end
ee/app/graphql/mutations/dast_site_profiles/create.rb
View file @
b91845f1
...
...
@@ -4,43 +4,19 @@ module Mutations
module
DastSiteProfiles
class
Create
<
BaseMutation
include
FindsProject
include
Mutations
::
AppSec
::
Dast
::
SiteProfiles
::
SharedArguments
graphql_name
'DastSiteProfileCreate'
field
:id
,
::
Types
::
GlobalIDType
[
::
DastSiteProfile
]
,
field
:id
,
SiteProfileID
,
null:
true
,
description:
'ID of the site profile.'
argument
:full_path
,
GraphQL
::
Types
::
ID
,
required:
true
,
description:
'Project the site profile belongs to.'
argument
:profile_name
,
GraphQL
::
Types
::
String
,
required:
true
,
description:
'Name of the site profile.'
argument
:target_url
,
GraphQL
::
Types
::
String
,
required:
false
,
description:
'URL of the target to be scanned.'
argument
:target_type
,
Types
::
DastTargetTypeEnum
,
required:
false
,
description:
'Type of target to be scanned.'
argument
:excluded_urls
,
[
GraphQL
::
Types
::
String
],
required:
false
,
default_value:
[],
description:
'URLs to skip during an authenticated scan. Defaults to `[]`.'
argument
:request_headers
,
GraphQL
::
Types
::
String
,
required:
false
,
description:
'Comma-separated list of request header names and values to be '
\
'added to every request made by DAST.'
argument
:auth
,
::
Types
::
Dast
::
SiteProfileAuthInputType
,
required:
false
,
description:
'Parameters for authentication.'
authorize
:create_on_demand_dast_scan
def
resolve
(
full_path
:,
profile_name
:,
target_url:
nil
,
**
params
)
...
...
ee/app/graphql/mutations/dast_site_profiles/delete.rb
View file @
b91845f1
...
...
@@ -9,7 +9,7 @@ module Mutations
required:
true
,
description:
'Project the site profile belongs to.'
argument
:id
,
::
Types
::
GlobalIDType
[
::
DastSiteProfile
]
,
argument
:id
,
Mutations
::
AppSec
::
Dast
::
SiteProfiles
::
SharedArguments
::
SiteProfileID
,
required:
true
,
description:
'ID of the site profile to be deleted.'
...
...
ee/app/graphql/mutations/dast_site_profiles/update.rb
View file @
b91845f1
...
...
@@ -4,48 +4,22 @@ module Mutations
module
DastSiteProfiles
class
Update
<
BaseMutation
include
FindsProject
include
Mutations
::
AppSec
::
Dast
::
SiteProfiles
::
SharedArguments
graphql_name
'DastSiteProfileUpdate'
SiteProfileID
=
::
Types
::
GlobalIDType
[
::
DastSiteProfile
]
field
:id
,
SiteProfileID
,
null:
true
,
description:
'ID of the site profile.'
argument
:full_path
,
GraphQL
::
Types
::
ID
,
required:
true
,
description:
'Project the site profile belongs to.'
argument
:id
,
SiteProfileID
,
required:
true
,
description:
'ID of the site profile to be updated.'
argument
:profile_name
,
GraphQL
::
Types
::
String
,
required:
true
,
description:
'Name of the site profile.'
argument
:target_url
,
GraphQL
::
Types
::
String
,
required:
false
,
description:
'URL of the target to be scanned.'
argument
:target_type
,
Types
::
DastTargetTypeEnum
,
required:
false
,
description:
'Type of target to be scanned.'
argument
:excluded_urls
,
[
GraphQL
::
Types
::
String
],
required:
false
,
description:
'URLs to skip during an authenticated scan.'
argument
:request_headers
,
GraphQL
::
Types
::
String
,
required:
false
,
description:
'Comma-separated list of request header names and values to be '
\
'added to every request made by DAST.'
argument
:auth
,
::
Types
::
Dast
::
SiteProfileAuthInputType
,
required:
false
,
description:
'Parameters for authentication.'
authorize
:create_on_demand_dast_scan
def
resolve
(
full_path
:,
id
:,
profile_name
:,
target_url:
nil
,
**
params
)
...
...
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