fix(sandbox): add credentials directory to writable state layout#1126
fix(sandbox): add credentials directory to writable state layout#1126latenighthackathon wants to merge 4 commits intoNVIDIA:mainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughModified Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
OpenClaw creates ~/.openclaw/credentials at runtime for storing auth tokens (WhatsApp, Telegram, OAuth). Since .openclaw is locked read-only (Landlock + root-owned DAC), the mkdir fails with EACCES. Add credentials to the .openclaw-data writable layout with a symlink, matching the pattern used for agents and other writable paths. Signed-off-by: latenighthackathon <latenighthackathon@users.noreply.github.com>
Head branch was pushed to by a user without write access
3039ed2 to
ef490bc
Compare
Remove the Dockerfile.base credentials directory changes to avoid overlap with PR NVIDIA#1126 which already addresses that fix. Signed-off-by: Dongni Yang <dongniy@nvidia.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
OpenClaw creates
~/.openclaw/credentialsat runtime for storing auth tokens (WhatsApp, Telegram, OAuth). Since.openclawis locked read-only via Landlock + root-owned DAC, themkdirfails withEACCES: permission denied.Same root cause pattern as the memory directory bug fixed in #1061.
Scope note: This PR addresses the
credentialsdirectory EACCES (error 3 in #1114). Theopenclaw.json.*.tmpEACCES errors (errors 1-2 in #1114) are a separate issue — OpenClaw's atomic config write creates temp files in the locked.openclaw/directory, which requires a different fix (either redirecting temp writes to.openclaw-data/or unlockingopenclaw.jsonownership to the sandbox user).Related Issue
Partially addresses #1114 (fixes credential directory access; openclaw.json temp file writes remain)
Changes
/sandbox/.openclaw-data/credentialsto the writable state directory layout inDockerfile.base/sandbox/.openclaw/credentials->/sandbox/.openclaw-data/credentialsmemory,agents,extensions, etc.Testing
npx prek run --all-filespasses (all checks pass; hadolint and ESLint failures are pre-existing on main)npm testpasses (38 passed, 1 failed — same baseline as main)Executed:
make checkequivalent in Docker (Linux): shellcheck, shfmt, hadolint, ESLint, gitleaks, markdownlint, Vitest all passhadolint Dockerfile.basepasses clean (no warnings from our change)Checklist
Signed-off-by: latenighthackathon latenighthackathon@users.noreply.github.com
Summary by CodeRabbit