Add security scan profile to project
What does this MR do and why?
Add security scan profile to project type, together with read_security_scan_profiles permission.
Changelog: added
EE: true
How to set up and validate locally
- Select a root group
gthat will be used to create a scan profile. - Create a
ScanProfile:profile = Security::ScanProfile.create!( namespace_id: g.id, # <- The selected group scan_type: :secret_detection, name: 'Test profile', description: 'Test profile for secret detection', gitlab_recommended: false ) - Choose a project
punder groupgand attach the profile to it:Security::ScanProfileProject.create!( security_scan_profile_id: profile.id, project_id: p.id ) - Verify the attachment:
p.security_scan_profiles - Sign in to your GDK as a developer (at least).
- Using this GraphQL query, fetch for the scan profiles attached to the project:
{ project(fullPath: "<p.full_path>") { id name securityScanProfiles { id name description scanType updatedAt createdAt gitlabRecommended } } } - Repeat with lower permission (e.g, reporter) to verify the scan profile is not accessible.
MR 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 [Backend] Add scan profile to project type (#581204 - closed) • Gal Katz • 18.7
Edited by Gal Katz