#23582: fix(tool-policy): add group:fs and group:runtime to group:openclaw
agents
size: S
experienced-contributor
Cluster:
Tool and Plugin Enhancements
## What broke
`group:openclaw` is documented everywhere as *"all built-in OpenClaw tools (excludes provider plugins)"* — in `configuration-reference.md`, `sandbox-vs-tool-policy-vs-elevated.md`, `tools/index.md`, and `multi-agent-sandbox-tools.md`. It is the natural choice when writing a tool policy that should cover the full native tool surface.
But it was silently missing two entire sub-groups:
| Missing group | Tools omitted |
|---|---|
| `group:fs` | `read`, `write`, `edit`, `apply_patch` |
| `group:runtime` | `exec`, `process` |
## Security impact
**allow side:** A subagent with `tools.allow: ["group:openclaw"]` could not read or write files or execute commands without the operator separately adding `group:fs` and `group:runtime`. The policy appeared correct but was incomplete.
**deny side (worse):** An operator writing `tools.deny: ["group:openclaw"]` to block all native tools would leave `read`, `write`, `exec`, and `process` fully unblocked — the opposite of the stated intent. This is the class of bug the [openclaw formal models](https://github.com/openclaw/openclaw-formal-models) are designed to catch: a group expansion invariant violation.
## Fix
Add the missing tools with inline section comments that mirror the named sub-groups, making future omissions visible at a glance.
## Verification
The existing test `"includes core tool groups in group:openclaw"` was expanded into `"includes all named sub-groups in group:openclaw"` — it now asserts every tool from every named sub-group is present, acting as a regression guard.
```sh
pnpm test src/agents/tool-policy.e2e.test.ts
```
Fixes #23610
[AI-assisted]
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
Fixes a critical security gap in tool-policy group expansion where `group:openclaw` was missing `group:fs` (read, write, edit, apply_patch) and `group:runtime` (exec, process) tools.
**Key changes:**
- Added missing filesystem and runtime tools to `group:openclaw` definition in `src/agents/tool-policy-shared.ts:40-75`
- Reorganized tools with inline comments matching named sub-groups for maintainability
- Strengthened regression coverage in `src/agents/tool-policy.e2e.test.ts:62-93` by expanding test to verify all sub-groups
**Security impact:**
- **Deny side (critical):** Policies using `deny: ["group:openclaw"]` would leave `read`, `write`, `exec`, and `process` fully unblocked — the opposite of stated intent
- **Allow side:** Subagents with `allow: ["group:openclaw"]` couldn't access filesystem or runtime tools without explicitly adding the missing groups
<h3>Confidence Score: 5/5</h3>
- Safe to merge — fixes critical security gap with comprehensive test coverage
- The fix correctly addresses a documented security vulnerability (group expansion invariant violation) by adding missing tools to `group:openclaw`. All tools from all named sub-groups are now accounted for. The change includes inline documentation to prevent future omissions, and the test was strengthened to verify all sub-groups are present, acting as a regression guard.
- No files require special attention
<sub>Last reviewed commit: 4462a6a</sub>
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#16064: feat: add contact-based tool permissions with verification
by jamiequint · 2026-02-14
78.9%
#15757: feat(security): add hardening gap audit checks
by saurabhsh5 · 2026-02-13
77.6%
#14734: test(agents): guard against stale allowAgents in existing sessions
by davidahmann · 2026-02-12
77.3%
#12665: fix(tools): recognise tool groups that expand to plugin tools in al...
by mcaxtr · 2026-02-09
77.1%
#5061: fix(tools): add group:web to coding profile
by mdliss · 2026-01-31
75.8%
#23783: Tools: add strict allowlist mode and fail closed on unknown entries
by bmendonca3 · 2026-02-22
75.6%
#20435: fix(exec): prioritize user 'always allow' config over tool defaults...
by ChisomUma · 2026-02-18
75.2%
#11854: fix: resolve per-agent tools.exec config in pi-tools
by Yida-Dev · 2026-02-08
75.0%
#19094: Fix empty tool_call_id and function names in provider transcript pa...
by yxshee · 2026-02-17
74.5%
#23743: Auto-reply: enforce tools.allow/tools.deny on deterministic skill t...
by bmendonca3 · 2026-02-22
74.1%