Skip to content

ci: add gitleaks secret scan (PF-1540) - #3

Draft
w0ofy wants to merge 1 commit into
mainfrom
michaelwolf/pf-1540-add-gitleaks-action-to-every-actively
Draft

w0ofy wants to merge 1 commit into
mainfrom
michaelwolf/pf-1540-add-gitleaks-action-to-every-actively

Conversation

@w0ofy

@w0ofy w0ofy commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Draft: the scan cannot run here yet. The gitleaks check fails with "missing gitleaks license": the GITLEAKS_LICENSE organisation secret is not available to this public repository. Either the secret's repository access is widened to include public repositories (then re-run the check), or this workflow switches to the licence-free gitleaks CLI.

What

Adds .github/workflows/gitleaks.yml, which runs gitleaks on every pull request and on every push to main. A PR that adds a key, token or password fails the check and gets a comment on the offending line.

Why

PF-1540: every actively maintained repository gets a gitleaks scan on every pull request. This repository did not have one.

Notes for the reviewer

  • Workflow file only; no other changes.
  • This repository is public, so it cannot call the shared workflow in the private Blockworks-Projects/workflows repository. The workflow here is a standalone copy of that scan job, pinned to the same action versions.
  • It reads the GITLEAKS_LICENSE organisation secret. Pull requests from forks do not receive secrets, so the scan will not have the licence on a fork PR.
  • PR and push runs scan the commits in that event, not the whole history.
  • False positives are allowlisted in a gitleaks.toml at the repo root.
  • Not in this PR: making the check required in the repository ruleset (the ticket's second acceptance criterion). That should follow once this is merged.

Part of PF-1540

🤖 Generated with Claude Code

Runs gitleaks on every pull request and on every push to main.

Part of PF-1540

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@w0ofy
w0ofy marked this pull request as draft November 17, 2026 04:15
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