mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-15 14:22:43 +00:00
fix(security): cover remaining catalog credential paths
This commit is contained in:
parent
27a1042b13
commit
cf34a1e8c7
3 changed files with 48 additions and 6 deletions
|
|
@ -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"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue