Skip to content

fix: default local onboarding tools profile to coding - #39012

Merged
steipete merged 1 commit into
mainfrom
codex/onboarding-default-coding-profile
Mar 7, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/onboarding-default-coding-profile

Conversation

@steipete

@steipete steipete commented Mar 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • change local onboarding default tools.profile from messaging to coding
  • keep explicit user-configured tools.profile values unchanged
  • update the affected onboarding tests and English docs
  • add changelog note crediting the prior consolidation work

Why

This is the root-cause fix for the post-2026.3.2 regression where fresh/local onboarding could leave agents effectively chat-only (message/sessions) with no read / write / exec tools.

messaging is a base allowlist that excludes group:fs and group:runtime, so onboarding was generating a config that stripped the tools local setups expect.

Validation

  • pnpm vitest run src/commands/onboard-config.test.ts src/commands/onboard-non-interactive.gateway.test.ts
  • pnpm check
  • pnpm build
  • pnpm test

Related

Thanks @cgdusek.

@cursor

cursor Bot commented Mar 7, 2026 •

Copy link
Copy Markdown

PR Summary

Medium Risk
Changes the default tool allowlist for freshly onboarded local configs from messaging to broader coding, which increases filesystem/runtime tool access by default and could affect security expectations for new installs. Impact is limited to onboarding defaults and existing explicit tools.profile values remain unchanged.

Overview
Local onboarding now writes tools.profile: "coding" by default (instead of "messaging") when the field is unset, restoring filesystem/runtime tools for fresh local installs while continuing to preserve any explicitly configured tools.profile.

Tests covering onboarding config generation and non-interactive gateway onboarding expectations are updated, and the change is reflected in the changelog and onboarding/configuration documentation.

Written by Cursor Bugbot for commit 57399a3. This will update automatically on new commits. Configure here.

@aisle-research-bot

aisle-research-bot Bot commented Mar 7, 2026 •

Copy link
Copy Markdown

🔒 Aisle Security Analysis

We found 1 potential security issue(s) in this PR:

# Severity Title
1 🟡 Medium Insecure default tool profile enables filesystem and exec tools for new configs

1. 🟡 Insecure default tool profile enables filesystem and exec tools for new configs

Property Value
Severity Medium
CWE CWE-250
Location src/commands/onboard-config.ts:5-7

Description

The onboarding defaults were changed to set tools.profile to "coding" instead of "messaging".

This is a least-privilege regression because the coding profile enables high-impact tools (per src/agents/tool-catalog.ts), including:

  • Filesystem tools: read, write, edit, apply_patch
  • Command execution: exec, process
  • Automation/subagents: cron, sessions_spawn, subagents
  • Memory access: memory_get, memory_search

In deployments where onboarding-generated configs are later used with gateway-connected channels that can receive untrusted content (e.g., Telegram/Discord/webhooks/email ingestion), this materially increases exposure to prompt-injection leading to:

  • Sensitive data exposure (reading local files / memory content and returning it in chat)
  • Host modification (writing/editing files)
  • Code execution (via exec), depending on runtime/sandbox posture

Vulnerable change:

export const ONBOARDING_DEFAULT_TOOLS_PROFILE: ToolProfileId = "coding";

While there are other guardrails elsewhere (e.g., some owner-only tools, exec approval controls for host execution, optional sandboxing), changing the default profile makes these powerful capabilities available without an explicit opt-in step.

Recommendation

Restore least-privilege defaults, or make the default conditional on the deployment context.

Options:

  1. Keep onboarding default at messaging and require explicit opt-in for coding:
export const ONBOARDING_DEFAULT_TOOLS_PROFILE: ToolProfileId = "messaging";
  1. If you must default to coding for local-only workflows, add a safety gate for gateway/multi-user/untrusted-input scenarios (docs + code):
  • Use messaging when gateway channels/hooks are enabled
  • Or set stricter defaults alongside coding, e.g.:
    • tools.fs.workspaceOnly: true
    • ensure exec is sandbox-required and cannot fall back to host execution unless explicitly configured

Also document the security implications prominently: “coding profile enables filesystem + exec tools; do not use as default in shared gateways or when ingesting untrusted content.”


Analyzed PR: #39012 at commit 57399a3

