Secret Detection - MVC to enable within the UI - Frontend
Why are we doing this work
This issue tracks frontend work to add an Enable button on the Secret Detection row within the Security Configuration page. When clicked, the backend will create an MR and the user will be directed to the MR page.
Relevant links
Information that the developer might need to refer to when implementing the issue.
- Design Issue
- backend issue
- Similar implementation for SAST enable done in %13.2
- Concurrent implementation for Dependency Scanning
Non-functional requirements
-
Documentation: yes, needed -
Feature flag: yes, this work should be controlled by a flag -
Performance: -
Testing: needs unit tests. Possibly end to end tests.
Implementation plan
-
Create sec_secret_detection_ui_enablefeature flag -
Propagate flag to frontend within https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/app/controllers/projects/security/sast_configuration_controller.rb -
Add createSecretDetectionMergeRequestPath to https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/app/assets/javascripts/security_configuration/index.js - Note this requires the field to be available and passed from the backend
-
Update https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/app/assets/javascripts/security_configuration/components/create_merge_request_button.vue to generically support creating merge requests -
Update https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/app/assets/javascripts/security_configuration/components/app.vue to conditionally pass createSastMergeRequestPath, createDependencyScanningMergeRequestPath, etc to the button component -
Tests: -
Add a prop validator to ManageViaMrto ensure that only supported features are passed-in.
Edited by Neil McCorrison