Restructure compliance tools

This commit is contained in:
2026-03-27 15:22:07 +03:00
Unverified
parent f73c92c77c
commit 30ab4d9190
16 changed files with 14 additions and 11 deletions
@@ -3,7 +3,7 @@
FromChat compliance decryption tool entrypoint.
Run:
python scripts/compliance-decryption/main.py <command> ...
python scripts/compliance/decryption/main.py <command> ...
"""
from __future__ import annotations
@@ -8,7 +8,7 @@ def assets_source_dir() -> Path:
Directory that stores static templates (css/js) for report generation.
Layout:
scripts/compliance-decryption/
scripts/compliance/decryption/
main.py
assets/
report.css
@@ -7,7 +7,7 @@ The private key should be stored offline on an air-gapped machine.
Only the public key is provided to the messaging service via COMPLIANCE_PUBLIC_KEY env var.
Usage:
python3 scripts/generate_compliance_keypair.py
python3 scripts/compliance/keypair.py
Output:
- Prints the keypair to console
@@ -129,7 +129,7 @@ CONFIGURATION:
# Handle file saving
if args.save:
script_dir = Path(__file__).parent
project_root = script_dir.parent
project_root = script_dir.parent.parent
output_file = project_root / "compliance_keypair.txt"
full_output = f"""COMPLIANCE SYSTEM X25519 KEYPAIR
Binary file not shown.
+1 -1
View File
@@ -169,7 +169,7 @@ _do_backup_copy() {
run_gen_compliance() {
local tmp
tmp="$(mktemp "${TMPDIR:-/tmp}/fromchat-compliance.XXXXXX")"
"$VENV_PY" scripts/generate_compliance_keypair.py --emit-key-lines </dev/null >"$tmp"
"$VENV_PY" scripts/compliance/keypair.py --emit-key-lines </dev/null >"$tmp"
{
IFS= read -r _COMPLIANCE_PRIVATE_B64
IFS= read -r _COMPLIANCE_PUBLIC_B64