#!/usr/bin/env python3 """Current-source endpoint/privilege inventory; no installed state is accessed. Records exact lexical sites and source hashes. Dynamic arguments are explicitly unresolved here, not misrepresented as a complete inferred authorization policy. """ import argparse import hashlib import json from pathlib import Path import re ROOT=Path(__file__).resolve().parents[1] PRIVILEGED={'sudo','nmcli','ip','iw','rfkill','reboot','shutdown','modprobe','mount','umount','chown','chmod','systemctl','timedatectl','udevadm'} def mask_source(text): """Keep offsets/newlines while masking Rust comments and string literals.""" out=list(text);strings=[];i=0 while i=0 else '')) elif text[i]=='"': end=i+1 while end=0 and (semi<0 or brace