Summary
server.ts:1637-1685 — When creating a template (POST /v1/templates), the workDir field is not validated against validateWorkDir. A template could store a path-traversal payload that would only be caught later when the template is instantiated.
Files Affected
Suggested Fix
Validate workDir at template creation time using validateWorkDirWithConfig, or document that validation happens at instantiation.
Code review finding from full codebase audit (2026-04-04)
Summary
server.ts:1637-1685— When creating a template (POST /v1/templates), theworkDirfield is not validated againstvalidateWorkDir. A template could store a path-traversal payload that would only be caught later when the template is instantiated.Files Affected
src/server.ts:1637-1685Suggested Fix
Validate
workDirat template creation time usingvalidateWorkDirWithConfig, or document that validation happens at instantiation.Code review finding from full codebase audit (2026-04-04)