Skip to content

fix(openclaw): reject path-escaping import skill names - #131

Draft
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/critical-bug-investigation-9b67
Draft

fix(openclaw): reject path-escaping import skill names#131
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/critical-bug-investigation-9b67

Conversation

@cursor

@cursor cursor Bot commented Aug 3, 2026

Copy link
Copy Markdown

Summary

  • Fixes critical path traversal in skilllite import-openclaw-skills (and claw migrate skill import): SKILL.md frontmatter name was joined under the skills root without single-segment validation, so absolute or ../ names could install outside skills/.
  • Adds shared validate_skill_dir_name / skill_dir_under_root helpers (aligned with open PR fix(security): reject path-escaping skill directory names #125) and fail-closed skip of unsafe destinations before copy.
  • Adds regression tests for relative and absolute escape attempts while keeping safe sibling skills importable.

Task Linkage

  • Task ID: TASK-2026-079
  • Task folder: tasks/TASK-2026-079-openclaw-import-dest-name-safety/

Injected Specs

  • spec/verification-integrity.md
  • spec/task-artifact-language.md
  • spec/security-nonnegotiables.md
  • spec/rust-conventions.md
  • spec/testing-policy.md
  • spec/docs-sync.md (reviewed; no docs needed — fail-closed validation only)

Validation Evidence

  • Commands executed:
    • cargo test -p skilllite-core path_validation
    • cargo test -p skilllite-commands import_
    • cargo fmt --check
    • cargo clippy -p skilllite-core -p skilllite-commands --all-targets -- -D warnings -A dead_code -A clippy::question_mark -A clippy::useless_borrows_in_formatting
    • python3 scripts/validate_tasks.py
  • Key results:
    • path_validation: 3 passed
    • import_: 4 passed (relative + absolute escape skipped; safe skill still installed)
    • fmt clean; clippy clean with known main allow categories
    • task validation: Task validation passed (71 task folders checked)

Regression Scope

Docs Sync (EN/ZH)

  • Not needed
  • Updated EN + ZH docs
  • Files:
    • N/A

Review Checklist

  • Acceptance criteria in tasks/TASK-2026-079-openclaw-import-dest-name-safety/TASK.md satisfied
  • tasks/TASK-2026-079-openclaw-import-dest-name-safety/STATUS.md updated with latest progress
  • tasks/TASK-2026-079-openclaw-import-dest-name-safety/REVIEW.md includes merge readiness decision
  • tasks/board.md status is up to date

Security review notes

  • What security policy changed, and why is it needed? Fail-closed single-segment validation for OpenClaw import destination names before skills-root joins; prevents filesystem escape via malicious frontmatter during import.
  • Is default behavior more permissive? No — stricter validation only.
  • Does this affect SKILLLITE_* config semantics or backward compatibility? No env/config change; only rejects previously unsafe multi-segment/absolute names.
  • Were tests and EN/ZH docs updated? Tests yes; docs not required.
Open in Web View Automation 

cursoragent and others added 2 commits August 3, 2026 11:05
Validate OpenClaw SKILL.md frontmatter names as a single path segment
before joining under the skills root, so absolute or ../ names cannot
escape during import-openclaw-skills / claw migrate skill copy.

Co-authored-by: EXboy <EXboys@users.noreply.github.com>
Finalize TASK-2026-079 evidence, review readiness, and board status
after path-validation and import regression tests passed.

Co-authored-by: EXboy <EXboys@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant