fix: Remove API key logging from eurusd_llm.py

- Mask API endpoint to prevent full URL exposure
- Change '✓' to '✓ Key set' for clearer status
- Add security comment explaining the fix
- Fixes GitHub Security Alert #7 (py/clear-text-logging-sensitive-data)

API keys are no longer logged, only their presence is indicated.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
TPTBusiness
2026-04-02 22:00:53 +02:00
parent 7b610a3547
commit 19078b7dd3
@@ -359,11 +359,13 @@ if __name__ == "__main__":
print("=== Multi-Provider LLM Fallback Test ===\n")
llm = MultiProviderLLM()
print("Konfigurierte Provider:")
for provider in llm.providers:
api_key_status = "" if provider.api_key else ""
print(f" {provider.priority}. {provider.name} ({api_key_status}) - {provider.endpoint[:50]}")
# Security fix: Don't log API keys, only show status and masked endpoint
api_key_status = "✓ Key set" if provider.api_key else "✗ No key"
masked_endpoint = provider.endpoint[:30] + "..." if len(provider.endpoint) > 30 else provider.endpoint
print(f" {provider.priority}. {provider.name} ({api_key_status}) - {masked_endpoint}")
# Test 1: Health Check für alle Provider
print("\n=== Test 1: Provider Health Check ===")