From be6297aa3ff461102ee8ffd5a1e7e3349a54836d Mon Sep 17 00:00:00 2001 From: hudsonaikins-crown Date: Sat, 5 Dec 2026 21:33:58 -0500 Subject: [PATCH] ci: add gitleaks secret-scan workflow (INT-595) Pin gitleaks 8.30.0 and scan full git history on pull requests and pushes to main. Ignore one Hudson-approved false-positive fingerprint for planning prose in the initial commit of docs/backlog.md; the matching line is no longer on main. --- .github/workflows/secret-scan.yml | 29 +++++++++++++++++++++++++++++ .gitleaksignore | 4 ++++ 2 files changed, 33 insertions(+) create mode 100644 .github/workflows/secret-scan.yml create mode 100644 .gitleaksignore diff --git a/.github/workflows/secret-scan.yml b/.github/workflows/secret-scan.yml new file mode 100644 index 0000000..5a1f50b --- /dev/null +++ b/.github/workflows/secret-scan.yml @@ -0,0 +1,29 @@ +name: Secret scan + +on: + pull_request: + push: + branches: [main] + +permissions: + contents: read + +jobs: + secret-scan: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + fetch-depth: 0 + + - name: Verify and run gitleaks + run: | + archive=gitleaks_8.30.0_linux_x64.tar.gz + cd "$RUNNER_TEMP" + curl --fail --silent --show-error --location --output "$archive" \ + "https://github.com/gitleaks/gitleaks/releases/download/v8.30.0/$archive" + echo "79a3ab579b53f71efd634f3aaf7e04a0fa0cf206b7ed434638d1547a2470a66e $archive" | sha256sum --check + tar -xzf "$archive" gitleaks + cd "$GITHUB_WORKSPACE" + "$RUNNER_TEMP/gitleaks" git --redact=100 --log-opts=--all . diff --git a/.gitleaksignore b/.gitleaksignore new file mode 100644 index 0000000..383f94e --- /dev/null +++ b/.gitleaksignore @@ -0,0 +1,4 @@ +# False positive: planning prose in the initial commit. +# The matching line is no longer on main. +# Approved by Hudson 2026-12-05. +c7aee5ab8e1e426fa5fc8a0f64969022b3b053cf:docs/backlog.md:generic-api-key:38