diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 49969b5..595bd16 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,9 +19,16 @@ jobs: fetch-depth: 0 - name: Scan for secrets + env: + # Bump together; checksum from + # https://github.com/gitleaks/gitleaks/releases/download/v${GITLEAKS_VERSION}/gitleaks_${GITLEAKS_VERSION}_checksums.txt + GITLEAKS_VERSION: 8.30.1 + GITLEAKS_SHA256: 551f6fc83ea457d62a0d98237cbad105af8d557003051f41f3e7ca7b3f2470eb run: | - curl -sSfL "$(curl -s https://api.github.com/repos/gitleaks/gitleaks/releases/latest \ - | grep -o 'https://[^"]*linux_x64.tar.gz')" | tar xz -C /tmp + set -euo pipefail + curl -sSfL "https://github.com/gitleaks/gitleaks/releases/download/v${GITLEAKS_VERSION}/gitleaks_${GITLEAKS_VERSION}_linux_x64.tar.gz" -o /tmp/gitleaks.tgz + echo "${GITLEAKS_SHA256} /tmp/gitleaks.tgz" | sha256sum -c - + tar xz -C /tmp -f /tmp/gitleaks.tgz /tmp/gitleaks detect --source . --verbose --redact - name: Check for large files