Last updated on: 2026-03-07T17:09:48Z

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime commands Command implementations size: XS maintainer Maintainer-authored PR labels Mar 7, 2026
@steipete
steipete merged commit 1dd4f92 into main Mar 7, 2026
18 of 19 checks passed
@steipete
steipete deleted the codex/onboarding-default-coding-profile branch March 7, 2026 16:41
@steipete

steipete commented Mar 7, 2026

Copy link
Copy Markdown
Contributor Author

Landed via replacement PR on main.

  • Gate: pnpm vitest run src/commands/onboard-config.test.ts src/commands/onboard-non-interactive.gateway.test.ts; pnpm check; pnpm build; pnpm test
  • Land commit: 57399a3
  • Merge commit: 1dd4f92

Thanks @cgdusek for the earlier consolidation path on this fix.

@greptile-apps

greptile-apps Bot commented Mar 7, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes a regression introduced after 2026.3.2 where fresh local onboarding silently configured agents with tools.profile: "messaging", which excludes group:fs and group:runtime, leaving new local setups chat-only without file/runtime tools. The fix changes ONBOARDING_DEFAULT_TOOLS_PROFILE in onboard-config.ts from "messaging" to "coding", a valid ToolProfileId that restores the expected filesystem and runtime tool access for local setups.

  • The ?? operator in applyOnboardingLocalWorkspaceConfig correctly preserves any explicitly set user profile, so existing configs with tools.profile: "messaging" (or any other value) are unaffected.
  • All affected documentation files, tests, and the changelog are updated consistently.
  • A new dedicated test verifies the constant value; existing tests cover the functional behavior of applyOnboardingLocalWorkspaceConfig and explicit-profile preservation.

Confidence Score: 5/5

  • This PR is safe to merge — it is a minimal, targeted one-line fix with full documentation and test alignment.
  • The change is a single constant value correction ("messaging" → "coding") in a well-tested file. "coding" is confirmed as a valid ToolProfileId. Existing explicit profiles are preserved via ??. All tests, docs, and the changelog are consistently updated. No regressions are expected.
  • No files require special attention.

Last reviewed commit: 57399a3

obviyus added a commit that referenced this pull request Sep 17, 2026
…150596)

The diff includes an unchanged four-test file split to meet the line limit; production shrinks by 54 lines.

## What Problem This Solves

New local setups use Coding, which excludes messaging. The existing `openclaw` setup helper is also missing from the tool catalog.

## Why This Change Was Made

The owner approved Full for unprofiled local onboarding, including reruns, and the helper's group allow/deny membership. This intentionally revises #39012. The onboarding default has one writer. Security and Agents now save Full consistently; the UI uses the canonical tool catalog instead of a duplicate list.

## User Impact

New setups get broad tool selection. “Available tools” is distinct from “Execution permissions”; Full does not mean Full Access.

## Evidence

