veza/.github/workflows/security-scan.yml
senke 0c38966aed ci(security): allowlist test fixtures and historic backup dirs in gitleaks
The gitleaks job reported 389 leaks, but every match fell into one of:
  - eyJ...invalid_signature fake JWTs in *_test.go (used to exercise
    auth failure paths — never a real credential)
  - veza-backend-api/internal/services/.backup-pre-uuid-migration/
    which existed in commits 2425c15b0 / 2425c15b0 but is gone from HEAD;
    gitleaks scans full git history so removing the dir would not help
  - test-jwt-secret / test-internal-api-key constants in setupTestRouter

Add a .gitleaks.toml that extends the v8 default ruleset and allowlists
those paths and stopwords. Update the workflow to pass --config so the
file is honored.
2026-04-14 11:45:43 +02:00

28 lines
784 B
YAML

name: Security Scan
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
GIT_SSL_NO_VERIFY: "true"
jobs:
gitleaks:
name: Secret Scanning (gitleaks)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Install gitleaks
run: |
wget -q https://github.com/gitleaks/gitleaks/releases/download/v8.21.2/gitleaks_8.21.2_linux_x64.tar.gz
tar xzf gitleaks_8.21.2_linux_x64.tar.gz
chmod +x gitleaks
- name: Run gitleaks
run: ./gitleaks detect --source . --no-banner -v --config .gitleaks.toml