Loading
Show every attached scan profile on the project security configuration page
What does this MR do and why?
Show every attached scan profile
List every attached scan profile in its own row on the project security
configuration page. ScanProfileConfiguration builds one table item per
attached profile, so each gets its own preview link, scanner health,
last scan and actions. ScanProfileTable leaves the scanner cell empty
on the later rows of a scan type and drops the border between them, so
the rows of one type read as a group.
Track the profile being disabled, so Disable detaches the clicked
profile instead of the first one of its type, and name that profile in
DisableScanProfileConfirmationModal. Build the rows one scan type at a
time, so the profiles of a type stay adjacent. Rows with zero or one
attached profile render as before.
Related to https://gitlab.com/gitlab-org/gitlab/-/issues/624190
Changelog: changed
EE: trueReferences
- related discussion: #631608 (comment 3940331781)
- sibling MR: Show every attached scan profile on the group s... (!259229 - merged)
- issue: [Frontend] Support custom Secret Detection prof... (#624190 - closed)
- epic: Advanced Secret Detection Configuration Profile (gitlab-org#20198)
Screenshots or screen recordings
| Before | After |
|---|---|
with three SAST profiles attached, only one is shown ![]() |
with three SAST profiles attached, all three are shown ![]() |
How to set up and validate locally
-
git checkout 624190-show-all-attached-scan-profiles-in-project-configurationexpand for seed script
project = Project.find_by_full_path('<group>/<project>') %w[first second].each do |name| profile = Security::ScanProfile.create!( namespace: project.root_ancestor, scan_type: :sast, name: "SAST #{name}", gitlab_recommended: false ) Security::ScanProfileProject.create!(project: project, scan_profile: profile) end -
have a GitLab Ultimate licence
-
go to the project =>
Secure=>Security configuration -
check that the
Static application security testing (SAST)scanner has one row per attached profile:- each row has its own profile link,
Scanner healthandLast scan - only the first row shows the scanner name
- there is no divider between rows of the same scanner
- each row has its own profile link,
-
check that scanners with one profile or no profile look the same as on
master -
open the actions menu on the second SAST row =>
Disable=> confirm- the confirmation names that profile
- only that profile should be detached, and the first SAST row should stay
to run tests
yarn jest ee/spec/frontend/security_configuration/components/scan_profiles/scan_profile_configuration_spec.js ee/spec/frontend/security_configuration/components/scan_profiles/disable_scan_profile_confirmation_modal_spec.js spec/frontend/security_configuration/components/scan_profiles/scan_profile_table_spec.jsMR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #624190 (closed)
Edited by Miranda Fluharty

