Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

fix: pre-landing review fixes (pregate allowlist hashFiles arguments must hold '.', '/' or '*'; clean token-argument probes stay flagged)

garrytan2c823275fdbe
diff --git a/.gstack/pregate.json b/.gstack/pregate.json
index 110ac02667..f9c31bbbae 100644
--- a/.gstack/pregate.json
+++ b/.gstack/pregate.json
@@ -135,8 +135,8 @@
"paths": [
".github/workflows/*.yml"
],
- "pattern": "pglite-snapshot-(?:default-)?\\$\\{\\{ runner\\.os \\}\\}-\\$\\{\\{ hashFiles\\('[\\w./*-]+'(?:, '[\\w./*-]+')*\\) \\}\\}$",
- "reason": "GitHub Actions cache keys: the whole value is pglite-snapshot-[default-]${{ runner.os }}-${{ hashFiles('<path globs>') }}, never a credential"
+ "pattern": "pglite-snapshot-(?:default-)?\\$\\{\\{ runner\\.os \\}\\}-\\$\\{\\{ hashFiles\\('[\\w-]*[./*][\\w./*-]*'(?:, '[\\w-]*[./*][\\w./*-]*')*\\) \\}\\}$",
+ "reason": "GitHub Actions cache keys: the whole value is pglite-snapshot-[default-]${{ runner.os }}-${{ hashFiles('<path globs>') }} where every argument holds a '.', '/' or '*', never a credential"
}
]
}
diff --git a/test/pregate-allowlist-cache-keys.test.ts b/test/pregate-allowlist-cache-keys.test.ts
index 405f944dd4..8966f684b8 100644
--- a/test/pregate-allowlist-cache-keys.test.ts
+++ b/test/pregate-allowlist-cache-keys.test.ts
@@ -42,6 +42,8 @@ describe('pregate allowlist: workflow cache keys', () => {
"pglite-snapshot-${{ runner.os }}-${{ hashFiles('src/*.ts') }}-Zx9Qw8Lk2Mn4Bv6Cx1Za3Sd5Fg7",
"pglite-snapshot-${{ runner.os }}-${{ hashFiles('src/*.ts', '" + pat.slice(0, -2) + "\\'') }}",
pat,
+ "pglite-snapshot-${{ runner.os }}-${{ hashFiles('" + pat + "') }}",
+ "pglite-snapshot-${{ runner.os }}-${{ hashFiles('src/*.ts', '" + pat + "') }}",
]) expect({ value, covered: covers(value) }).toEqual({ value, covered: false });
});
});