fix(security): cover remaining catalog credential paths

This commit is contained in:
kshitijk4poor 2026-07-11 11:47:21 +05:30 committed by kshitij
parent 27a1042b13
commit cf34a1e8c7
3 changed files with 48 additions and 6 deletions

View file

@ -4,6 +4,7 @@ import json
import logging
import urllib.request
from hermes_cli.urllib_security import open_credentialed_url
from providers import register_provider
from providers.base import ProviderProfile
@ -28,7 +29,7 @@ class AnthropicProfile(ProviderProfile):
req.add_header("x-api-key", api_key)
req.add_header("anthropic-version", "2023-06-01")
req.add_header("Accept", "application/json")
with urllib.request.urlopen(req, timeout=timeout) as resp:
with open_credentialed_url(req, timeout=timeout) as resp:
data = json.loads(resp.read().decode())
return [
m["id"]