Skip to content

ci: add gitleaks secret scan job#4

Merged
poppyseedDev merged 1 commit into
mainfrom
ci-gitleaks
May 5, 2026
Merged

ci: add gitleaks secret scan job#4
poppyseedDev merged 1 commit into
mainfrom
ci-gitleaks

Conversation

@poppyseedDev

@poppyseedDev poppyseedDev commented May 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a gitleaks job to the CI workflow:

  • Uses the OSS gitleaks binary directly (v8.18.4). gitleaks-action@v2 requires a paid license for GitHub org repos, so we install the binary instead.
  • Scans only the commit range introduced by the event (PR base..head, or push before..after). Scanning full history would re-report pre-existing findings that aren't the PR's problem. fetch-depth: 0 keeps both ends of the range available locally.
  • First-push-to-a-branch case (before == zero SHA) falls back to scanning the tip commit only.
  • Adds a minimal .gitleaks.toml that extends the built-in default ruleset; project-specific allowlists can be layered on later if false positives surface.

Test plan

  • CI green on this PR (gitleaks job runs against itself with no findings)
  • Verify the scan range echo line in logs reflects PR base..head

Run the OSS gitleaks binary on commits introduced by each PR / push.
Avoids gitleaks-action@v2 which requires a paid license for GitHub org
repos.

Scans only the commit range new to the event (PR base..head or push
before..after) so pre-existing findings outside the change aren't
re-reported. First-push case falls back to the tip commit alone since
there is no prior ref.

`.gitleaks.toml` extends the built-in default ruleset; project-specific
allowlists can be added later if false positives surface.
@poppyseedDev poppyseedDev merged commit 7b5aa01 into main May 5, 2026
5 checks passed
@poppyseedDev poppyseedDev deleted the ci-gitleaks branch May 5, 2026 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant