Files
felhom.eu/documentation/audits/end-dates-list-2026-11-11/tools/host-pin.py
T
admin 978666dde3
gates / gates (push) Successful in 2m2s
lists: the Clock list (70 jobs) and the End-dates list (39 things), 9 register rows, 4 decisions
Read-only review of every job on a timer and of everything that ends on a date,
with measurements from the three test boxes. Nothing ends in the next 14 days.
Register 236 -> 245 (R-1379..R-1387), pointer lines on twelve rows, D76-D79 in
STATUS.md. Part C: felhom-agent's clone address holds no token now; the other
clones wait for the operator's yes. R-1035's 4-week check moved to 2026-11-18
(operator read needed).

Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
2026-11-11 11:54:42 +01:00

18 lines
928 B
Python

# host-pin.py — read-only: does the agent's pinned Proxmox fingerprint equal the certificate Proxmox serves?
# Prints the certificate's end date and yes/no. It prints no value from agent.json.
import json, subprocess, re
c = json.load(open("/etc/felhom-agent/agent.json"))
def find(o, p=""):
if isinstance(o, dict):
for k, v in o.items():
if "ingerprint" in k and isinstance(v, str):
yield p + k, v
else:
yield from find(v, p + k + ".")
fp = subprocess.run(["openssl", "x509", "-in", "/etc/pve/local/pve-ssl.pem", "-noout", "-fingerprint", "-sha256", "-enddate"], capture_output=True, text=True).stdout
leaf = re.sub(r"[^0-9a-f]", "", fp.split("\n")[0].split("=")[1].lower())
print("pve-ssl", fp.strip().split("\n")[1])
for k, v in find(c):
n = re.sub(r"[^0-9a-f]", "", v.lower())
print(k, "set" if n else "EMPTY", "equals pve-ssl leaf:", n == leaf)