Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

test: build the pregate allowlist secret probes at runtime so gitleaks stops flagging them; ignore eb4ffd05's two history-only github-pat fingerprints

garrytan2458a990c36c
diff --git a/.gitleaksignore b/.gitleaksignore
index 3247dee3a7..2a4aab7410 100644
--- a/.gitleaksignore
+++ b/.gitleaksignore
@@ -52,3 +52,7 @@ fb1cee45c18357eb43d537715b2a8dc43fafc70f:test/google-api-access-cmd-7073.serial.
# #7483 (GBRA-190): the dummy header marker in test/connectors-header-redaction-7483.test.ts (commit e670a328) read as
# generic-api-key; the tree now names it MARKER. This history-only fingerprint is not a secret.
e670a32809a7038c9a63d9dfbf4480f8ab545db2:test/connectors-header-redaction-7483.test.ts:generic-api-key:25
+# #8107 pregate cache-key allowlist (GBRA-218): synthetic ghp_-shaped probes in test/pregate-allowlist-cache-keys.test.ts (commit eb4ffd05)
+# read as github-pat; the tree now builds them at runtime. These history-only fingerprints are not secrets.
+eb4ffd053fa032905b93b4e8e7a66e8ae89a721c:test/pregate-allowlist-cache-keys.test.ts:github-pat:41
+eb4ffd053fa032905b93b4e8e7a66e8ae89a721c:test/pregate-allowlist-cache-keys.test.ts:github-pat:42
diff --git a/test/pregate-allowlist-cache-keys.test.ts b/test/pregate-allowlist-cache-keys.test.ts
index b5761e978c..405f944dd4 100644
--- a/test/pregate-allowlist-cache-keys.test.ts
+++ b/test/pregate-allowlist-cache-keys.test.ts
@@ -34,12 +34,14 @@ describe('pregate allowlist: workflow cache keys', () => {
});
test('a secret-shaped value on a key: line is still flagged', () => {
+ const hex = ['9f8a7b6c5d4e', '3f2a1b0c9d8e', '7f6a5b4c3d2e1f0a'].join('');
+ const pat = ['gh', 'p_', 'Zx9Qw8Lk2Mn4', 'Bv6Cx1Za3Sd5', 'Fg7Hj9Kl0Pq2Wr4'].join('');
for (const value of [
- 'pglite-snapshot-9f8a7b6c5d4e3f2a1b0c9d8e7f6a5b4c3d2e1f0a',
+ `pglite-snapshot-${hex}`,
'pglite-snapshot-${{ runner.os }}-Zx9Qw8Lk2Mn4Bv6Cx1Za3Sd5Fg7Hj9Kl0Pq2Wr4',
"pglite-snapshot-${{ runner.os }}-${{ hashFiles('src/*.ts') }}-Zx9Qw8Lk2Mn4Bv6Cx1Za3Sd5Fg7",
- "pglite-snapshot-${{ runner.os }}-${{ hashFiles('src/*.ts', 'ghp_Zx9Qw8Lk2Mn4Bv6Cx1Za3Sd5Fg7Hj9Kl0Pq2W\\'') }}",
- 'ghp_Zx9Qw8Lk2Mn4Bv6Cx1Za3Sd5Fg7Hj9Kl0Pq2Wr4',
+ "pglite-snapshot-${{ runner.os }}-${{ hashFiles('src/*.ts', '" + pat.slice(0, -2) + "\\'') }}",
+ pat,
]) expect({ value, covered: covers(value) }).toEqual({ value, covered: false });
});
});