Skip to content

Add parsing error handling for Scan Execution Policy

What does this MR do and why?

Describe in detail what your merge request does and why.

This MR resolves #393154 (closed)

There is a possibility for a user to add tags in yaml mode while creating scan execution policy, that do not exist on backend (on a runner)

If that happens, rule mode should be disabled and alert message should be displayed

STEP ISSUE
This MR will replace free-form input field with a dropdown (filled with queried tags) MR
Address switching between rule/yaml mode and displaying parsing errors 👈 this one
Switch option between has specific tag and selected automatically TBD

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

ERROR HANDLING
error

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. If there no tags on your runner you can check disabled state first in step 3
  2. Add tags in /groups/GROUP_NAME/-/runners or in admin section. Edit runner and add tags.
  3. Go to Project -> Security & Compliance -> Policies -> New policy -> Scan execution policy
  4. There is one action added by default you can see dropdown with runner tags
  5. switch to yaml mode add existing tags and invalid one switch back to rule mode

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #393154 (closed)

Edited by Artur Fedorov

Merge request reports

Loading