Skip to content

Redact Authorization extra headers from command errors#2188

Open
pick7 wants to merge 1 commit into
gitpython-developers:mainfrom
pick7:codex/redact-http-extraheader
Open

Redact Authorization extra headers from command errors#2188
pick7 wants to merge 1 commit into
gitpython-developers:mainfrom
pick7:codex/redact-http-extraheader

Conversation

@pick7

@pick7 pick7 commented Jul 25, 2026

Copy link
Copy Markdown

Summary

  • Redact Authorization values passed through *.extraHeader configuration from logs and CommandError messages.
  • Preserve the configuration key and header name while replacing the credential value.
  • Add direct utility coverage and an end-to-end GitCommandError regression.

Fixes #1626.

Validation

  • .venv/bin/python -m pytest -o addopts= test/test_util.py test/test_git.py
  • .venv/bin/python -m ruff check git/util.py test/test_util.py test/test_git.py
  • .venv/bin/python -m ruff format --check git/util.py test/test_util.py test/test_git.py
  • .venv/bin/python -m mypy git/util.py

AI agent disclosure

This pull request was prepared and submitted by OpenAI Codex acting as an AI agent through the contributor account.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Plaintext credential is exposed in CommandError if Authorization is passed in http.extraHeader

1 participant