Allow scan execution policies to create pipelines
Compare changes
- Marcos Rocha authored
@@ -10,14 +10,14 @@ class Content < Chain::Base
@@ -29,6 +29,24 @@ def break?
As someone accountable for an organization's security posture, I want to be confident that security scans are running on all of my repositories, even if those repositories do not have CI/CD configured.
Today, scan execution policies only ensure that the security scan configuration is present in pipelines that run. Something still needs to ensure that those pipelines are triggered. To ensure that those pipelines are triggered, new pipelines should be created if a scan execution policy applies to the repository. This should happen even if Auto DevOps is disabled and no .gitlab-ci.yml
is present.
We are adding a new config source to create pipelines with the security policy scans if the Auto DevOps is disabled and no .gitlab-ci.yml
is available.
Related issue #403723 (closed)
.gitlab-ci.yml
jobs merged with the security scan defined in the policy.Numbered steps to set up and validate the change are strongly suggested.
rails c
Feature.enable(:scan_execution_policy_pipelines)
/-/settings/ci_cd
Default to Auto DevOps pipeline
type: scan_execution_policy
name: 'Test policy pipeline'
description: ''
enabled: true
rules:
- type: pipeline
branches:
- '*'
actions:
- scan: container_scanning
tags: []
Configure with a merge request
.gitlab-ci.yml
file with the contenttest1:
stage: test
script:
- echo "Do a test here"
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.