fix(security): validate secret in _reload_dynamic_routes to prevent HMAC bypass#8306
Closed
memosr wants to merge 1 commit into
Closed
fix(security): validate secret in _reload_dynamic_routes to prevent HMAC bypass#8306memosr wants to merge 1 commit into
memosr wants to merge 1 commit into
Conversation
teknium1
added a commit
that referenced
this pull request
May 22, 2026
teknium1
added a commit
that referenced
this pull request
May 22, 2026
Contributor
|
Thanks for catching this @memosr — clean diagnosis, clean fix. Merged via salvage PR #30370 (rebase-merge so your authorship is preserved on Closing this PR — fix is on main: #30370 |
Gpapas
pushed a commit
to Gpapas/hermes-agent
that referenced
this pull request
May 23, 2026
Mucky010
pushed a commit
to Mucky010/hermes-agent
that referenced
this pull request
May 24, 2026
exosyphon
pushed a commit
to exosyphon/hermes-agent
that referenced
this pull request
May 24, 2026
Bryce-huang
pushed a commit
to wbkunlun/hermes-agent
that referenced
this pull request
May 29, 2026
mosaiq-systems
pushed a commit
to mosaiq-systems/hermes-agent
that referenced
this pull request
May 29, 2026
gweeteve
pushed a commit
to gweeteve/hermes-agent
that referenced
this pull request
Jun 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
gateway/platforms/webhook.pyhad a secret validation gap betweenstartup and hot-reload:
run()): validates that all routes have a non-empty secret_reload_dynamic_routes()): loads routes fromwebhook_subscriptions.jsonwithout any secret validationWhen a route with
"secret": ""was loaded via hot-reload, therequest handler's check
if secret and ...evaluated toFalse(empty string is falsy), completely skipping HMAC validation.
Exploit chain
'monitor' with an empty secret"
{"monitor": {"secret": "", "prompt": "..."}}towebhook_subscriptions.json_reload_dynamic_routes()hot-reloads the file — no secret check/webhooks/monitorwithout any HMAC signatureFix
Added per-route secret validation in
_reload_dynamic_routes().Routes with empty or missing secrets are skipped with a WARNING log.
INSECURE_NO_AUTHremains valid as an explicit opt-in.Type of Change
Checklist
run()INSECURE_NO_AUTHopt-in still works