Add tag_list to DastScannerProfileType
What does this MR do and why?
This MR adds the tag_list
field to the DastScannerProfileType
, and updates the
related services, and mutations.
This MR is part of issue #345430 (closed)
Screenshots or screen recordings
Create a new DastScannerProfile
with tags.
Update the tags of a DastScannerProfile
.
How to set up and validate locally
Create a new DastScannerProfile with tags
- Go to
/-/graphql-explorer
- Type a query like
mutation dastScannerProfileCreate($input: DastScannerProfileCreateInput!) {
dastScannerProfileCreate(input: $input) {
id
errors
dastScannerProfile {
tagList
}
}
}
{
"input": {
"fullPath": "root/apiscantest",
"profileName": "Test Tags 2",
"tagList": ["ruby", "dast"]
}
}
- Check the result
{
"data": {
"dastScannerProfileCreate": {
"id": "gid://gitlab/DastScannerProfile/6",
"errors": [],
"dastScannerProfile": {
"tagList": [
"dast",
"ruby"
]
}
}
}
}
Update the tags of a DastScannerProfile
- Go to
/-/graphql-explorer
- Type a query like
mutation dastScannerProfileUpdate($input: DastScannerProfileUpdateInput!) {
dastScannerProfileUpdate(input: $input) {
id
errors
dastScannerProfile {
tagList
}
}
}
{
"input": {
"id": "gid://gitlab/DastScannerProfile/6",
"profileName": "Test Tags 2",
"spiderTimeout": 1,
"targetTimeout": 1,
"tagList": ["rails", "on-demand"]
}
}
- Check the result
{
"data": {
"dastScannerProfileUpdate": {
"id": "gid://gitlab/DastScannerProfile/6",
"errors": [],
"dastScannerProfile": {
"tagList": [
"on-demand",
"rails"
]
}
}
}
}
Run an on-demand scan
- Go to
/-/on_demand_scans#/all
- Create a new on-demand scan using a
DastScannerProfile
with tags - Make sure you have a runner with all
DastScannerProfile
tags. - Save and run the scan.
- Check the job created. It should have the
DastScannerProfile
tags. - Wait for the job to start. It should run on the runner with all
DastScannerProfile
tags.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Marcos Rocha