From 66feafd4d88a45e6c1f0befd442874c0f5189444 Mon Sep 17 00:00:00 2001 From: bntvllnt <32437578+bntvllnt@users.noreply.github.com> Date: Sat, 31 Oct 2026 01:48:51 +0100 Subject: [PATCH] fix(privacy): validate denylist patterns with the scanning git grep engine --- CHANGELOG.md | 2 ++ scripts/privacy-denylist.sh | 54 ++++++++++++++++++++++---------- scripts/test-privacy-denylist.sh | 15 +++++++++ 3 files changed, 55 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ccaa79..beec65c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +- Fix the `Privacy Guard` denylist check: validate patterns with the same `git grep -iE` engine that scans them, reject PCRE-only escapes, normalize CRLF and blank private lines, and report an invalid pattern by source and line only. Mirrors vllnt/skills. + - Accept the reviewed Skills update from `352eaf7b167a6761161415711ef9d55db26d91d6` to `7483dd4dfd8502fd2db376c13e44fa0cbc464161` as `0.1.0-canary.8` through a separate protected PR, because the range changes sensitive paths. Adds the `@vllnt/convex-api-keys`, `@vllnt/logger` and `@vllnt/analytics` defaults, marks `@vllnt/ui-core` and `@vllnt/ui-native` experimental opt-in, and moves `@vllnt/dig` to not yet default. The automatic sensitivity policy is unchanged. - Accept the reviewed Skills update from `472c216f2f043f0add1f83540cc46ea53d20a7cd` to `352eaf7b167a6761161415711ef9d55db26d91d6` as `0.1.0-canary.7` through a separate protected PR, because the range changes sensitive paths. Includes the published `@vllnt/*` package defaults annex and new direct improvement, session-refocusing, and full-environment PR testing workflows. The automatic sensitivity policy is unchanged. diff --git a/scripts/privacy-denylist.sh b/scripts/privacy-denylist.sh index d9d2e5d..fc5f658 100755 --- a/scripts/privacy-denylist.sh +++ b/scripts/privacy-denylist.sh @@ -29,35 +29,56 @@ SELF=scripts/privacy-denylist.sh tracked="$(mktemp)" extra="$(mktemp)" +local_raw="$(mktemp)" +extra_raw="$(mktemp)" patterns="$(mktemp)" allow_patterns="$(mktemp)" hits="$(mktemp)" kept="$(mktemp)" -trap 'rm -f "$tracked" "$extra" "$patterns" "$allow_patterns" "$hits" "$kept"' EXIT +probe="$(mktemp -d)" +trap 'rm -f "$tracked" "$extra" "$local_raw" "$extra_raw" "$patterns" "$allow_patterns" "$hits" "$kept"; rm -rf "$probe"' EXIT +printf '\n' > "$probe/empty" +printf 'a b\n' > "$probe/text" -strip() { sed -E '/^[[:space:]]*(#|$)/d'; } +strip() { tr -d '\r' | sed -E '/^[[:space:]]*(#|$)/d'; } # lines : the file with a guaranteed final newline. lines() { cat "$1"; printf '\n'; } -# valid_regexes