mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-21 16:02:36 +00:00
Two follow-ups on the URL validation: - `validate_git_repo_url` accepted `ssh://-oProxyCommand=<cmd>/path` (a dash-led host inside an allowed scheme) and relied on git to reject it. git's ssh transport passes the host to `ssh` as an argument, so on an older git this is command execution. Reject an authority whose host starts with `-`, for both the scheme'd and scp-like forms, so validation no longer depends on the worker's git version. - `get_git_repo_full_head_commit_hash` ran `git ls-remote` with the worker's full inherited environment (no `env_clear`), so its transport-helper/ssh children could read worker secrets such as `DATABASE_URL`. Scrub the env down to PROXY/PATH/TZ/GIT_SSH_COMMAND, matching `clone_repo`. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>