Add reusable betterleaks secrets scan workflow (default rules) - #4
Merged
Merged
Conversation
Reusable workflow_call variant of Secu.Actions' betterleaks PR check, running betterleaks with its built-in default rules (no custom betterleaks.toml) over the patches of the commits introduced by the PR (base..HEAD range), so a secret added then removed within the PR is still caught. Emits inline annotations, fails while any secret is present, and maintains a single auto-updated PR comment with rebase and rotation guidance. No internal Lucca integrations: intended for public repositories with external contributors. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
mpgn
approved these changes
Sep 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
betterleaks-scan-public.yaml, a reusable (workflow_call) secrets scan for pull requests, modeled on Secu.Actions'betterleaks-required-check.ymlbut adapted for public repositories with external contributors:betterleaks.toml, no GitHub App token, no internal Lucca integrations (no Slack notifications, no internal runners/containers).base..HEADrange), so a secret added then removed within the PR is still caught. Falls back to a full-history scan when the calling event has no base SHA.v1.8.1, overridable via thebetterleaks-versioninput), verified withgh release verify, sha256 checksums, andgh release verify-asset.actions/cacheusage, avoiding a cache-poisoning surface on fork PRs.env,persist-credentials: false; the file is clean under zizmor's full auditor persona.Usage
Test plan
betterleaks git --log-opts base..HEADon a test repo: a fake GitHub PAT committed then deleted in a later commit is caught, with repo-relativeFileand populatedCommitfields as the annotation/comment logic expectsbetterleaks/betterleaksv1.8.1 release assets match the install step's naming (betterleaks_1.8.1_linux_x64.tar.gz,checksums.txt)🤖 Generated with Claude Code