debian-mirror-gitlab/lib/gitlab/ci/templates/Security/Coverage-Fuzzing.gitlab-ci.yml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

55 lines
2.3 KiB
YAML
Raw Normal View History

2021-09-30 23:02:18 +05:30
# To contribute improvements to CI/CD templates, please follow the Development guide at:
# https://docs.gitlab.com/ee/development/cicd/templates.html
# This specific template is located at:
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Security/Coverage-Fuzzing.gitlab-ci.yml
2020-07-28 23:09:34 +05:30
2021-09-30 23:02:18 +05:30
# Read more about this feature https://docs.gitlab.com/ee/user/application_security/coverage_fuzzing
#
# Configure coverage fuzzing with CI/CD variables (https://docs.gitlab.com/ee/ci/variables/index.html).
2021-09-04 01:27:46 +05:30
# List of available variables: https://docs.gitlab.com/ee/user/application_security/coverage_fuzzing/#available-cicd-variables
2020-07-28 23:09:34 +05:30
variables:
# Which branch we want to run full fledged long running fuzzing jobs.
# All others will run fuzzing regression
2020-10-24 23:57:45 +05:30
COVFUZZ_BRANCH: "$CI_DEFAULT_BRANCH"
2022-07-23 23:45:48 +05:30
# This is using semantic version and will always download latest v3 gitlab-cov-fuzz release
COVFUZZ_VERSION: v3
2020-07-28 23:09:34 +05:30
# This is for users who have an offline environment and will have to replicate gitlab-cov-fuzz release binaries
# to their own servers
2020-10-24 23:57:45 +05:30
COVFUZZ_URL_PREFIX: "https://gitlab.com/gitlab-org/security-products/analyzers/gitlab-cov-fuzz/-/raw"
2020-07-28 23:09:34 +05:30
2021-01-29 00:20:46 +05:30
coverage_fuzzing_unlicensed:
2021-02-22 17:27:13 +05:30
stage: .pre
2021-01-29 00:20:46 +05:30
allow_failure: true
rules:
- if: $GITLAB_FEATURES !~ /\bcoverage_fuzzing\b/ && $COVFUZZ_DISABLED == null
script:
- echo "ERROR Your GitLab project is missing licensing for Coverage Fuzzing" && exit 1
2020-07-28 23:09:34 +05:30
.fuzz_base:
stage: fuzz
allow_failure: true
before_script:
2022-11-25 23:54:43 +05:30
- export COVFUZZ_JOB_TOKEN="$CI_JOB_TOKEN"
- export COVFUZZ_PRIVATE_TOKEN="$CI_PRIVATE_TOKEN"
- export COVFUZZ_PROJECT_PATH="$CI_PROJECT_PATH"
- export COVFUZZ_PROJECT_ID="$CI_PROJECT_ID"
2020-07-28 23:09:34 +05:30
- if [ -x "$(command -v apt-get)" ] ; then apt-get update && apt-get install -y wget; fi
2020-10-24 23:57:45 +05:30
- wget -O gitlab-cov-fuzz "${COVFUZZ_URL_PREFIX}"/"${COVFUZZ_VERSION}"/binaries/gitlab-cov-fuzz_Linux_x86_64
2020-07-28 23:09:34 +05:30
- chmod a+x gitlab-cov-fuzz
- export REGRESSION=true
2022-11-25 23:54:43 +05:30
- if [[ "$CI_COMMIT_BRANCH" = "$COVFUZZ_BRANCH" ]]; then REGRESSION=false; fi;
2020-07-28 23:09:34 +05:30
artifacts:
paths:
- corpus
- crashes
- gl-coverage-fuzzing-report.json
reports:
coverage_fuzzing: gl-coverage-fuzzing-report.json
when: always
rules:
2020-10-24 23:57:45 +05:30
- if: $COVFUZZ_DISABLED
2020-07-28 23:09:34 +05:30
when: never
2020-11-24 15:15:51 +05:30
- if: $CI_COMMIT_BRANCH && $GITLAB_FEATURES =~ /\bcoverage_fuzzing\b/