fix(runtime): reject path-escaping skill entry points - #130
Draft
cursor[bot] wants to merge 1 commit into
Draft
Conversation
SKILL.md / override entry_point values could escape the skill directory via absolute or ../ paths and execute host scripts at sandbox level 1. Mirror exec_script containment with shared validation in core, metadata acceptance, run_skill, and the agent executor. Co-authored-by: EXboy <EXboys@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
entry_pointvalues could leave the skill directory via absolute paths or../components. At sandbox level 1,execute_unsandboxedinvoked the interpreter with that escaped path, allowing arbitrary host script execution.script_path_under_skill_dir/ensure_entry_point_within_skillhelpers inskilllite-core, wires them into metadata acceptance,run_skill, and the agent skill executor (parity with existingexec_scriptcontainment).scripts/main.pyworking; rejects absolute/traversal/drive/backslash forms fail-closed.Bug Impact
entry_point: ../../../tmp/pwn.py(file exists) thenSKILLLITE_SANDBOX_LEVEL=1 skilllite run <skill> '{}'printedOUTSIDE_EXECUTEDbefore the fix.Task Linkage
TASK-2026-078tasks/TASK-2026-078-runtime-entry-point-path-safety/Injected Specs
spec/verification-integrity.mdspec/task-artifact-language.mdspec/security-nonnegotiables.mdspec/rust-conventions.mdspec/testing-policy.mdspec/docs-sync.md(N/A: fail-closed validation only; no documented absolute entry_point support)spec/architecture-boundaries.md(reviewed; no boundary changes)Validation Evidence
cargo test -p skilllite-core path_validation→ 4 passedcargo test -p skilllite-core test_entry_point→ 3 passedcargo test -p skilllite-core→ 91 passedcargo test -p skilllite-commands→ 23 passedcargo clippy -p skilllite-core -p skilllite-agent --all-targets -- -D warnings→ cleancargo fmt --check -p skilllite-core -p skilllite-commands -p skilllite-agent→ cleanpython3 scripts/validate_tasks.py→ passedscripts/main.pystill worksRegression Scope
skilllite run/ agent skill execution overrides--cwd/ OpenClaw import dest-name (follow-up candidates)Docs Sync (EN/ZH)
Files:
Security Review Notes
SKILLLITE_*config semantics? No.Review Checklist
tasks/TASK-2026-078-runtime-entry-point-path-safety/TASK.mdsatisfiedtasks/TASK-2026-078-runtime-entry-point-path-safety/STATUS.mdupdated with latest progresstasks/TASK-2026-078-runtime-entry-point-path-safety/REVIEW.mdincludes merge readiness decisiontasks/board.mdstatus is up to date