fix: mark 'hashlib.md5' as 'usedforsecurity=False'

Closes #255.
This commit is contained in:
Tres Seaver 2026-01-21 12:14:56 -05:00 committed by GitHub
parent 4bdfb180d5
commit e9746a1785
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -514,7 +514,7 @@ class HaikuRAG:
raise ValueError(f"File does not exist: {source_path}")
uri = source_path.absolute().as_uri()
md5_hash = hashlib.md5(source_path.read_bytes()).hexdigest()
md5_hash = hashlib.md5(source_path.read_bytes(), usedforsecurity=False).hexdigest()
# Get content type from file extension (do before early return)
content_type, _ = mimetypes.guess_type(str(source_path))