Skip to content

Commit 69040b8

Browse files
author
Paul Kyle
committed
hotfix: remove leaked scrub-check script from public repo
1 parent ed48372 commit 69040b8

2 files changed

Lines changed: 17 additions & 126 deletions

File tree

scripts/check-shipping-leaks.sh

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
#!/bin/bash
22
# check-shipping-leaks.sh — fast pre-merge leak scanner for public-shipping files.
33
#
4-
# Unlike scripts/scrub-check.sh (which scans an entire public-tree clone),
5-
# this scans only the files that would ship publicly, in the dev repo, on
4+
# This scans only the files that would ship publicly, in the dev repo, on
65
# the current branch. Designed for speed: run as a pre-commit hook or in
76
# CI on every PR.
87
#
@@ -20,7 +19,7 @@
2019
set -euo pipefail
2120

2221
# Patterns that must NEVER appear in public-shipping files.
23-
# Synced with scripts/scrub-check.sh and SYNC-PUBLIC.md.
22+
# Synced with SYNC-PUBLIC.md.
2423
PATTERNS=(
2524
# Private IPs and infrastructure
2625
'10\.2\.1\.(61|65|69)'
@@ -113,10 +112,14 @@ DEV_ONLY_PREFIXES=(
113112
'.github/PULL_REQUEST_TEMPLATE.md'
114113
)
115114

115+
# Public repo paths that must never be tracked at all.
116+
FORBIDDEN_PUBLIC_PATHS=(
117+
'scripts/scrub-check.sh'
118+
)
119+
116120
# Files that intentionally contain the blocked patterns as scanner inputs.
117121
# Skip them so the scanner does not flag its own source data.
118122
SCANNER_SOURCES=(
119-
'scripts/scrub-check.sh'
120123
'scripts/check-shipping-leaks.sh'
121124
# Tests may enumerate forbidden patterns as part of the guard itself.
122125
'tests/test_deploy_systemd.py'
@@ -160,6 +163,16 @@ if [ "${#FILES[@]}" -eq 0 ]; then
160163
exit 0
161164
fi
162165

166+
for f in "${FILES[@]}"; do
167+
normalized="${f#./}"
168+
for forbidden in "${FORBIDDEN_PUBLIC_PATHS[@]}"; do
169+
if [ "$normalized" = "$forbidden" ]; then
170+
echo "FORBIDDEN PATH — $forbidden is tracked in the public tree."
171+
exit 1
172+
fi
173+
done
174+
done
175+
163176
# ── Filter to public-shipping files ───────────────────────────────────────────
164177

165178
is_dev_only() {

scripts/scrub-check.sh

Lines changed: 0 additions & 122 deletions
This file was deleted.

0 commit comments

Comments
 (0)