You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implementation sub-issue S6 of #1908, from the accepted ADR-site-agnostic-projects (section Implementation; amended by #1923: every lane defaults to SMALL). The ADR is the design; this text is copied from it verbatim.
Merge order for release N: S1 → S1d → S1b → S2 → S3. S4, S5 and S6 are independent. S7/S7b follow S1–S6, S8 gates release N, and S9 is release N+2. See the ADR's file-overlap table.
Scope: §10 leak check.
Files:packages/vig-utils/src/vig_utils/site_leak_check.py, packages/vig-utils/pyproject.toml (the site-leak-check console-script
line), nix/hooks.nix (a separate entry from S5), and tests.
S4 coordination for #1930 / PR #1938: .site/leak-patterns.toml keeps its ADR §10 name and location. S4 will validate TOML parsing and the optional [[rules]] array shape (each rule has string id and regex) only. It will not apply site-binding credential-key or URI-userinfo restrictions to gitleaks configs; secretGroup, userinfo-matching regexes, and allowlists remain supported. Gitleaks retains semantic validation. The module docstring will record this boundary.
Implemented point-of-use validation: a present leak-patterns.toml must contain at least one [[rules]] entry with nonempty string id and regex, otherwise site-leak-check exits 2 and names the file without printing patterns; a missing file remains a silent no-op.
S6 now calls vig_utils.site_config.validate_patterns(Path) from merged S4 (#1938); the local pattern_error() implementation is deleted. The single pattern-file rule is S4's pattern-file clarification (shared with S6) in the ADR Amendments.
S6 preserves the shared validator's safe filename/key message and returns exit 2 for validation errors. A missing selected pattern file remains a silent no-check; an explicit missing path does not fall back to local patterns. Site-binding credential restrictions are not applied to pattern values.
Activity
gerchowl commentedon Oct 27, 2026
S4 coordination for #1930 / PR #1938:
.site/leak-patterns.tomlkeeps its ADR §10 name and location. S4 will validate TOML parsing and the optional[[rules]]array shape (each rule has stringidandregex) only. It will not apply site-binding credential-key or URI-userinfo restrictions to gitleaks configs;secretGroup, userinfo-matching regexes, and allowlists remain supported. Gitleaks retains semantic validation. The module docstring will record this boundary.test: preserve anchored site allowlists in tree scans
fix: retain relative paths for site allowlists
gerchowl commentedon Oct 27, 2026
Implemented point-of-use validation: a present leak-patterns.toml must contain at least one [[rules]] entry with nonempty string id and regex, otherwise site-leak-check exits 2 and names the file without printing patterns; a missing file remains a silent no-op.
test: prevent repository scanner settings bypassing site rules
fix: isolate site scans from repository ignore settings
test: scan force-added site bindings through installed hooks
fix: scan tracked site files while excluding active patterns
test: reject present pattern files without usable rules
fix: reject site pattern files without usable rules
test: verify scanner redaction and worktree boundaries
docs: explain site scan boundaries and configuration safeguards
gerchowl commentedon Oct 27, 2026
S6 now calls
vig_utils.site_config.validate_patterns(Path)from merged S4 (#1938); the localpattern_error()implementation is deleted. The single pattern-file rule is S4's pattern-file clarification (shared with S6) in the ADR Amendments.S6 preserves the shared validator's safe filename/key message and returns exit 2 for validation errors. A missing selected pattern file remains a silent no-check; an explicit missing path does not fall back to local patterns. Site-binding credential restrictions are not applied to pattern values.
100 remaining items
test: reject even empty extension tables in site patterns
fix: scan raw staged snapshots with self-contained site rules
test: reject case variants of gitleaks extension tables
fix: reject all gitleaks extension key case variants
docs: describe raw staged snapshots and self-contained pattern rules
test: cover site scanner invocation and snapshot hardening
fix: harden site scanner invocation and snapshot cleanup
test: cover shared pattern validation and symlink content
test: require symlink selection beyond default file filtering
fix: share pattern validation and scan symlink link text
test: cover type changes and protected snapshot cleanup
fix: scan type changes and protect all snapshot cleanup
test: verify termination mask during snapshot deletion
feat: add site-private leak-check hook (#1950)
chore: release 1.19.0 (#2033)