Skip to content

Commit

Permalink
Fix code scanning alert no. 9: Clear-text logging of sensitive inform…
Browse files Browse the repository at this point in the history
…ation

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
  • Loading branch information
lalo and github-advanced-security[bot] authored Dec 12, 2024
1 parent 1f3ac32 commit 5438501
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions eureka_ml_insights/secret_management/secret_key_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ def get_key_from_azure(key_name: str, key_vault_url: str, credential_func=lambda
"""
logging.getLogger("azure").setLevel(logging.ERROR)
try:
logging.info(f"Trying to get the key from Azure Key Vault {key_vault_url} using provided func")
logging.info("Trying to get the key from Azure Key Vault using provided func")
credential = credential_func(additionally_allowed_tenants=["*"])
client = SecretClient(vault_url=key_vault_url, credential=credential)
retrieved_key = client.get_secret(key_name)
return retrieved_key.value
except Exception as e:
logging.info(f"Failed to get the key from Azure Key Vault {key_vault_url} using provided func")
logging.info("Failed to get the key from Azure Key Vault using provided func")
logging.info("The error is caused by: {}".format(e))
return None

Expand Down

0 comments on commit 5438501

Please sign in to comment.