Commit Graph

25 Commits (1fbf863f53a2fafdd3a4e4c8df3eea3462db12d5)

Author SHA1 Message Date
Peter Steinberger 247a06813e fix: avoid gateway cwd for node exec (#58977) (thanks @Starhappysh) 8 months ago
jianxing zhang 3b3191ab3a fix(exec): skip gateway cwd injection for remote node host
When exec runs with host=node and no explicit cwd is provided, the
gateway was injecting its own process.cwd() as the default working
directory. In cross-platform setups (e.g. Linux gateway + Windows node),
this gateway-local path does not exist on the node, causing
"SYSTEM_RUN_DENIED: approval requires an existing canonical cwd".

This change detects when no explicit workdir was provided (neither via
the tool call params.workdir nor via agent defaults.cwd) and passes
undefined instead of the gateway cwd. This lets the remote node use its
own default working directory.

Changes:
- bash-tools.exec.ts: Track whether workdir was explicitly provided;
  when host=node and no explicit workdir, pass undefined instead of
  gateway process.cwd()
- bash-tools.exec-host-node.ts: Accept workdir as string | undefined;
  only send cwd to system.run.prepare when defined
- bash-tools.exec-approval-request.ts: Accept workdir as
  string | undefined in HostExecApprovalParams

Fixes #58934

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
8 months ago
seonang 4207ca2eb8 Fix Telegram exec approval delivery and auto-resume fallback 8 months ago
Peter Steinberger c678ae7e7a
feat(exec): default host exec to yolo 8 months ago
Gustavo Madeira Santana ba735d0158
Exec approvals: unify effective policy reporting and actions (#59283)
Merged via squash.

Prepared head SHA: d579b97a93b720876048c85fe6fed2a51d5893ef
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
8 months ago
Vincent Koc 2d53ffdec1
fix(exec): resolve remote approval regressions (#58792)
* fix(exec): restore remote approval policy defaults

* fix(exec): handle headless cron approval conflicts

* fix(exec): make allow-always durable

* fix(exec): persist exact-command shell trust

* fix(doctor): match host exec fallback

* fix(exec): preserve blocked and inline approval state

* Doctor: surface allow-always ask bypass

* Doctor: match effective exec policy

* Exec: match node durable command text

* Exec: tighten durable approval security

* Exec: restore owner approver fallback

* Config: refresh Slack approval metadata

---------

Co-authored-by: scoootscooob <zhentongfan@gmail.com>
8 months ago
Peter Steinberger a94ec3b79b
fix(security): harden exec approval boundaries 8 months ago
Peter Steinberger 6720bf5be0 refactor: share exec host approval helpers 8 months ago
Peter Steinberger 565dc0d17b refactor: share exec approval registration context 8 months ago
Peter Steinberger 68c674d37c refactor(security): simplify system.run approval model 9 months ago
Harold Hunt de49a8b72c
Telegram: exec approvals for OpenCode/Codex (#37233)
Merged via squash.

Prepared head SHA: f2433790941841ade0efe6292ff4909b2edd6f18
Co-authored-by: huntharo <5617868+huntharo@users.noreply.github.com>
Co-authored-by: huntharo <5617868+huntharo@users.noreply.github.com>
Reviewed-by: @huntharo
9 months ago
Peter Steinberger 3c71e2bd48 refactor(core): extract shared dedup helpers 9 months ago
Peter Steinberger 9617ac9dd5 refactor: dedupe agent and reply runtimes 9 months ago
Peter Steinberger ed21b63bb8 refactor(plugin-sdk): share auth, routing, and stream/account helpers 9 months ago
Peter Steinberger 7fcec6ca3e refactor(streaming): share approval and stream message builders 9 months ago
Peter Steinberger 155118751f refactor!: remove versioned system-run approval contract 9 months ago
Peter Steinberger 9a4b2266cc fix(security): bind node system.run approvals to env 9 months ago
Peter Steinberger da0ba1b73a fix(security): harden channel auth path checks and exec approval routing 9 months ago
Peter Steinberger 03e689fc89 fix(security): bind system.run approvals to argv identity 9 months ago
Peter Steinberger 6f0dd61795 fix(exec): restore two-phase approval registration flow 9 months ago
Peter Steinberger 4a3f8438e5 fix(gateway): bind node exec approvals to nodeId 9 months ago
Vincent Koc 0e28e50b45
fix(security): detect obfuscated commands that bypass allowlist filters (#24287)
* security(exec): add obfuscated command detector

* test(exec): cover obfuscation detector patterns

* security(exec): enforce obfuscation approval on gateway host

* security(exec): enforce obfuscation approval on node host

* test(exec): prevent obfuscation timeout bypass

* chore(changelog): credit obfuscation security fix
9 months ago
Peter Steinberger 8af19ddc5b refactor: extract shared dedupe helpers for runtime paths 9 months ago
Peter Steinberger 2581b67cdb refactor: share exec approval request helper 9 months ago
Peter Steinberger fec48a5006 refactor(exec): split host flows and harden safe-bin trust 9 months ago