Propagate real gateway client into plugin subagent runtime

fix(gateway): propagate real gateway client into plugin subagent runtime
Propagate real gateway client into plugin subagent runtimea1520d-fix-propagate-real-gateway-client-into-plugin-cve-2026-32916fixpropagate real gateway client plugin subagent

Committed by hydro13

commit message
fix(gateway): propagate real gateway client into plugin subagent runtime

Plugin subagent dispatch used a hardcoded synthetic client carrying
operator.admin, operator.approvals, and operator.pairing for all
runtime.subagent.* calls. Plugin HTTP routes with auth:"plugin" require
no gateway auth by design, so an unauthenticated external request could
drive admin-only gateway methods (sessions.delete, agent.run) through
the subagent runtime.
 
Propagate the real gateway client into the plugin runtime request scope
when one is available. Plugin HTTP routes now run inside a scoped
runtime client: auth:"plugin" routes receive a non-admin synthetic
operator.write client; gateway-authenticated routes retain admin-capable
scopes. The security boundary is enforced at the HTTP handler level.
 
Fixes GHSA-xw77-45gv-p728

Editor assessment

This commit patches CVE-2026-32916. The header `fix(gateway): propagate real gateway client into plugin subagent runtime` is long but accurate, and the body is the best part: it explains the hardcoded synthetic client with operator.admin, approvals, and pairing scopes, traces how an unauthenticated plugin route could reach sessions.delete and agent.run, then describes the scoped client model and the HTTP-level boundary. The `Fixes GHSA-xw77-45gv-p728` footer is not machine-readable because it lacks the colon separator that CCv1 requires. Adding a test reference or a note on backward compatibility for existing plugin routes would also help. The reasoning is strong, but the footer keeps it below the top band.

Browse categories

More fix examples · Back to search