diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 12:45:46 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 12:45:46 +0300 |
commit | a7b3560714b4d9cc4ab32dffcd1f74a284b93580 (patch) | |
tree | 7452bd5c3545c2fa67a28aa013835fb4fa071baf /lib/security | |
parent | ee9173579ae56a3dbfe5afe9f9410c65bb327ca7 (diff) |
Add latest changes from gitlab-org/gitlab@14-8-stable-eev14.8.0-rc42
Diffstat (limited to 'lib/security')
-rw-r--r-- | lib/security/ci_configuration/base_build_action.rb | 1 | ||||
-rw-r--r-- | lib/security/ci_configuration/container_scanning_build_action.rb | 30 |
2 files changed, 31 insertions, 0 deletions
diff --git a/lib/security/ci_configuration/base_build_action.rb b/lib/security/ci_configuration/base_build_action.rb index 880bfa6d61d..6012067fb53 100644 --- a/lib/security/ci_configuration/base_build_action.rb +++ b/lib/security/ci_configuration/base_build_action.rb @@ -42,6 +42,7 @@ module Security # SAST customization: https://docs.gitlab.com/ee/user/application_security/sast/#customizing-the-sast-settings # Secret Detection customization: https://docs.gitlab.com/ee/user/application_security/secret_detection/#customizing-settings # Dependency Scanning customization: https://docs.gitlab.com/ee/user/application_security/dependency_scanning/#customizing-the-dependency-scanning-settings + # Container Scanning customization: https://docs.gitlab.com/ee/user/application_security/container_scanning/#customizing-the-container-scanning-settings # Note that environment variables can be set in several places # See https://docs.gitlab.com/ee/ci/variables/#cicd-variable-precedence YAML diff --git a/lib/security/ci_configuration/container_scanning_build_action.rb b/lib/security/ci_configuration/container_scanning_build_action.rb new file mode 100644 index 00000000000..82f9f7d0320 --- /dev/null +++ b/lib/security/ci_configuration/container_scanning_build_action.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +module Security + module CiConfiguration + class ContainerScanningBuildAction < BaseBuildAction + private + + def update_existing_content! + @existing_gitlab_ci_content['include'] = generate_includes + end + + def template + return 'Auto-DevOps.gitlab-ci.yml' if @auto_devops_enabled + + 'Security/Container-Scanning.gitlab-ci.yml' + end + + def comment + <<~YAML + #{super} + # container_scanning: + # variables: + # DOCKER_IMAGE: ... + # DOCKER_USER: ... + # DOCKER_PASSWORD: ... + YAML + end + end + end +end |