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
feat(gateway): fail-closed plugin and tool approval gates
Squash-rebased #103932 segment onto the ancestor-propagation tip on
current main. Plugin node.invoke approvals claim a one-shot allow-once
decision before handing execution authority to the policy, so observation
or retry cannot replay a consumed approval; sibling tool gates bind
approval ids to their originating reviewer identity.
(cherry picked from commit 122df0d75281f572c012b6484ed5daf085d1d577)
(cherry picked from commit f23d8ac240a8dcf2a42c4daaae962263975a0ae8)
(cherry picked from commit 8632fb6436a224dac7a9a9ef0216884530de2c24)
(cherry picked from commit d9fe2dd5c53665e5732f5f3da5ed1907a686ade8)
(cherry picked from commit bb139f2c8aa36ddad70413e1ef79ff491a6f2ecd)
(cherry picked from commit 9b3e056b68ea515c7d4baef269289b6670570480)
(cherry picked from commit b11e66b59a7af1f3b08712de06864aed64d349e4)
(cherry picked from commit a12916ee592d03dfa35e86a2aaede4476a5d4e5d)
(cherry picked from commit d699de840fc8346892b9ae244fe3c3e8c4413032)
(cherry picked from commit 9b7e5a9)
(cherry picked from commit 4b507593f1b2f10b4496984c84a2803b853e5c5e)
(cherry picked from commit 56408a186733c4eeb5aa76bd5907cde7b0cd3d5b)
(cherry picked from commit a4051d6d8353d39d6fa0b5d69c36e06c3cd3e796)
(cherry picked from commit 7682980)
(cherry picked from commit a8b493f)
(cherry picked from commit aceb990)
(cherry picked from commit a29b0e7)
Copy file name to clipboardExpand all lines: docs/refactor/operator-approvals.md
+9-5Lines changed: 9 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -335,13 +335,17 @@ Final strict behavior:
335
335
- malformed trusted verdict -> `denied`, deny;
336
336
- only an allowed explicit allow decision -> `allowed`.
337
337
338
-
Current shipped behavior conflicts with this contract:
338
+
Current shipped exec behavior still conflicts with this contract:
339
339
340
340
-`src/agents/bash-tools.exec-host-shared.ts` may apply `askFallback`.
341
-
-`src/agents/agent-tools.before-tool-call.ts` may honor `timeoutBehavior: "allow"`.
342
-
-`docs/tools/exec-approvals.md`, `docs/cli/approvals.md`, and `docs/plugins/plugin-permission-requests.md` document those surfaces.
341
+
-`docs/tools/exec-approvals.md` and `docs/cli/approvals.md` document that surface.
343
342
344
-
Do not silently change them in the storage PR. The strict-semantics PR must update code, types, docs, tests, and changelog together, with explicit owner/security review. `askFallback` may continue to describe pre-gate policy selection during migration, but it must not turn a created pending record's timeout into approval.
343
+
Plugin approvals now fail closed on timeout and malformed verdicts; the legacy
344
+
`timeoutBehavior` field remains accepted but ignored. The exec strict-semantics
345
+
follow-up must update code, types, docs, tests, and changelog together, with
346
+
explicit owner/security review. `askFallback` may continue to describe
347
+
pre-gate policy selection during migration, but it must not turn a created
348
+
pending record's timeout into approval.
345
349
346
350
## Compatibility plan
347
351
@@ -460,5 +464,5 @@ A committed transition is success even if later event delivery fails. Lifecycle
460
464
## Open decisions
461
465
462
466
1.**Externally reachable Control UI origin.** Every snapshot carries the stable relative `urlPath`. An absolute URL may be advertised only from a cached Tailscale Serve/Funnel location after Gateway exposure succeeds; `allowedOrigins`, request Host headers, `gateway.remote.url`, and display-only loopback/LAN candidates are not canonical origins. Telegram can use its authenticated Mini App wrapper to retain the approval path through bootstrap. Arbitrary reverse proxies remain relative-only until a separately reviewed explicit public-URL contract exists. Never let a channel guess the origin.
463
-
2.**Strict timeout compatibility cutover.**The target is fail-closed, but `askFallback`and plugin `timeoutBehavior: "allow"` are shipped contracts. Recommended: make the behavior change in PR 6 with explicit owner/security approval, changelog, docs, and a migration/deprecation decision rather than hiding it in PR 1.
467
+
2.**Exec strict timeout compatibility cutover.**Plugin approval timeouts now failclosedand `timeoutBehavior` is deprecated. The remaining shipped `askFallback` contract needs explicit owner/security review, changelog, docs, and a migration/deprecation decision before it stops authorizing execution after a pending ask times out.
464
468
3.**Gatewayless embedded mode.** Recommended: keep it local-only initially, then make it a client of the canonical service when a Gateway exists. Do not advertise a deep link that no server can resolve.
0 commit comments