fix(skills): reject symlinked SKILL.md on save (#4240) (#4245)

* fix(skills): reject symlinked skill saves

* chore(release): stamp v0.51.434 (Release OU) for #4240 skill-save symlink guard

---------

Co-authored-by: 峯岸 亮 <1920071390@campus.ouj.ac.jp>
Co-authored-by: nesquena-hermes <agent@nesquena-hermes>
This commit is contained in:
authored and GitHub committed 2026-06-15 04:22:17 -07:00
1 parent 60ad36dab7
commit 4abf3bf5ef
3 files changed
+68

No files matched your search

+2
View File
@@ -16602,6 +16602,8 @@ def _handle_skill_save(handler, body):
return bad(handler, "Invalid skill path")
skill_dir.mkdir(parents=True, exist_ok=True)
skill_file = skill_dir / "SKILL.md"
if skill_file.is_symlink():
return bad(handler, "Cannot save to a symlinked skill file")
skill_file.write_text(body["content"], encoding="utf-8")
return j(handler, {"ok": True, "name": skill_name, "path": str(skill_file)})