fix(ci): run gitleaks as binary in node image
PR Check / Dockerfile lint (droast) (pull_request) Skipped
PR Check / ESLint (pull_request) Successful in 37s
PR Check / Typecheck (pull_request) Successful in 40s
PR Check / Secret scan (gitleaks) (pull_request) Failing after 4s
PR Check / Dependency audit (pull_request) Successful in 9s
PR Check / Security scan (Snyk) (pull_request) Failing after 1s
PR Check / AI code review (opencode) (pull_request) Successful in 7s

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.
This commit is contained in:
Noel Sabia committed 2026-10-18 15:44:45 +02:00
1 parent ce9c090a15
commit 779cf20f45
1 file changed
+10 -3
+10 -3
View File
@@ -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