mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-19 16:03:29 +00:00
- Remove the #!exec branch entirely (RCE backdoor — Claude/Codex/Pi all flagged shell injection via file contents) - Validate workspace and filename for empty / path-separator / .. before joining (path traversal — all three reviewers flagged) - Switch to tokio::fs and make the function async (Claude + Pi flagged blocking I/O in a likely async caller) - Canonicalize base and target as defense-in-depth and enforce target stays under the per-workspace configs directory - Tighten the doc comment: drop the #!exec wording and note the caller must verify admin access Leaving the dead_code/unwired pub fn as-is for now — the helper will land together with the admin endpoint that consumes it in a follow-up, which keeps this PR's diff minimal. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>