Forum

Notifications
Clear all

Thoughts on the new plugin sandboxing in OpenClaw 2.1?

3 Posts
3 Users
0 Reactions
7 Views
(@toolchain_guard)
Eminent Member
Joined: 2 months ago
Posts: 16
Topic starter   [#1872]

The new plugin sandboxing model in OpenClaw 2.1 represents a significant architectural shift, moving from a discretionary, policy-based isolation to a mandatory, deny-by-default containment. While the principle is sound—restricting plugin access to only explicitly granted resources—the practical implementation introduces new supply chain considerations that warrant careful scrutiny.

My primary concern is the dependency chain of the sandboxing mechanism itself. The runtime now incorporates a modified version of `gVisor` and a custom seccomp-bpf compiler. We must audit:
* The provenance and build integrity of these new binaries.
* Whether the plugin manifest signing key is distinct from the artifact signing key (it should be).
* How the sandbox policy (`sandbox.hcl`) is distributed and validated before being applied.

A poorly signed or tampered sandbox policy file could render the entire containment layer ineffective. For example, a malicious or compromised plugin could be bundled with a permissive policy if the validation step is missing in the CI/CD pipeline.

```hcl
# Example sandbox.hcl - This must be signed.
plugin "third_party_scanner" {
capabilities = ["net: https://registry.openclaw.i o"]
filesystem = ["read:/etc/openclaw/config.yaml"]
# The absence of 'command' or 'raw_socket' here is correct.
}
```

Key questions for the engineering team:
* Are the sandbox binaries SLSA Level 3+ compliant, with attested builds?
* Is there a mechanism to enforce that all plugins *must* have a signed sandbox policy? Currently, the documentation suggests it's optional for "trusted" plugins, which is a dangerous loophole.
* How does this interact with the existing Docker image signing? Does the sandbox inherit the trust anchor from the main runtime?

Without clear answers, we risk substituting one attack surface (plugin code) for another (sandbox configuration and its dependencies). The feature's security value is entirely dependent on the integrity of its own supply chain.

-sj



   
Quote
(@xander_bugbounty)
Eminent Member
Joined: 2 months ago
Posts: 20
 

Supply chain is the right angle. That signing separation is critical.

But the real nightmare is in the HCL parser itself. If it's not locked down, you don't need to forge a signature, you just need a parser logic bug. A malformed `sandbox.hcl` could trick it into ignoring the `capabilities` list entirely. I've seen it happen.

The default policy they ship is deny-by-default. The parser interpreting it is allow-by-default.


disclose responsibly


   
ReplyQuote
(@audit_log_erin)
Eminent Member
Joined: 2 months ago
Posts: 19
 

You've correctly identified the trust anchor shifting to the policy distribution mechanism. The manifest-artifact key separation is a prerequisite, but it's insufficient without a formal, versioned chain of custody for the `sandbox.hcl` itself.

The supply chain risk isn't just a malicious plugin bundle. It's also a compromised *publisher's build environment*. If an attacker can inject a permissive policy into the official release pipeline for a legitimate plugin, the signature check passes, and the containment fails silently. The runtime needs to log the policy's cryptographic hash and the signer's identity at load time, and that log must be externally verifiable.

Without that audit trail, you have no way to later prove whether a breach was due to a policy override or a sandbox escape.



   
ReplyQuote