The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
test: opt the ClawHub owner-HTTP fixture into private URLs for the SSRF-guarded stream
Teknium833594cda68b
diff --git a/tests/tools/test_clawhub_owner_http.py b/tests/tools/test_clawhub_owner_http.pyindex 90149e686df..fe583188de6 100644--- a/tests/tools/test_clawhub_owner_http.py+++ b/tests/tools/test_clawhub_owner_http.py@@ -2,6 +2,7 @@import ioimport json+import osimport threadingimport zipfilefrom contextlib import contextmanager@@ -9,6 +10,7 @@ from http.server import BaseHTTPRequestHandler, ThreadingHTTPServerfrom urllib.parse import parse_qs, urlsplitfrom tools.skills_hub_clawhub import ClawHubSource+from tools.url_safety import _reset_allow_private_cache@contextmanager@@ -54,9 +56,18 @@ def registry(*, fallback=False, mismatch=False):thread.start()source = ClawHubSource()source.BASE_URL = f"http://127.0.0.1:{server.server_port}/api/v1"+ # The download path is SSRF-guarded (blocks loopback); opt in for the local fixture server.+ prior = os.environ.get("HERMES_ALLOW_PRIVATE_URLS")+ os.environ["HERMES_ALLOW_PRIVATE_URLS"] = "true"+ _reset_allow_private_cache()try:yield source, requestsfinally:+ if prior is None:+ os.environ.pop("HERMES_ALLOW_PRIVATE_URLS", None)+ else:+ os.environ["HERMES_ALLOW_PRIVATE_URLS"] = prior+ _reset_allow_private_cache()server.shutdown()server.server_close()thread.join(timeout=5)