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

This commit is contained in:
Alexander Minges 2025-07-08 15:33:06 +02:00
parent 63cd4cb9d0
commit d2d62818ed

View file

@ -1,17 +1,19 @@
# GitLab CI/CD pipeline for doi2dataset
# Compatible with GitLab v18.1.1
# 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/user/application_security/secret_detection/pipeline/configure
# 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
stages:
- test
- test
- secret-detection
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
cache:
paths:
- .cache/pip/
- .venv/
- ".cache/pip/"
- ".venv/"
test:
stage: test
image: python:3
@ -30,7 +32,11 @@ test:
paths:
- htmlcov/
expire_in: 1 week
coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
coverage: "/(?i)total.*? (100(?:\\.0+)?\\%|[1-9]?\\d(?:\\.\\d+)?\\%)$/"
only:
- branches
- merge_requests
secret_detection:
stage: secret-detection
include:
- template: Security/Secret-Detection.gitlab-ci.yml