Skip to content

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
Screenshot_2024-04-15_at_8.41.35_AM

How to set up and validate locally

  1. Create a new project
  2. Go to Secure > Policies
  3. Click on New policy
  4. Select Scan execution policy
  5. Change to .yaml mode
  6. Copy the yaml below:
type: scan_execution_policy
name: policy
description: ''
enabled: true
rules:
  - type: pipeline
    branches:
      - main
actions:
  - scan: secret_detection
  1. Click on Configure with a merge request
  2. Go to Code > Branches
  3. Click on New branch
  4. Create a new branch
  5. Go to Code > Repository
  6. Change to the new branch
  7. Update the README.md file and commit
  8. Go to Build > Pipelines
  9. Verify there is no pipeline
  10. Go to Code > Repository
  11. Change to the main
  12. Update the README.md file and commit
  13. Go to Build > Pipelines
  14. Verify a pipeline with the secret_detection job was created
Edited by Marcos Rocha

Merge request reports

Loading