Skip to content

fix(logger): filter sensitive headers before logging#16

Open
manzoliric wants to merge 1 commit into
masterfrom
fix/filter-sensitive-headers-in-logger
Open

fix(logger): filter sensitive headers before logging#16
manzoliric wants to merge 1 commit into
masterfrom
fix/filter-sensitive-headers-in-logger

Conversation

@manzoliric

Copy link
Copy Markdown

Contexto

Headers sensíveis (Authorization, Ocp-Apim-Subscription-Key) estavam sendo logados em plaintext via stdout, ficando visíveis no GCP Cloud Logging.

O que muda

  • Adiciona constante SENSITIVE_HEADERS em Eezee::Logger
  • Adiciona método filter_headers que substitui valores sensíveis por [FILTERED] antes de montar o hash de log
  • Matching case-insensitive para os nomes dos headers
  • Bump de versão: 1.0.171.0.18

Plano de testes

  • bundle exec rspec spec/eezee/logger_spec.rb — specs existentes passam + novos casos cobrem filtragem
  • Verificar que headers não-sensíveis (Content-Type, Token) continuam aparecendo nos logs normalmente
  • Verificar que Authorization e Ocp-Apim-Subscription-Key aparecem como [FILTERED]

🤖 Generated with Claude Code

Authorization and Ocp-Apim-Subscription-Key were being logged in
plaintext via stdout, visible in GCP Cloud Logging.

Adds SENSITIVE_HEADERS constant and filter_headers method that replaces
sensitive header values with [FILTERED] before building the log hash.
Matching is case-insensitive.

Bumps version to 1.0.18.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants