Ability to not create a pipeline by scan execution policies if project doesn't have CI/CD configured

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Proposal

When scan execution policy is configured, it creates .gitlab-ci.yml for projects without a .gitlab-ci.yml file, or where AutoDevOps is disabled.

This issue is to ask for a configuration option that gives the user ability to not inject .gitlab-ci.yml for projects that don't have .gitlab-ci.yml file or have AutoDevOps disabled. This gives ability to exclude the project(s) if they don't have CI/CD configured.

In the Scan execution policies page:

For projects without a .gitlab-ci.yml file, or where AutoDevOps is disabled, security policies create the .gitlab-ci.yml file implicitly. This ensures policies enabling execution of secret detection, static analysis, or other scanners that do not require a build in the project, are still able to run and be enforced.

Related issues

Support ticket - internal only

Edited by 🤖 GitLab Bot 🤖