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