Files
Enterprise-Knowledge-Base/internal/agent/tools
wizardchen 2b3f76e418 feat(web_fetch): enhance web fetch tool with DNS pinning and validation improvements
- Introduced a new validatedParams struct to hold validated input along with DNS-pinned host/IP for SSRF protection.
- Updated the validateParams function to validate and resolve the host to a single public IP, ensuring safe outbound fetches.
- Modified executeFetch and fetchHTMLContent methods to utilize the new validatedParams for improved security and clarity.
- Enhanced logging to reflect the display URL and provide better context during fetch operations.

This update strengthens the web fetch tool's security against SSRF attacks and improves the overall robustness of URL handling.
2026-02-02 13:33:39 +08:00
..