FE: Create scans action component
Why are we doing this work
- Users want to create an action to run a particular scan
Relevant links
Scan Type | Screenshot |
---|---|
DAST | ![]() |
All other scans | ![]() |
Non-functional requirements
-
Feature flag: -
Testing:
Implementation plan
-
frontend create scan action component on both the project and group levels (for more context look at the action
schema docs)- look at
scan_result_policy_editor.vue
for examples on using thepolicy_editor_layout.vue
actions
slot and do something similar inscan_execution_policy_editor.vue
by creating a scan executionpolicy_action_builder.vue
component - look at the files in the
scan_result_policy/lib
directory on how to convert to/from yaml (e.g.to_yaml.js
,from_yaml.js
,humanize.js
, andactions.js
) and follow that pattern in thescan_execution_policy/lib
directory - for DAST scans, add additional input boxes for scan/site profiles allowing for comma-separated lists (similar to branches)
- look at
-
frontend if the backend hasn't created a list of available scans (see this conversation and Add scan type enum to GraphQL API (#365579 - closed)), temporarily create your own -
frontend ensure the policy_drawer continues to display the humanized policy correctly -
frontend disable rule mode for unsupported actions
Verification steps
- Upload a GitLab Ultimate license
- Turn on the
:scan_execution_rule_mode
feature flag - Navigate to a project =>
Security & Compliance
=>Policies
=>New policy
=>Scan Execution Policy
- Verify rule mode scans action works
- Navigate to a group =>
Security & Compliance
=>Policies
=>New policy
=>Scan Execution Policy
- Verify rule mode scans action works
Edited by Alexander Turinske