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?
- 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
- Make sure you have at least one active scanner profile, you can create one at
/:group/:project/-/security/configuration/dast_profiles#scanner-profiles
- Make sure you have at least one non-validated site profile, you can create one at
/:group/:project/-/security/configuration/dast_profiles#site-profiles
- 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)
Before | After |
---|---|
Does this MR meet the acceptance criteria?
Conformity
- [-] Changelog entry (not required as this is behind a feature flag )
- [-] Documentation (if required) see #271231 (closed)
-
Code review guidelines - [-] Merge request performance guidelines
-
Style guides - [-] Database guides
-
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. - [-] Tested in all supported browsers
- [-] Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Related to #280573 (closed)
Edited by Paul Gascou-Vaillancourt