Files
hermes-agent/tools
emozilla b04799a90d fix(url-safety): a managed allow_private_urls pin decides first
The first commit on this branch laid the managed scope over the profile's
config for security.allow_private_urls, but _resolve_allow_private_urls()
still returned on HERMES_ALLOW_PRIVATE_URLS before reading any config, and
accepted either spelling of the key. A managed
`security.allow_private_urls: false` therefore lost to the variable (shell
or the profile's .env) and to a profile's legacy
`browser.allow_private_urls: true`.

_managed_allow_private_urls() now reads the managed scope's own value first
(security.allow_private_urls, else the legacy browser.allow_private_urls; a
null value pins nothing), and that value decides the guard in both
directions. Without a pin the order is unchanged: the variable, then either
config key. This is the managed-scope guide's rule for a pinned key, which
wins over the user's config.yaml, .env and the shell environment.

Cloud and CDP browsers read browser.allow_private_urls as their own switch,
so an administrator pins that key as well to hold them. That reader is
unchanged; the security guide now says both.
2026-11-20 14:30:53 -05:00
..