git resource can leak sensitive repository URLs in converge_by output
Author: ZauberbutterCreated Aug 13, 2026Updated Aug 13, 2026
LabelsStatus: Untriaged
Description
When git is used with sensitive true and an HTTP(S) repository URL containing credentials, Chef redacts the URL in some log messages but still exposes it in the converge_by message used by setup_remote_tracking_branches.
Chef Version
client version: 18.2.7
Platform Version
Debian 13
Replication Case
- Define a
gitresource with an HTTP(S) URL that includes credentials. - Set
sensitive trueon the resource. - Run Chef and inspect converge output.
Client Output
* git[example] action sync
- set up remote tracking branches for https://user:[email protected]/repository.git at origin
- fetch updates for originExpected behavior
Sensitive repository URLs should be redacted from all log output, including converge_by descriptions.
Actual behavior
lib/chef/provider/git.rb uses the raw remote_url in:
converge_by("set up remote tracking branches for #{remote_url} at #{remote_name}")This can reveal credentials even when the resource is marked sensitive.
Source: chef/chef