Skip to content

Preserve native OpenClaw permissions in same-user sandboxes #11257

Description

@ericksoa

Parent: #11255

Problem

NemoClaw restores .openclaw/openclaw.json to 2770/0660 even when the interactive agent and gateway already use the same identity. Native OpenClaw doctor recommends and repairs these paths to 0700/0600, creating a persistent disagreement.

The audited same-user startup path invokes the shared normalizer and reapplies group modes. Group sharing remains necessary in separate-user paths; this issue removes only the unnecessary behavior where shared ownership is proven.

Scope and code to retire

  • Use native private state modes for verified same-user managed paths, with existing runtime/lifecycle authority determining applicability.
  • Remove group-mode restoration from eligible startup, one-shot, connect-shell and host-doctor paths. Relevant owners are the normalization contract, one-shot cleanup, shell normalizer, and host permission check.
  • Retain the shared-state package patch wherever a separate gateway identity still requires it; prevent unnecessary activation on same-user paths.
  • Replace tests that require reversing native modes with native diagnostic and state-write outcome checks for the eligible paths.

Security and compatibility

Do not consolidate all UIDs or change supervisor authority in this issue. Do not delete the mixed normalizer/one-shot helpers wholesale: signal forwarding, child reaping, exit status, config recovery, secret checks and active transaction protection remain required. Agent-controlled environment variables or names alone cannot establish eligibility. Ambiguous or separate-user paths retain their existing access contract.

Acceptance criteria

  • Record effective agent/gateway identities and supported runtime/image versions before applying the narrower contract.
  • On a fresh eligible sandbox, openclaw doctor --lint --json reports no NemoClaw-induced state-permission findings on first attempt, without prior repair, suppression or post-command reversal.
  • Native doctor --fix, repeated doctor, normal config edits and restart leave owner-only state usable and stable. The running gateway can persist settings and database writes.
  • Entry, exec and connect agree; one-shot signals, stdin and exit codes remain correct.
  • Separate-user regression coverage proves gateway state access is preserved. Secret custody, identity stores, transaction safety and restoration remain intact.

Related work

Closed #4538 and #6047 preserved the older group-sharing contract. Coordinate patch disposition with #5896 and OpenClaw migration #10694. Broader runtime identity design remains #11079.

Ownership and delivery

Core NemoClaw maintenance under the parent epic. The NemoClaw maintainers own the affected components; implementation remains unassigned. Apply this change to the existing supported agent/runtime combinations identified by the implementation.

Closure requires an actual net reduction in production code, the removed-function/branch/patch inventory, and passing native behavior plus existing security and recovery coverage. Source links record the audit baseline; inspect the implementation revision before deleting code.

Activity

  1. added theissue type on Sep 9, 2026
  2. added
    integration: openclaw
    area: sandbox
    on Sep 9, 2026
  3. added a commit that references this issue on Sep 10, 2026
    5b82037
  4. self-assigned this
    on Sep 15, 2026
  5. added
    area: security
    on Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area: sandboxarea: securityintegration: openclaw

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions