diff --git a/src/shared/net/redact-sensitive-url.test.ts b/src/shared/net/redact-sensitive-url.test.ts index d9dedf7e4ad..b72b90655cb 100644 --- a/src/shared/net/redact-sensitive-url.test.ts +++ b/src/shared/net/redact-sensitive-url.test.ts @@ -51,6 +51,12 @@ describe("sensitive URL config metadata", () => { expect(isSensitiveUrlConfigPath("gateway.remote.url")).toBe(false); }); + it("recognizes cdpUrl config paths as sensitive (browser CDP URLs can embed credentials)", () => { + expect(isSensitiveUrlConfigPath("browser.cdpUrl")).toBe(true); + expect(isSensitiveUrlConfigPath("browser.profiles.remote.cdpUrl")).toBe(true); + expect(isSensitiveUrlConfigPath("browser.profiles.staging.cdpUrl")).toBe(true); + }); + it("uses an explicit url-secret hint tag", () => { expect(SENSITIVE_URL_HINT_TAG).toBe("url-secret"); expect(hasSensitiveUrlHintTag({ tags: [SENSITIVE_URL_HINT_TAG] })).toBe(true); diff --git a/src/shared/net/redact-sensitive-url.ts b/src/shared/net/redact-sensitive-url.ts index 144d0ead19b..c2a3f379f27 100644 --- a/src/shared/net/redact-sensitive-url.ts +++ b/src/shared/net/redact-sensitive-url.ts @@ -25,6 +25,9 @@ export function isSensitiveUrlConfigPath(path: string): boolean { if (path.endsWith(".baseUrl") || path.endsWith(".httpUrl")) { return true; } + if (path.endsWith(".cdpUrl")) { + return true; + } if (path.endsWith(".request.proxy.url")) { return true; }