UX discussion: deleting DAST site/scanner profiles being used in a DAST scan

Currently, it is possible to delete a site or scanner profile that's being used in a DAST scan. When doing so, we don't give any warning to the user. If they proceed with the deletion, the associated DAST scans are actually removed as well, which results in a rather confusing experience.

After removing the scanner profile in the following recording, the DAST scan is still visible in the list because it is cached client-side. When trying to edit it, we get a 404 because it actually doesn't exist anymore. When navigating backward, the list is refetched and the DAST scan isn't there anymore.

profile_removal_480p

This might be especially confusing with scheduled scans as a user might not be aware that their scan won't run anymore after deleting a profile.

Proposal

Instead of cascading the deletion from the profile to the DAST scan, we should only remove the association. This way, users can still edit the DAST scan and associate another profile. In the deletion modal, we should list the DAST scans that are still using the profile to be removed and explain that the association will be removed.

🎨 Figma Design File 🎨

/cc @mfangman @djadmin @philipcunningham @atiwari71

Edited by Michael Fangman