Skip to content

Allow SAST configuration with existing CI file

What does this MR do?

Allow SAST configuration with existing CI file

Previously, the Security Configuration page only linked to the SAST Configuration page for projects without an existing CI file. This was because the initial implementation did not support updating an existing CI file.

Now that the main technical limitation has been lifted (with caveats), the UI can direct users to the SAST Configuration page regardless of whether their project has an existing CI file.

This also changes the configuration button to say "Configure" if the given feature is already configured (by any means), and "Enable" if not. Previously this was based on whether Auto DevOps was enabled, but checking the configured status is more direct.

Addresses #240941 (closed).

Draft

Currently in Draft, as it's based on !40375 (merged) (since there would tricky merge conflicts otherwise).

Screenshots

Description Before After
Project with no CI file
(no change, although the alert is dismissible in After; this is only because this MR is based on !40375 (merged))
before_no_ci after2_no_ci
Project with CI file but SAST not configured
(Enable button now visible)
before_ci_no_sast after2_ci_no_sast
Project with CI file and SAST configured
(Configure button now visible)
before_ci_sast after2_ci_sast
Project with Auto DevOps enabled
(no change)
before_autodevops after2_autodevops

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Edited by Mark Florian

Merge request reports