-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
[Bug]: exec-policy still rejects symlinked ~/.openclaw after #72377 replacement for #64663 #72572
Copy link
Copy link
Open
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.staleMarked as stale due to inactivityMarked as stale due to inactivity
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.staleMarked as stale due to inactivityMarked as stale due to inactivity
Type
Fields
Priority
None yet
Bug type
Behavior bug (incorrect output/state without crash)
Summary
openclaw exec-policy preset yolostill fails when~/.openclawis a symlink, even after replacement PR #72377 landed and closed #64663.#72377fixed only the case whereOPENCLAW_HOMEitself is a symlinked trusted root. It still rejects a symlinked~/.openclawpath component under the normal OS home directory, which is a common setup for users who manage OpenClaw config with GNU Stow or similar dotfile tooling.Steps to reproduce
Make
~/.openclawa symlink, for example:Verify the symlink:
Run:
Expected behavior
The command should succeed for a trusted first-level
~/.openclawsymlink owned by the current user, while still rejecting deeper symlink traversal inside the approvals path.Actual behavior
It fails with:
OpenClaw version
2026.4.26 (6d0e84a)
Operating system
macOS
Install method
Any
Model
N/A
Provider / routing chain
N/A
Config file / key location
Exec approvals store under
~/.openclaw/exec-approvals.jsonAdditional provider/model setup details
No response
Logs, screenshots, and evidence
Local repro:
Impact and severity
~/.openclawin a git-managed dotfiles repo and expose it via symlink (GNU Stow, chezmoi, manual symlink, etc.)~/.openclawitself is a symlink under the normal home directoryAdditional information
What happened across the PRs
#64663proposed a broader fix for symlinked exec-approvals paths, including the common~/.openclaw -> ...setup.#72377.#72377merged a narrower change: it allows a symlinkedOPENCLAW_HOMEtrusted root, but still rejects symlinked path components below that root.The merged PR body explicitly says:
That means the common default layout below still fails:
/Users/<user>/Users/<user>/.openclaw~/.openclawis a symlink → still rejected byassertNoSymlinkPathComponents()Current code path
On current
main,ensureDir()still calls:and
assertNoSymlinkPathComponents()still rejects the first symlinked component it sees below the resolved home root:For a normal setup where
resolveRequiredHomeDir()is/Users/funjim, the first traversed component is.openclaw, so the command still errors immediately.Suggested fix direction
Please restore support for a trusted first-level
~/.openclawsymlink, not just a symlinkedOPENCLAW_HOME.A reasonable approach is the broader design from
#64663:.openclawchild under the trusted home dir to be a symlinkrealpathSync.openclawtreeIn other words, the current fix handled:
OPENCLAW_HOME -> /some/real/home✅but still misses:
~/.openclaw -> ~/workspace/openclaw-config/openclaw/.openclaw❌Related