WeKnora/internal/infrastructure/web_search
lyingbug 1030832c4b
fix(security): harden outbound URL SSRF protection (#2626)
* fix(security): harden outbound URL SSRF protection

* test(security): add SSRF validation tests for outbound URL caching

Introduce tests for outbound SSRF validation cache to ensure proper handling of URL validation, including cache reuse for the same origin, cache invalidation on whitelist changes, and expiration of cached entries. This enhances the robustness of SSRF protection mechanisms in the application.

* refactor: clean up whitespace in engine_factory.go and ssrf_outbound_cache.go

Removed unnecessary blank lines in engine_factory.go and adjusted variable declarations for consistency in ssrf_outbound_cache.go. This improves code readability without altering functionality.
2026-08-10 13:24:14 +08:00
..
baidu.go fix(security): harden outbound URL SSRF protection (#2626) 2026-08-10 13:24:14 +08:00
bing.go feat: search engine adds proxy addresses and adds SSRF verification. 2026-04-17 16:38:02 +08:00
duckduckgo.go feat: search engine adds proxy addresses and adds SSRF verification. 2026-04-17 16:38:02 +08:00
google.go feat: search engine adds proxy addresses and adds SSRF verification. 2026-04-17 16:38:02 +08:00
keenable.go fix(web-search): polish Keenable provider integration after #1946 2026-07-07 17:14:39 +08:00
keenable_test.go fix(web-search): polish Keenable provider integration after #1946 2026-07-07 17:14:39 +08:00
ollama.go fix(security): harden outbound URL SSRF protection (#2626) 2026-08-10 13:24:14 +08:00
proxy.go fix(security): harden outbound URL SSRF protection (#2626) 2026-08-10 13:24:14 +08:00
proxy_test.go fix(security): harden outbound URL SSRF protection (#2626) 2026-08-10 13:24:14 +08:00
registry.go feat(web-search): refactor web search provider 2026-03-31 20:22:34 +08:00
searxng.go fix(web-search): improve SearXNG test connection error messages 2026-06-24 14:28:49 +08:00
searxng_test.go fix(web-search): improve SearXNG test connection error messages 2026-06-24 14:28:49 +08:00
tavily.go feat: search engine adds proxy addresses and adds SSRF verification. 2026-04-17 16:38:02 +08:00
test_errors.go feat: add Keenable as a configurable web search provider 2026-07-07 16:58:26 +08:00
test_errors_test.go fix(web-search): polish Keenable provider integration after #1946 2026-07-07 17:14:39 +08:00
zhipu.go feat(web-search): add Zhipu AI web search provider support 2026-07-20 12:15:35 +08:00
zhipu_test.go feat(web-search): add Zhipu AI web search provider support 2026-07-20 12:15:35 +08:00