mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-06-12 18:08:54 +00:00
docs(exec): document build tool guard limitation
This commit is contained in:
@@ -861,6 +861,21 @@ Even with `restrict_to_workspace: false`, the `exec` tool blocks these dangerous
|
||||
* `shutdown`, `reboot`, `poweroff` — System shutdown
|
||||
* Fork bomb `:(){ :|:& };:`
|
||||
|
||||
#### Known Limitation: Child Processes From Build Tools
|
||||
|
||||
The exec safety guard only inspects the command line PicoClaw launches directly. It does not recursively inspect child
|
||||
processes spawned by allowed developer tools such as `make`, `go run`, `cargo`, `npm run`, or custom build scripts.
|
||||
|
||||
That means a top-level command can still compile or launch other binaries after it passes the initial guard check. In
|
||||
practice, treat build scripts, Makefiles, package scripts, and generated binaries as executable code that needs the same
|
||||
level of review as a direct shell command.
|
||||
|
||||
For higher-risk environments:
|
||||
|
||||
* Review build scripts before execution.
|
||||
* Prefer approval/manual review for compile-and-run workflows.
|
||||
* Run PicoClaw inside a container or VM if you need stronger isolation than the built-in guard provides.
|
||||
|
||||
#### Error Examples
|
||||
|
||||
```
|
||||
|
||||
@@ -84,6 +84,22 @@ By default, PicoClaw blocks the following dangerous commands:
|
||||
- Git: `git push`, `git force`
|
||||
- Other: `eval`, `source *.sh`
|
||||
|
||||
### Known Architectural Limitation
|
||||
|
||||
The exec guard only validates the top-level command sent to PicoClaw. It does **not** recursively inspect child
|
||||
processes spawned by build tools or scripts after that command starts running.
|
||||
|
||||
Examples of workflows that can bypass the direct command guard once the initial command is allowed:
|
||||
|
||||
- `make run`
|
||||
- `go run ./cmd/...`
|
||||
- `cargo run`
|
||||
- `npm run build`
|
||||
|
||||
This means the guard is useful for blocking obviously dangerous direct commands, but it is **not** a full sandbox for
|
||||
unreviewed build pipelines. If your threat model includes untrusted code in the workspace, use stronger isolation such
|
||||
as containers, VMs, or an approval flow around build-and-run commands.
|
||||
|
||||
### Configuration Example
|
||||
|
||||
```json
|
||||
|
||||
Reference in New Issue
Block a user