hermes-agent/gateway
aaronagent 27ddd8fd80 fix(gateway): sanitize agent error messages, validate webhook gh args
Two of the three fixes from PR #6660 (the cli.py reopen_session change is
moot — that raw _conn.execute reopen block no longer exists on main).

- gateway/run.py: stop sending raw type(e).__name__ and str(e)[:300] to
  end users on chat platforms. Exception text from LLM providers can leak
  API URLs, file paths, and partial credentials. Return a generic message;
  keep curated status hints for known HTTP codes; full detail stays in logs.
- gateway/platforms/webhook.py: validate pr_number (positive int) and repo
  (owner/name regex) before passing to the 'gh pr comment' subprocess.
  Payload-controlled values could otherwise inject gh flags (--help, a
  different --repo). List-form subprocess means this is arg injection, not
  shell injection, but validation is still correct.

Co-authored-by: aaronagent <1115117931@qq.com>
2026-06-28 18:53:26 -07:00
..
assets
…
builtin_hooks
…
platforms fix(gateway): sanitize agent error messages, validate webhook gh args 2026-06-28 18:53:26 -07:00
relay
…
__init__.py
…
authz_mixin.py fix(telegram): apply bot auth policy to Telegram sources 2026-06-28 00:57:03 -07:00
cgroup_cleanup.py fix: satisfy ruff encoding + windows-footgun lints for cgroup reaper 2026-06-28 02:05:50 -07:00
channel_directory.py
…
code_skew.py
…
config.py fix(gateway): make bg-process reset TTL configurable + surface session-scoped processes 2026-06-27 20:45:43 -07:00
delivery.py
…
display_config.py
…
drain_control.py
…
hooks.py
…
kanban_watchers.py
…
memory_monitor.py
…
message_timestamps.py
…
mirror.py
…
pairing.py
…
platform_registry.py perf(startup): lazy-load gateway platform adapters (#54448) 2026-06-28 15:11:59 -07:00
response_filters.py
…
restart.py
…
rich_sent_store.py
…
run.py fix(gateway): sanitize agent error messages, validate webhook gh args 2026-06-28 18:53:26 -07:00
runtime_footer.py
…
scale_to_zero.py
…
session.py fix(gateway): preserve sessions across restarts (#54442) 2026-06-28 15:10:39 -07:00
session_context.py
…
shutdown_forensics.py
…
slash_access.py
…
slash_commands.py fix(gateway): clear stale base_url on model switches 2026-06-27 21:23:25 -07:00
status.py fix(windows): cover remaining console-flash spawn legs (#54417) 2026-06-28 13:49:08 -07:00
sticker_cache.py
…
stream_consumer.py
…
stream_dispatch.py
…
stream_events.py
…
whatsapp_identity.py fix(whatsapp): resolve LID aliases on modern platforms/ session layout 2026-06-28 02:05:26 -07:00