Skip to content

Soul-driven AI agent with permission-hardened tools, token budgets, and multi-channel access. Runs 24/7 from CLI, Telegram or More.

test(ssrf): cover literal public IP targets

SeashoreShi4e4aa071698e
diff --git a/src/utils/ssrf.test.ts b/src/utils/ssrf.test.ts
index 36a0ab16..60d91516 100644
--- a/src/utils/ssrf.test.ts
+++ b/src/utils/ssrf.test.ts
@@ -104,4 +104,9 @@ describe('assertFetchableTarget', () => {
await expect(assertFetchableTarget('http://198.18.0.1/')).rejects.toThrow(/private\/internal/);
await expect(assertFetchableTarget('file:///etc/passwd')).rejects.toThrow(/Blocked scheme/);
});
+
+ it('accepts a literal public IP without a DNS lookup', async () => {
+ await expect(assertFetchableTarget('https://93.184.216.34/')).resolves.toBeInstanceOf(URL);
+ expect(mockedLookup).not.toHaveBeenCalled();
+ });
});