fix(integrity): enforce ledger provenance checks, delete fabricated data, and isolate forbidden hashes

This commit is contained in:
omkarande14
2026-09-28 17:13:24 +05:30
parent 3fca5e91e6
commit 3e1342fad0
8 changed files with 480 additions and 133 deletions
+8 -8
View File
@@ -39,14 +39,14 @@ class LeakageScreening:
@classmethod
def _load_forbidden_hashes(cls) -> Tuple[str, set]:
cfg_path = Path("config/forbidden_hashes.json")
if cfg_path.exists():
try:
with open(cfg_path, "r", encoding="utf-8") as f:
data = json.load(f)
return data.get("salt", ""), set(data.get("hashes", []))
except Exception:
pass
for p in [Path("data_private/config/forbidden_hashes.json"), Path("config/forbidden_hashes.json")]:
if p.exists():
try:
with open(p, "r", encoding="utf-8") as f:
data = json.load(f)
return data.get("salt", ""), set(data.get("hashes", []))
except Exception:
pass
return "", set()
@classmethod