Files
windmill/backend/windmill-common
Ruben FiszelandClaude Opus 4.8 bced402f33 harden: reject dash-led git hosts and scrub env on ansible ls-remote
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>
2026-08-19 12:19:28 +00:00
..