Unable to update / delete site profiles in DAST profile library

Summary

Unable to update / delete site profiles in DAST profile library .

Steps to reproduce

  1. Create a DAST site profile with a valid URL (eg. https://site.com/). Then save it.
  2. Try to update the newly created site profile and click on save . The error message displayed in the screenshot will be observed:

Screenshot_2023-01-09_at_12.26.08_PM

  1. Also trying to delete the site profile throws the following error : Could not delete site profile. Please refresh the page, or try again later.

Screenshot_2023-01-09_at_12.28.25_PM

Example Project

https://gitlab.com/gitlab-gold/vid-ticket-repo/ticket-testt/-/security/configuration/profile_library#site-profiles

What is the current bug behavior?

Errors are observed while trying to update / delete the site profile for DAST On-Demand

What is the expected correct behavior?

Users should be allowed to update /delete the site profile as usual.

Output of checks

This bug happens on GitLab.com

Results of GitLab environment info

Expand for output related to GitLab environment info

(For installations with omnibus-gitlab package run and paste the output of:
`sudo gitlab-rake gitlab:env:info`)

(For installations from source run and paste the output of:
`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Possible fixes

Edited by Vidhya Hariharan