Skip to content

org_leak_sweep: org-wide history leak sweep script - #2288

Merged
remigiusz-antczak merged 1 commit into
mainfrom
land/leak-sweep-v2
Nov 11, 2026
Merged

remigiusz-antczak merged 1 commit into
mainfrom
land/leak-sweep-v2

Conversation

@remigiusz-antczak

Copy link
Copy Markdown
Collaborator

Closes #2279. Part of #2278.

Adds org_leak_sweep.py under the deep-code-review skill. It lists an org's public repos, mirror-clones each one, runs gitleaks over the full history, and greps added lines against a banlist that is passed by path and never committed. The output is a redacted TSV (repo, file, commit, rule) written to a private directory; no secret value or matched term ever appears in it.

The token is passed on stdin, never in argv. Git-quoted paths are handled, and the sweep fails closed on git errors.

Supersedes #2286 (same change, plus two CI fixes so no force-push was needed): the test no longer crashes on runners without gitleaks (it now checks that the sweep fails closed with exit 3 and writes no TSV), and the commit carries the size-budget-raise line for the tool-hub.md growth.

Tests: 11/11 with gitleaks installed; 1/1 fail-closed check without it. The affected local CI suite passed. An independent review found 1 🔴 and 8 🟡, all fixed, and a re-review was clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01B4dfwe8bGsWUqekBt1dkaf

Adds scripts/org_leak_sweep.py under the deep-code-review skill. It lists an
org's public repos with curl and a gh-derived token (passed on stdin, never in
argv), mirror-clones each, runs gitleaks (redacted) over full history, and
greps added lines against a banlist passed by path (default gitignored
.banlist.local.txt, never committed). Output is a TSV of repo, file, commit and
rule in a private out dir, never a secret or matched term; file names that match
a banned term or a token shape are redacted. Git-quoted paths are unquoted and
file headers are honoured only between a diff header and its first hunk, so a
content line starting with "++ " is scanned. Routed from references/tool-hub.md;
hermetic test uses a local fixture repo with a fake token and fake term.

Tests: 11/11

size-budget-raise: .claude/skills/deep-code-review/references/tool-hub.md 15770→16646 org leak sweep route row and usage

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B4dfwe8bGsWUqekBt1dkaf
@remigiusz-antczak
remigiusz-antczak merged commit b0fdae4 into main Nov 11, 2026
11 checks passed
@remigiusz-antczak
remigiusz-antczak deleted the land/leak-sweep-v2 branch November 11, 2026 09:32
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.

Public-repo leak sweep: full history, all refs, private banlist

1 participant