ci: added gitleaks and grype

This commit is contained in:
Atanas Janeshliev
2024-04-29 13:39:00 +02:00
parent 1d972835ff
commit 8a859082cd

View File

@ -25,10 +25,14 @@ variables:
GOMAXPROCS: $(( ${CI_TAG_CPU} / 2 )) GOMAXPROCS: $(( ${CI_TAG_CPU} / 2 ))
before_script: before_script:
- apt update && apt-get -y install libsecret-1-dev - |
- git config --global url.https://gitlab-ci-token:${CI_JOB_TOKEN}@${CI_SERVER_HOST}.insteadOf https://${CI_SERVER_HOST} if [ "$CI_JOB_NAME" != "grype-scan-code-dependencies" ]; then
apt update && apt-get -y install libsecret-1-dev
git config --global url.https://gitlab-ci-token:${CI_JOB_TOKEN}@${CI_SERVER_HOST}.insteadOf https://${CI_SERVER_HOST}
fi
stages: stages:
- analyse
- test - test
- build - build
@ -38,4 +42,10 @@ include:
- local: ci/env.yml - local: ci/env.yml
- local: ci/test.yml - local: ci/test.yml
- local: ci/build.yml - local: ci/build.yml
- component: gitlab.protontech.ch/proton/devops/cicd-components/devsecops/gitleaks/scan-repository@~latest
inputs:
stage: analyse
- component: gitlab.protontech.ch/proton/devops/cicd-components/devsecops/grype/scan-code@0.0.12
inputs:
stage: analyse