Skip to content

Commit 521cded

Browse files
Potential fix for code scanning alert no. 32: Use of a broken or weak cryptographic hashing algorithm on sensitive data
hashing related fix Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Signed-off-by: Kumar Vel <11884941+Kumarvels@users.noreply.github.com>
1 parent bf4a35b commit 521cded

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cloudscale_apis/endpoints/security_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def get_saml_provider():
106106
def get_cache_key(operation: str, params: Dict) -> str:
107107
"""Generate cache key for operation"""
108108
param_str = json.dumps(params, sort_keys=True)
109-
return hashlib.md5(f"{operation}:{param_str}".encode()).hexdigest()
109+
return hashlib.sha256(f"{operation}:{param_str}".encode()).hexdigest()
110110

111111
def is_cache_valid(cache_key: str, max_age: int = 300) -> bool:
112112
"""Check if cache entry is still valid"""

0 commit comments

Comments
 (0)