-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Description
Line 71 in 6baae24
if self.gmaps == '': |
Security Concern: Hardcoded API keys (like gmaps and googl) pose a potential security risk, especially in public repositories.
Suggestion: Remove the hardcoded keys and use environment variables as a secure alternative. This change will make the code safer and prevent accidental exposure of sensitive information.
Code Suggestion:
self.gmaps = config_trape.get('gmaps_api_key', os.getenv("GMAPS_API_KEY", ""))
self.googl = config_trape.get('gshortener_api_key', os.getenv("GOOGL_API_KEY", ""))
Benefit: Using environment variables avoids the exposure of sensitive keys in the codebase and allows better configuration management across different environments.
Metadata
Metadata
Assignees
Labels
No labels