You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A2A server binds 0.0.0.0 with no authentication #1023
A2AServer.run (src/synapsekit/a2a/server.py:92) defaults to binding host="0.0.0.0" and the POST /a2a handler (:111-123) accepts unauthenticated JSON-RPC whose content flows straight into executor.run(content) — which may drive an agent with shell / python_repl / file tools. So any host on the network can drive the agent with no credential.
Severity
MEDIUM — unauthenticated network exposure of an agent executor (RCE-adjacent depending on the executor's tool set).
Fix (non-breaking)
Add an optional bearer-token check: constructor accepts auth_token: str | None; when set, POST /a2a requires a matching Authorization header (401 otherwise).
Emit a loud security warning when run() binds a non-loopback host (0.0.0.0/public) without an auth token.
Keep the host parameter and its current default so no existing deployment breaks; document that the executor's tool set is the trust boundary.
(Default-host change to 127.0.0.1 was considered but is behavior-breaking; deferred — warn instead.)
Acceptance
Regression test: request without/with wrong token → 401 when auth_token set; correct token → handled; warning emitted on 0.0.0.0 without token.
Activity
fix(a2a): avoid str-bytes-safe mypy error in run() startup print
fix(a2a): add optional bearer-token auth to A2AServer