WeKnora/internal/application/service/file
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
..
backend_scoped.go feat(storage): add multi-instance storage backends per workspace 2026-07-15 14:54:39 +08:00
backend_scoped_test.go feat(storage): add multi-instance storage backends per workspace 2026-07-15 14:54:39 +08:00
cos.go fix(security): harden outbound URL SSRF protection (#2626) 2026-08-10 13:24:14 +08:00
cos_parse_test.go feat: enhance IM file service tests and refactor storage URL handling 2026-05-29 13:47:32 +08:00
dummy.go feat(resource): add stable resource registry with LLM-context alias compaction 2026-07-15 17:02:43 +08:00
endpoint_security_test.go fix(security): harden outbound URL SSRF protection (#2626) 2026-08-10 13:24:14 +08:00
errors.go fix: deep-copy stored files and images when cloning a knowledge base 2026-06-03 14:45:59 +08:00
factory.go feat(storage): support AWS S3 NoAk default credentials (#2008) 2026-08-05 11:59:02 +08:00
ks3.go fix(security): harden outbound URL SSRF protection (#2626) 2026-08-10 13:24:14 +08:00
local.go fix: harden document pipeline concurrency and diagnostics 2026-07-09 13:26:40 +08:00
local_copy_test.go fix: deep-copy stored files and images when cloning a knowledge base 2026-06-03 14:45:59 +08:00
local_test.go fix(im): revert tenant-from-context for presigned URL 2026-04-30 11:40:30 +08:00
minio.go fix(security): harden outbound URL SSRF protection (#2626) 2026-08-10 13:24:14 +08:00
obs.go fix(security): harden outbound URL SSRF protection (#2626) 2026-08-10 13:24:14 +08:00
oss.go fix(security): harden outbound URL SSRF protection (#2626) 2026-08-10 13:24:14 +08:00
oss_test.go fix(security): harden outbound URL SSRF protection (#2626) 2026-08-10 13:24:14 +08:00
resource_catalog.go feat(resource): add stable resource registry with LLM-context alias compaction 2026-07-15 17:02:43 +08:00
resource_catalog_test.go feat(resource): add stable resource registry with LLM-context alias compaction 2026-07-15 17:02:43 +08:00
s3.go fix(security): harden outbound URL SSRF protection (#2626) 2026-08-10 13:24:14 +08:00
s3_test.go feat(storage): support AWS S3 NoAk default credentials (#2008) 2026-08-05 11:59:02 +08:00
tos.go fix(security): harden outbound URL SSRF protection (#2626) 2026-08-10 13:24:14 +08:00