From 779cf20f45ec8db009065197140067a531649401 Mon Sep 17 00:00:00 2001 From: Noel Sabia Date: Sun, 18 Oct 2026 15:44:45 +0200 Subject: [PATCH] fix(ci): run gitleaks as binary in node image The gitleaks container image ships no node binary, so node-based actions like actions/checkout fail with exit code 127. Install the gitleaks v8.28.0 binary in the standard node:22-bookworm image instead. --- .gitea/workflows/pr-checker.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/pr-checker.yml b/.gitea/workflows/pr-checker.yml index d6384f5..49312f2 100644 --- a/.gitea/workflows/pr-checker.yml +++ b/.gitea/workflows/pr-checker.yml @@ -65,14 +65,21 @@ jobs: secrets: name: Secret scan (gitleaks) runs-on: ubuntu-latest - container: - # gitleaks is published on GHCR only (not Docker Hub) - pin the version - image: ghcr.io/gitleaks/gitleaks:v8.28.0 + # plain node image: the gitleaks container image has no node, which + # breaks node-based actions like actions/checkout + container: node:22-bookworm steps: - uses: actions/checkout@v4 with: fetch-depth: 0 # gitleaks scans the full history + - name: Install gitleaks + run: | + curl -fsSL -o /tmp/gitleaks.tar.gz \ + https://github.com/gitleaks/gitleaks/releases/download/v8.28.0/gitleaks_8.28.0_linux_x64.tar.gz + tar -xzf /tmp/gitleaks.tar.gz -C /usr/local/bin gitleaks + gitleaks version + - name: Scan for leaked secrets run: gitleaks detect --source . --redact --verbose # Already-committed secrets that you've accepted? Add a .gitleaksignore