fix: copy SKILL.md as hard copy in dist-runtime to prevent realpath security check failure (#64166)

SKILL.md files were created as symlinks pointing to dist/, causing
realpathSync() in resolveContainedSkillPath to resolve outside the
dist-runtime/ directory. The security check then rejected the path,
resulting in all 23 plugin skills being skipped at load time.

Add SKILL.md to the shouldCopyRuntimeFile whitelist so it gets a hard
copy instead of a symlink, matching the existing behavior for
package.json and plugin.json files.

Fixes #64138
This commit is contained in:
Sliverp
2026-04-10 15:41:28 +08:00
committed by GitHub
parent d9ad995b77
commit 1bbe66450e

View File

@@ -79,7 +79,8 @@ function shouldCopyRuntimeFile(sourcePath) {
relativePath.endsWith("/openclaw.plugin.json") ||
relativePath.endsWith("/.codex-plugin/plugin.json") ||
relativePath.endsWith("/.claude-plugin/plugin.json") ||
relativePath.endsWith("/.cursor-plugin/plugin.json")
relativePath.endsWith("/.cursor-plugin/plugin.json") ||
relativePath.endsWith("/SKILL.md")
);
}