mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-18 16:46:17 +00:00
CodeQL alert #43 (go/clear-text-logging) flagged that headers flow to log.Printf in pkg/service/proxy/proxy.go. The existing implementation only redacted when LoggingProxy.Redact was true — an opt-in. CodeQL is right to flag this: the safety floor for credential-bearing headers should not depend on caller configuration. Split the sensitive-header list into two: * alwaysSensitiveHeaders — Authorization, Proxy-Authorization, Cookie, Set-Cookie, X-Api-Key, X-Bose-Token. Redacted unconditionally, regardless of LoggingProxy.Redact. * sensitiveHeaders — kept as a compatibility alias pointing at the same list, and still gated on Redact for any future use cases that want *additional* opt-in redaction beyond the floor. Behaviour change is strict tightening: nothing that was previously hidden becomes visible, and credentials that would have been logged when Redact was false are now hidden by default. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>