Skip to content

Prevent conflicting profiles in on-demand scans

What does this MR do?

This prevents an on-demand scans from being run with an invalid combination of profiles. When an active scanner profile is selected along with a non-validated site profile, we'll disable the form's submission and show an alert explaining how to fix the conflict.

How to test this?

  1. Make sure to enable to the :security_on_demand_scans_site_validation feature flag:
echo "Feature.enable(:security_on_demand_scans_site_validation)" | rails c
  1. Make sure you have at least one active scanner profile, you can create one at /:group/:project/-/security/configuration/dast_profiles#scanner-profiles
  2. Make sure you have at least one non-validated site profile, you can create one at /:group/:project/-/security/configuration/dast_profiles#site-profiles
  3. Visit the On-demand Scans form at /:group/:project/-/on_demand_scans and try selecting an active scanner profile along with a non-validated site profile.

Screenshots (strongly suggested)

conflicting_profiles

Before After
before after

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Related to #280573 (closed)

Edited by Paul Gascou-Vaillancourt

Merge request reports