Tighten skill name allowlist to exclude '.' (path traversal)

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
zumayaaustin 2026-07-08 23:13:23 +00:00
parent 5a7bc1639d
commit b7c7c254b0
1 changed files with 1 additions and 1 deletions

View File

@ -133,7 +133,7 @@ def load_json_file(path: Path, default=_MISSING):
except (json.JSONDecodeError, OSError, UnicodeDecodeError) as e:
raise HTTPException(500, f"Failed to read {path.name}: {e}")
SKILL_NAME_RE = re.compile(r"^[A-Za-z0-9._-]+$")
SKILL_NAME_RE = re.compile(r"^[A-Za-z0-9_-]+$")
def skill_dir(name: str) -> Path:
"""Resolve a user-supplied skill name to its directory, rejecting path traversal."""