Skip to content

Commit 72a0ffd

Browse files
committed
ci: boundary gate — denylist held in a repo secret
Fail the build if a private breadcrumb leaks into public source. The denylist lives in the BLEED_DENYLIST repo secret, not in this file — a public workflow enumerating the forbidden terms would publish the very list it guards (the naive version tripped the local bleed-guard for exactly this). No-op until the secret is set.
1 parent 7c3ea7d commit 72a0ffd

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

.github/workflows/boundary.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: boundary
2+
3+
# Open-core boundary as a chokepoint, not a convention: fail the build if a
4+
# private breadcrumb leaks into public source. The denylist itself is held in a
5+
# repo secret (BLEED_DENYLIST), NOT in this file — a public workflow that spelled
6+
# out the forbidden terms would publish the very list it guards. Set it with:
7+
# gh secret set BLEED_DENYLIST --repo huximaxi/loci (value: an ERE alternation)
8+
# Public product vocabulary (e.g. "palace", the plain-text methodology name) is
9+
# intentionally NOT in the list; only private repo paths, crate idents, infra
10+
# hosts, and local paths are.
11+
12+
on:
13+
push:
14+
pull_request:
15+
16+
jobs:
17+
no-private-terms:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
- name: forbid private breadcrumbs in public source
22+
env:
23+
DENYLIST: ${{ secrets.BLEED_DENYLIST }}
24+
run: |
25+
if [ -z "${DENYLIST:-}" ]; then
26+
echo "::warning::BLEED_DENYLIST secret unset — boundary gate is a no-op until it is set"
27+
exit 0
28+
fi
29+
if grep -rniE "$DENYLIST" \
30+
--include='*.rs' --include='*.toml' --include='*.md' \
31+
--include='*.ts' --include='*.js' --include='*.html' \
32+
--exclude-dir=.github --exclude-dir=target --exclude-dir=node_modules . ; then
33+
echo "::error::a private breadcrumb leaked into public source (matches above)"
34+
exit 1
35+
fi
36+
echo "boundary clean"

0 commit comments

Comments
 (0)