---
variables:
  GIT_STRATEGY: clone
  GIT_DEPTH: "200"

stages:
  - lint

gitleaks:
  tags:
    - secret-scanning
  stage: lint
  image:
    name: mega-docker.artifactory.developers.mega.co.nz:8443/gitleaks:v8.24.0-mega
    entrypoint: [""]
  script:
  - git fetch origin $CI_MERGE_REQUEST_TARGET_BRANCH_NAME:$CI_MERGE_REQUEST_TARGET_BRANCH_NAME
  - gitleaks git --verbose --redact -c .gitleaks/gitleaks.toml --log-opts="$CI_MERGE_REQUEST_TARGET_BRANCH_NAME..$CI_COMMIT_SHA"
