Merge pull request #53 from adv3nt3/fix/md5-usedforsecurity-miners

fix: mark MD5 as non-security in miner drawer ID generation
This commit is contained in:
Ben Sigman
2026-04-07 13:51:52 -07:00
committed by GitHub
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -356,7 +356,7 @@ def mine_convos(
chunk_room = chunk.get("memory_type", room) if extract_mode == "general" else room
if extract_mode == "general":
room_counts[chunk_room] += 1
drawer_id = f"drawer_{wing}_{chunk_room}_{hashlib.md5((source_file + str(chunk['chunk_index'])).encode()).hexdigest()[:16]}"
drawer_id = f"drawer_{wing}_{chunk_room}_{hashlib.md5((source_file + str(chunk['chunk_index'])).encode(), usedforsecurity=False).hexdigest()[:16]}"
try:
collection.add(
documents=[chunk["content"]],
+1 -1
View File
@@ -414,7 +414,7 @@ def add_drawer(
collection, wing: str, room: str, content: str, source_file: str, chunk_index: int, agent: str
):
"""Add one drawer to the palace."""
drawer_id = f"drawer_{wing}_{room}_{hashlib.md5((source_file + str(chunk_index)).encode()).hexdigest()[:16]}"
drawer_id = f"drawer_{wing}_{room}_{hashlib.md5((source_file + str(chunk_index)).encode(), usedforsecurity=False).hexdigest()[:16]}"
try:
collection.add(
documents=[content],