Repository navigation
chore(ci): gitleaks secret scan in CI and a local pre-commit hook (TOM-1257) - #108
Conversation
…M-1257) The repo is public, so nothing checked that a commit carries no secret or private infra detail. Adds: - .gitleaks.toml: default rules plus tailnet/CGNAT IPv4 (100.64.0.0/10) and the /home/prod/ path. The path rule captures "home/prod/" without its leading slash, because the default global allowlist drops any secret shaped like ^/home/... and the rule would otherwise never fire. - .gitleaksignore: the four findings already in public history, one exact fingerprint each (a revoked Firecrawl key, a tailnet IP on two lines, a prod path in prose). No path- or rule-wide allow. - ci.yml secret-scan job: gitleaks v8.30.1, sha256 pinned from the official checksums file; PR commits on pull_request, full history on push to main. - .pre-commit-config.yaml: staged-changes scan; a missing binary fails with an install hint instead of passing. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015Q48fmG4d2ZB2DJP3B4o2x
…(TOM-1257) Review round 1: the tailnet rule consumed the character after an address, and since matches never overlap, a second address separated by one character was missed. Use \b boundaries instead. The secret-scan job now runs with contents: read and no persisted credentials, and makes a single gitleaks call. Setup hint lives in the README only. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015Q48fmG4d2ZB2DJP3B4o2x
PR Summary
|
There was a problem hiding this comment.
[session: tom-1257-public-safety · 7d8bfa61 · https://claude.ai/code/session_015Q48fmG4d2ZB2DJP3B4o2x] codex (headless):
Reviewed commit 2ef732ebb18b3e6be967d41a66c6f281bbbd4c7c. No verified blocking defects across the six review lenses.
Gitleaks 8.30.1 passed the full-history scan. Synthetic probes confirmed adjacent addresses and production paths are detected, PR ranges catch leaks, and a missing binary fails the hook. Pre-commit configuration validation passed.
Network restrictions prevented independent verification of the release checksum.
VERDICT: SHIP
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016XFtDJbpgD12enJgui1yar
Related to TOM-1257 (qute-code-kit half; qute-plugins gets its own PR).
What
This repo is public and nothing checked that a commit carries no secret or private infra detail.
.gitleaks.toml: gitleaks default rules, plustailnet-ip(100.64.0.0/10 only, i.e. 100.64–100.127) andprod-home-path(/home/prod/). No client/project names — a committed denylist would publish them.prod-home-pathcaptureshome/prod/without its leading slash on purpose: the default config's global allowlist drops any secret matching^/(?:bin|etc|home|opt|tmp|usr|var)/…, so the naive rule never fires (verified)..gitleaksignore: the four findings already in public history, one exactcommit:file:rule:linefingerprint each — a Firecrawl key (commit 326a712), one tailnet IP on two lines (3de3320), one/home/prod/prose line (6e07357). No path- or rule-wide allow. History is not rewritten.ci.ymljobsecret-scan: gitleaks v8.30.1 linux x64, sha256551f6fc8…70ebpinned from the officialgitleaks_8.30.1_checksums.txt,set -euo pipefail,curl -f.pull_requestscans onlybase.sha..head.sha; push tomainscans full history.contents: read, no persisted credentials..pre-commit-config.yaml: onerepo: localhook,gitleaks git --pre-commit --staged --redact; a missing binary FAILS with an install hint. README carries the one-line setup.Before merge (human)
Revoke the Firecrawl key at Firecrawl.Not needed: it is a free-tier key, accepted rather than revoked by decision (Tom, 2026-09-29, TOM-1257). The.gitleaksignorecomment says so.Proof (forge, gitleaks 8.30.1, all
--redact)no leaks found, exit 0..gitleaksignoremoved away:leaks found: 4, exit 1 — exactly the four ignored fingerprints, nothing else.AKIA…key (random 16 chars),100.96.1.2and100.200.1.1. Hook on the staged file: Failed, exit 1. CI-style range scan of that commit:aws-access-tokenline 1,tailnet-ipline 2, nothing for line 3 (100.200.1.1);100.63.x/100.128.xalso not flagged.no leaks found.gitleaks not found: install it (…) or this commit cannot be checked for secrets.reporting-contracttests run locally: 28 passed.🤖 Generated with Claude Code
https://claude.ai/code/session_015Q48fmG4d2ZB2DJP3B4o2x
Review provenance
The in-session review axes, and the commit each one actually read. A verdict against a branch NAME has no referent — the name moves. Check freshness with
qute_review_freshness.py <owner/repo> <pr#>; it exits 1 when an axis is stale and 2 when it cannot tell.SHIP, reviewed at2ef732ebb18b3e6be967d41a66c6f281bbbd4c7c, rangemain...HEAD, at2026-09-28T18:34:35+02:00