#16269·chef

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

  1. Define a git resource with an HTTP(S) URL that includes credentials.
  2. Set sensitive true on the resource.
  3. 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 origin

Expected 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:

ruby
converge_by("set up remote tracking branches for #{remote_url} at #{remote_name}")

This can reveal credentials even when the resource is marked sensitive.