mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-19 03:17:26 +00:00
fix(security): harden safeBins path trust
This commit is contained in:
@@ -127,6 +127,8 @@ positional file args and path-like tokens, so they can only operate on the incom
|
||||
Safe bins also force argv tokens to be treated as **literal text** at execution time (no globbing
|
||||
and no `$VARS` expansion) for stdin-only segments, so patterns like `*` or `$HOME/...` cannot be
|
||||
used to smuggle file reads.
|
||||
Safe bins must also resolve from trusted binary directories (system defaults plus the gateway
|
||||
process `PATH` at startup). This blocks request-scoped PATH hijacking attempts.
|
||||
Shell chaining and redirections are not auto-allowed in allowlist mode.
|
||||
|
||||
Shell chaining (`&&`, `||`, `;`) is allowed when every top-level segment satisfies the allowlist
|
||||
|
||||
@@ -51,7 +51,7 @@ Notes:
|
||||
- `tools.exec.ask` (default: `on-miss`)
|
||||
- `tools.exec.node` (default: unset)
|
||||
- `tools.exec.pathPrepend`: list of directories to prepend to `PATH` for exec runs (gateway + sandbox only).
|
||||
- `tools.exec.safeBins`: stdin-only safe binaries that can run without explicit allowlist entries.
|
||||
- `tools.exec.safeBins`: stdin-only safe binaries that can run without explicit allowlist entries (resolved path must come from trusted binary directories).
|
||||
|
||||
Example:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user