From fca5134597ee49cbc9e169a79211d95c9de47199 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20K=C3=B6ssler?= Date: Mon, 9 Dec 2024 18:15:02 +0100 Subject: [PATCH] Add test for isRequestToItself --- library/vulnerabilities/ssrf/isRequestToItself.test.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/library/vulnerabilities/ssrf/isRequestToItself.test.ts b/library/vulnerabilities/ssrf/isRequestToItself.test.ts index d8371277..157fa7e3 100644 --- a/library/vulnerabilities/ssrf/isRequestToItself.test.ts +++ b/library/vulnerabilities/ssrf/isRequestToItself.test.ts @@ -114,4 +114,13 @@ t.test("it returns false", async (t) => { }), false ); + t.same( + isRequestToItself({ + source: "headers", + paths: [], + port: 1234, + str: "localhost:1234", + }), + false + ); });