Proxy password written in clear text to the execution log at debug level
The Proxy option is documented as accepting credentials (http://user:pass@server:port, socks5://user:pass@server:port). When a job runs with debug log level, winrm-exec.py logs the raw proxy value:
log.debug("winrmproxy: " + str(winrmproxy))
(added in 9b0f72f). This bypasses common._redact_proxy_url(), which configure_proxy() already uses for its info-level messages, so the proxy password ends up in the Rundeck execution log, readable by anyone who can view that execution.
Steps to reproduce
- Set the node executor's Proxy option to
http://user:secret@proxy:3128. - Run any command on a WinRM node with the job/command log level set to Debug.
- Look at the execution log output.
Actual
winrmproxy: http://user:secret@proxy:3128
Expected
The credentials are redacted, consistent with the info-level "Connecting to ... via PROXY (...)" line:
winrmproxy: http://proxy:3128
winrm-filecopier.py and winrm-check.py do not have an equivalent raw-proxy log line; they only go through configure_proxy().
I reproduced this on a local Rundeck 6.4.0-SNAPSHOT server against a stub WinRM endpoint, with the proxy set as the winrm-proxy node attribute.