Repository navigation
feat(rules): dev-leakage matches tier labels at any position and widens the vocabulary (repo#1858) - #1950
Merged
Conversation
nc9
marked this pull request as ready for review
November 16, 2026 07:06
nc9
force-pushed
the
boat/dev-leakage-tiers-1858
branch
4 times, most recently
from
November 17, 2026 07:11
f9d2522 to
791d95a
Compare
nc9
added a commit
that referenced
this pull request
Nov 17, 2026
Signed-off-by: Nik Cubrilovic <[email protected]>
nc9
force-pushed
the
boat/dev-leakage-tiers-1858
branch
from
November 17, 2026 12:21
791d95a to
d4f145c
Compare
nc9
added a commit
that referenced
this pull request
Nov 17, 2026
Signed-off-by: Nik Cubrilovic <[email protected]>
nc9
force-pushed
the
boat/dev-leakage-tiers-1858
branch
2 times, most recently
from
November 17, 2026 15:45
fdd0b4c to
a504f66
Compare
…ns the vocabulary (repo#1858) Signed-off-by: Nik Cubrilovic <[email protected]>
nc9
force-pushed
the
boat/dev-leakage-tiers-1858
branch
from
November 17, 2026 22:54
a504f66 to
e405524
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
content/dev-leakagenow matches a tier label at any position left of the audited registrable domain, and the tier vocabulary is wider. Implements squirrelscan/repo#1858.What changed
devTierOf(host, apex)returns"high","low"or null. A cheap whole-label pre-check runs before the PSL lookup. The registrable domain must equal the apex, and only labels LEFT of the apex are checked, matched whole. A trailing-dot FQDN is normalized first.isDevSubdomainOfis now a boolean wrapper.staging,dev,test,qa,uat,preprod,local,int.own, so only everwarn):demo,sandbox.isNonProductionSeedHostfollows the full vocabulary at any position, so auditingqa.example.comorapp.dev.example.comskips withnon-production-origin.reliability/broken-formsreads the same helper, so its origin classification widens with it. Its tests pass unchanged.my.local.example.comagainstexample.comused to classify as null, and now classifies asdev-subdomain(own) becauselocalis a tier label.docs/rules/content/dev-leakage.mdxand CHANGELOG updated. Not a new rule, so no rule counts change.Acceptance criteria
app.dev.example.comandwww.staging.example.comare found (content-dev-leakage.test.ts, new devTierOf cases).notdev,webdev,development,dev.other.comstay clean, anddev.example.co.ukresolves againstexample.co.uk(existing and new cases).demoandsandboxwarn and never fail (full-rule test: demo and sandbox links warn,app.qa.example.comfails).https://qa.example.com/that is skipped withnon-production-origin).Gates
packages/rules:bun run typecheck(tsgo src + tests) passes.bun teston content-dev-leakage, dev-leakage-local-names-813, item-cap-remainder and rule-check-declarations: 105 pass, 0 fail.bun teston broken-forms: 35 pass, 0 fail.bun teston audit-engine streaming-rules-canonical-golden and scan-truncated-carry: 19 pass, 0 fail.docs/:make validatepasses (62 pass, 0 fail).Agent skill
No change needed in the squirrelscan agent skill. The rule id, check name and kinds are unchanged.
Draft: on the hold list, needs a planning review before merge.