Opus finding
Misleading comment: 'Validate skill name to prevent injection' under-describes what is actually validated
- dashboard/app/api/skills/[name]/run/route.ts:14-16
The comment frames the regex as anti-injection, but because `execFile` (not `exec`) is used, shell injection is already impossible regardless of the regex. The regex is really an allow-list on skill identifiers (used as a workflow input). The comment may mislead future maintainers into removing `execFile` in favor of `exec` believing the regex protects them. Also, `var` and `model` sanitization strips characters silently rather than rejecting bad input, which can produce a subtly different value than the user submitted (e.g., a model name like `gpt-4o:latest` becomes `gpt-4olatest`).
Recommendation
Either reject invalid input with 400 (preferred, symmetric with skill-name handling) or update the comment to clarify these are input allow-lists, not shell-injection defenses, and that `execFile` is the actual barrier.