mirror of
https://github.com/elementalsouls/Claude-BugHunter.git
synced 2026-11-24 20:30:23 +01:00
The existing hashed-denylist scan lives in lint_skills.py and only covers skills/**. The identifier leak that motivated this guard landed in README.md and tests/ — files that linter never sees, and skill-lint.yml only triggers on skills/** paths anyway. It also fails OPEN: a missing denylist prints a NOTE and exits 0. This closes both holes: - scripts/scan_identifiers.py — standalone scanner reusing the same denylist file and 1-/2-word shingle-hash logic, but over EVERY tracked text file (git ls-files, minus binaries). Fails CLOSED: missing/empty denylist = exit 2. - .github/workflows/leak-guard.yml — runs it (and its self-test) on every push and PR with NO path filter. contents: read. - .githooks/pre-commit — same scan locally before push (opt-in via `git config core.hooksPath .githooks`). - scripts/test_scan_identifiers.py — stdlib self-check: catch, clean, case-insensitive, and fail-closed behaviors. - scripts/.identifier-denylist.sha256 — added the single-word hash to complement the existing two-word entry (both now covered). - CONTRIBUTING.md — documents the guard, the hook, and how to ban a new identifier without committing the plaintext. Verified: whole-repo scan 0 matches / exit 0; self-test passes; missing denylist exits 2; a planted identifier is blocked by both the scanner and the hook; lint_skills.py still 0 errors. (The guard even caught a client name I'd left in this scanner's own docstring — removed.) Scope note: identifier-only by design. Repo-wide secret scanning is deferred — it would false-positive on the synthetic AKIA test keys in docs/verification/, which need allowlist work first. Secrets stay covered by lint_skills.py (skills) and secret_scan.py. Co-authored-by: Sachin Sharma <elementalsoul@Sachins-MacBook-Pro.local> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>