Real isolated onboarding: `coding` before → `full` after. [Commands and browser proof](https://gist.github.com/obviyus/3ba9dd83878ff416c0c462468926e79a).

| Before | After |
| --- | --- |
| ![Security before](https://gist.githubusercontent.com/obviyus/3ba9dd83878ff416c0c462468926e79a/raw/2a71c2931e6ab1106951669898da69b298200603/before-security.png) | ![Security after](https://gist.githubusercontent.com/obviyus/3ba9dd83878ff416c0c462468926e79a/raw/8a283ae74173f52403f233bd954180dc9162ed11/after-security.png) |
| ![Catalog before](https://gist.githubusercontent.com/obviyus/3ba9dd83878ff416c0c462468926e79a/raw/e309d6966c18457200c4a4b3095a5feda77173a1/before-catalog.png) | ![Catalog after](https://gist.githubusercontent.com/obviyus/3ba9dd83878ff416c0c462468926e79a/raw/1bc4551e27cdd72675119ec96c078dab10e73c36/after-catalog.png) |

## Compatibility

No migration or new settings. Existing explicit profiles and independent execution rules stay intact during normal upgrade. Re-onboarding an unprofiled config selects Full. Helper membership extends automation/OpenClaw group allows **and denies**; owner and sandbox checks remain.

[Compatibility proof](#150596 (comment)): published 2026.9.3 updater → candidate `d80239aace2d`, healthy Gateway, 12 Doctor scenarios twice, and 202 migration tests pass. The conflict-only rebase preserves those profile/helper changes. Existing Doctor repairs can rewrite conflicting profile/allow settings; tested helper policy access survives.

## Consumers

CLI, wizard, setup repair, Gateway catalog, and Tools UI share existing owners. Full also selects available optional plugin tools.

## Invalidation

Existing config reload and catalog refresh remain unchanged.

## Tests

412 core/plugin tests and 152 UI tests pass on the earlier proof merge; 54 affected UI tests pass after the conflict-only rebase. Type-aware changed lint, core types, script/root types, format, architecture, unused-export, UI size, and docs checks pass.

CI corrections move the two optional-plugin cases into a focused test and update the full settings save/reload test. All 134 cases pass locally, including the repaired E2E, and the new file-growth check passes. Production behavior is unchanged.

The prior CI run also hit Slack test/type failures from #150608, reproduced on its main and absent on its parent. Main now fixes those separately in `8f463a22`; this PR carries no Slack edits.

Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 18, 2026
…penclaw#150596)

The diff includes an unchanged four-test file split to meet the line limit; production shrinks by 54 lines.

## What Problem This Solves

New local setups use Coding, which excludes messaging. The existing `openclaw` setup helper is also missing from the tool catalog.

## Why This Change Was Made

The owner approved Full for unprofiled local onboarding, including reruns, and the helper's group allow/deny membership. This intentionally revises openclaw#39012. The onboarding default has one writer. Security and Agents now save Full consistently; the UI uses the canonical tool catalog instead of a duplicate list.

## User Impact

New setups get broad tool selection. “Available tools” is distinct from “Execution permissions”; Full does not mean Full Access.

## Evidence

Real isolated onboarding: `coding` before → `full` after. [Commands and browser proof](https://gist.github.com/obviyus/3ba9dd83878ff416c0c462468926e79a).

| Before | After |
| --- | --- |
| ![Security before](https://gist.githubusercontent.com/obviyus/3ba9dd83878ff416c0c462468926e79a/raw/2a71c2931e6ab1106951669898da69b298200603/before-security.png) | ![Security after](https://gist.githubusercontent.com/obviyus/3ba9dd83878ff416c0c462468926e79a/raw/8a283ae74173f52403f233bd954180dc9162ed11/after-security.png) |
| ![Catalog before](https://gist.githubusercontent.com/obviyus/3ba9dd83878ff416c0c462468926e79a/raw/e309d6966c18457200c4a4b3095a5feda77173a1/before-catalog.png) | ![Catalog after](https://gist.githubusercontent.com/obviyus/3ba9dd83878ff416c0c462468926e79a/raw/1bc4551e27cdd72675119ec96c078dab10e73c36/after-catalog.png) |

## Compatibility

No migration or new settings. Existing explicit profiles and independent execution rules stay intact during normal upgrade. Re-onboarding an unprofiled config selects Full. Helper membership extends automation/OpenClaw group allows **and denies**; owner and sandbox checks remain.

[Compatibility proof](openclaw#150596 (comment)): published 2026.9.3 updater → candidate `d80239aace2d`, healthy Gateway, 12 Doctor scenarios twice, and 202 migration tests pass. The conflict-only rebase preserves those profile/helper changes. Existing Doctor repairs can rewrite conflicting profile/allow settings; tested helper policy access survives.

## Consumers

CLI, wizard, setup repair, Gateway catalog, and Tools UI share existing owners. Full also selects available optional plugin tools.

## Invalidation

Existing config reload and catalog refresh remain unchanged.

## Tests

412 core/plugin tests and 152 UI tests pass on the earlier proof merge; 54 affected UI tests pass after the conflict-only rebase. Type-aware changed lint, core types, script/root types, format, architecture, unused-export, UI size, and docs checks pass.

CI corrections move the two optional-plugin cases into a focused test and update the full settings save/reload test. All 134 cases pass locally, including the repaired E2E, and the new file-growth check passes. Production behavior is unchanged.

The prior CI run also hit Slack test/type failures from openclaw#150608, reproduced on its main and absent on its parent. Main now fixes those separately in `96195a16`; this PR carries no Slack edits.

Co-authored-by: Ayaan Zaidi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Agents onboarded via openclaw onboard (non-interactive) cannot write files — models report "no file-writing tools available"

1 participant