Skip to content

Commit 15527f8

Browse files
committed
test(service): use the repo URL-userinfo fixture so privacy:scan stays green
The new credential-detection test spelled its password as an @-adjacent word, which the privacy scanner reads as an email address and rejects. scripts/privacy-scan.ts already allowlists exactly one URL-userinfo pair for tests/ for this reason; use it. The shape under test is the userinfo authority, not the particular credential, so the fixture choice is free. Caught by running the gates job locally after CI reported it, rather than by guessing at the failure.
1 parent 360b66b commit 15527f8

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎tests/service.test.ts‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2227,7 +2227,11 @@ describe("service definitions are not world-readable", () => {
22272227
// leave a proxy password readable by other local principals.
22282228
describe("credential-bearing definitions harden the Windows ACL strictly", () => {
22292229
test("a proxy URL with userinfo is treated as a secret publication", () => {
2230-
const unit = buildUnit(resolvedProxyEnv({ HTTPS_PROXY: "http://user:[email protected]:8080" }));
2230+
// `[email protected]` is the repo's existing URL-userinfo fixture: the privacy scanner
2231+
// reads "pw@host" as an email otherwise, and this exact pair is already allowlisted for
2232+
// tests/ (scripts/privacy-scan.ts:102). The shape under test is the userinfo authority,
2233+
// not the particular credential.
2234+
const unit = buildUnit(resolvedProxyEnv({ HTTPS_PROXY: "https://user:[email protected]:8080" }));
22312235

22322236
expect(definitionCarriesCredential(unit)).toBe(true);
22332237
});

0 commit comments

Comments
 (0)