Configure Secret Detection in .gitlab-ci.yml, creating this file if it does not already exist

This commit is contained in:
Sven Kubiak 2022-06-28 10:14:04 +00:00
parent 42427e1905
commit b770feabdb

View File

@ -1,32 +1,37 @@
# You can override the included template(s) by including variable overrides
# 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
image: maven:3.8.4-openjdk-17 image: maven:3.8.4-openjdk-17
stages: stages:
- test - test
- sonar - sonar
- owasp - owasp
variables: variables:
MAVEN_OPTS: "-Dhttps.protocols=TLSv1.2 -Dmaven.repo.local=.m2/repository -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true" MAVEN_OPTS: "-Dhttps.protocols=TLSv1.2 -Dmaven.repo.local=.m2/repository -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN
MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version -DinstallAtEnd=true -DdeployAtEnd=true" -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true"
MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version -DinstallAtEnd=true
-DdeployAtEnd=true"
cache: cache:
paths: paths:
- .m2/repository - ".m2/repository"
owasp: owasp:
stage: owasp stage: owasp
script: script:
- mvn $MAVEN_CLI_OPTS -Denforcer.skip clean dependency-check:check - mvn $MAVEN_CLI_OPTS -Denforcer.skip clean dependency-check:check
only: only:
- schedules - schedules
test: test:
stage: test stage: test
script: mvn $MAVEN_CLI_OPTS clean verify script: mvn $MAVEN_CLI_OPTS clean verify
sonar: sonar:
stage: sonar stage: sonar
script: script:
- mvn $MAVEN_CLI_OPTS clean verify sonar:sonar --settings settings.xml - mvn $MAVEN_CLI_OPTS clean verify sonar:sonar --settings settings.xml
only: only:
- master - master
include:
- template: Security/Secret-Detection.gitlab-ci.yml