Files
FinalToken/tools/source_policy.py
schmidt.florian c75446008c core: publish self-hosted weekly dashboard and Proxmox deployment (#20)
Reuse existing weekly/reset analysis in an authenticated dashboard and local official CLI workers. Add safe Proxmox installation and updates, account-attributed history, and MIT distribution. Provider credentials stay owned by each CLI.

Closes #19
2026-11-15 11:24:55 +01:00

15 lines
968 B
Python

"""Shared publication/deployment policy for local runtime files; never read their contents."""
from pathlib import PurePosixPath
PRIVATE_NAMES = {"server.json", "worker.json", "server.env", "worker.env", "transport-keys.json", "dashboard-key", "worker-key",
"auth.json", ".credentials.json", "snapshot.json", "fleet.json", "history.json", "history.state.json",
"history.journal.jsonl", "usage.json", "profile.json", "settings.json", "id_rsa", "id_ecdsa", "id_ed25519"}
def is_private_path(path):
p = PurePosixPath(str(path).replace("\\", "/").lower())
return (p.name in PRIVATE_NAMES or p.name == ".env" or p.name.startswith(".env.") and p.name != ".env.example"
or p.suffix in (".env", ".key", ".pem", ".pfx", ".p12")
or any(part in (".claude", ".codex", ".ssh", ".aws", ".azure") for part in p.parts)
or len(p.parts) > 1 and p.parts[0] in ("data", "state", "logs", "runs", "history"))