Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitleaks.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ paths = [
'''(^|/)\.git/''', # git metadata (packed-refs, objects) — not source, avoids --no-git FPs
'''(^|/)\.gitleaks\.toml$''',
'''(^|/)scripts/public-repo-guard/''',
'''(^|/)(test|tests|__tests__|fixtures|__fixtures__|examples?|samples?|spec)/''',
'''(^|/)(test|tests|__tests__|fixtures|__fixtures__|testdata|examples?|samples?|spec)/''', # testdata/ = Go-conventional fixtures dir (holds published test vectors, e.g. Hardhat keys)
'''\.(test|spec)\.[jt]sx?$''', # co-located unit tests (foo.test.ts / foo.spec.tsx) — fixtures, not secrets
'''\.(example|sample|template|dist)$''',
'''(^|/)(.+\.)?env\.(example|sample|template)$''',
Expand Down
10 changes: 10 additions & 0 deletions scripts/public-repo-guard/content-policy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,19 @@ check BLOCK stripe-live-key '(sk|rk)_live_[A-Za-z0-9]{16,}'
check WARN stripe-object '(cus|sub|price|prod)_[A-Za-z0-9]{14,}' 'Stripe object ID — verify it is an EXAMPLE, not a real account object'

# --- Infrastructure identifiers ----------------------------------------------
# shellcheck disable=SC2016 # $CLOUDFLARE_ACCOUNT_ID is literal guidance text, not meant to expand
check BLOCK cf-account-id 'account_id\s*[:=]\s*["'"'"']?[0-9a-f]{32}' 'Hardcoded Cloudflare account_id — source it from $CLOUDFLARE_ACCOUNT_ID'

# --- Internal network identifiers --------------------------------------------
# Tailscale CGNAT range (100.64.0.0/10) — internal fleet IPs must never appear in
# a public tree. Narrow on purpose: never trips 127.0.0.1, 0.0.0.0, public IPs, or
# RFC1918 documentation addresses. Pattern is byte-for-byte lockstep with
# foundation's sync-public.sh / verify-public-mirror.sh INTERNAL_IP_PAT, so the
# pre-publish mirror gate and this public-repo gate agree on the same leak class.
check BLOCK internal-ip '100\.(6[4-9]|[7-9][0-9]|1[01][0-9]|12[0-7])\.[0-9]{1,3}\.[0-9]{1,3}' 'Internal Tailscale-CGNAT IP (100.64.0.0/10) — internal fleet address, never publish'

# --- Developer / private-repo leakage ----------------------------------------
# shellcheck disable=SC2016 # $HOME is literal guidance text, not meant to expand
check BLOCK abs-user-path '/(Users|home)/(?!runner/)[a-z][a-z0-9._-]+/' 'Hardcoded developer absolute path — use $HOME or a CLI argument'

# Private WAVE repo/product names that must never appear in a public tree. The
Expand Down
Loading