diff --git a/.github/workflows/secret-scan.yml b/.github/workflows/secret-scan.yml new file mode 100644 index 00000000..e07f47b0 --- /dev/null +++ b/.github/workflows/secret-scan.yml @@ -0,0 +1,22 @@ +name: Secret scan + +# Scans for committed secrets on pushes to main and on pull requests. + +on: + push: + branches: [main] + pull_request: + +permissions: + contents: read + +jobs: + gitleaks: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: gitleaks/gitleaks-action@v2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitleaks.toml b/.gitleaks.toml new file mode 100644 index 00000000..e87ce09b --- /dev/null +++ b/.gitleaks.toml @@ -0,0 +1,9 @@ +# Secret-scanning config for the workflow in .github/workflows/secret-scan.yml. +[extend] +useDefault = true + +[[rules]] +id = "generic-api-key" + [rules.allowlist] + description = "SIGN_KEY in even-api.ts is a client-side constant the app needs to sign EvenHub requests, not a credential." + paths = ['''app/apps/evenhub/even-api\.ts''']