From d385c42c05d047a534612529aa1ccd8e4df70bdb Mon Sep 17 00:00:00 2001 From: shaahji Date: Thu, 9 Jul 2026 13:26:33 -0700 Subject: [PATCH] Suppress CodeQL [SM02167] Computed hash is used solely for creating uniques directory names in cache, not a security-sensitive usage. --- olive/passes/diffusers/lora.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/olive/passes/diffusers/lora.py b/olive/passes/diffusers/lora.py index c96df23527..aa3d25b2b9 100644 --- a/olive/passes/diffusers/lora.py +++ b/olive/passes/diffusers/lora.py @@ -941,7 +941,8 @@ def _prepare_class_images( output_dir = Path(class_data_dir) else: cache = OliveCache.from_cache_env() - prompt_hash = hashlib.md5(class_prompt.encode()).hexdigest()[:8] + # Used solely for creating unique directory names in cache, not a security-sensitive usage. + prompt_hash = hashlib.md5(class_prompt.encode()).hexdigest()[:8] # CodeQL [SM02167] Justification above output_dir = cache.get_cache_dir() / "class_images" / prompt_hash output_dir.mkdir(parents=True, exist_ok=True)