fix(security): block private-network web_search citation redirects

This commit is contained in:
Peter Steinberger
2026-03-02 01:05:05 +00:00
parent e1a9ba8400
commit 085c23ce5a
4 changed files with 3 additions and 3 deletions

View File

@@ -32,10 +32,10 @@ describe("web_search redirect resolution hardening", () => {
url: "https://example.com/start",
timeoutMs: 5000,
init: { method: "HEAD" },
policy: { dangerouslyAllowPrivateNetwork: true },
proxy: "env",
}),
);
expect(fetchWithSsrFGuardMock.mock.calls[0]?.[0]?.policy).toBeUndefined();
expect(release).toHaveBeenCalledTimes(1);
});

View File

@@ -721,7 +721,6 @@ async function resolveRedirectUrl(url: string): Promise<string> {
url,
init: { method: "HEAD" },
timeoutMs: REDIRECT_TIMEOUT_MS,
policy: WEB_TOOLS_TRUSTED_NETWORK_SSRF_POLICY,
},
async ({ finalUrl }) => finalUrl || url,
);