Add a branch check for default security policy config
What does this MR do and why?
Add a branch check for default security policy config
Related to: #450891 (closed)
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Before | After |
---|---|
How to set up and validate locally
- Create a new project
- Go to Secure > Policies
- Click on New policy
- Select Scan execution policy
- Change to .yaml mode
- Copy the yaml below:
type: scan_execution_policy
name: policy
description: ''
enabled: true
rules:
- type: pipeline
branches:
- main
actions:
- scan: secret_detection
- Click on Configure with a merge request
- Go to Code > Branches
- Click on New branch
- Create a new branch
- Go to Code > Repository
- Change to the new branch
- Update the README.md file and commit
- Go to Build > Pipelines
- Verify there is no pipeline
- Go to Code > Repository
- Change to the
main
- Update the README.md file and commit
- Go to Build > Pipelines
- Verify a pipeline with the
secret_detection
job was created
Edited by Marcos Rocha