本卡屬 FR-166(母卡 CM-母卡號(建完補)),卡 P2-4,階段 P2 離線能做事、批 2。只改 evidence-agent。依賴:無。
網路除錯的執行器:讀這台的網路資訊、十項診斷(每項固定逾時、不經 shell)、算這次總共幾次連線、判讀規則、出報告。
純新模組、無 UI 依賴;但 subprocess 安全、逾時、噪音計算要嚴,判斷多
new(新模組)+reuse:TLS 用既有 cloud_trust.describe_tls_failure、時鐘用 clock_skew、目標守門用既有 allowed_targets.is_allowed();PDF 走既有 WeasyPrint 路徑
repo:~/Projects/Billows/Audit-Manager/evidence-agent
新開:core/netdiag/__init__.py
新開:dashboard.py
新開:probes/{ping,dns,port,tls,http,ssh,mtu,traceroute,mtr,cloud}.py
新開:verdict.py
新開:report.py
新開:limits.py
細節在 design.md 對應段(~/Projects/Billows/Audit-Manager/compliance-manager-be/docs/features/FR-166-2610-agent-standalone-console/design.md §5,開 design.html 看導覽),本段只列本卡要做到的點:
dashboard.py:ip -j/resolvectl/ss/ethtool/nmcli,容器形態回 unavailable;回 {info, lamps} 分開。probes/*.py 十支:共同 run([...], shell=False, timeout=固定)、輸出 64KB 上限、regex 解析、目標過 allowed_targets.is_allowed 或三固定例外、間隔 1 秒、同目標每分鐘 3 輪;逾時照 design §5.3;TLS 用 default context 捕 SSLCertVerificationError;HTTP httpx 不跟跨 host 轉址。limits.py:estimate(selection) 照 D20 公式;等級;埠 >5 拒。verdict.py:fixture 驅動規則表;cloud 序列三種結論。report.py:JSON/txt/PDF(既有 WeasyPrint 路徑,html.escape)。grep shell=True/CERT_NONE/nmap|tcpdump|iperf 為 0。每支 probe shell=False、參數陣列、逾時固定(grep 守衛);limits.estimate() 對全勾回 >100 次、等級高;埠 >5 拒;verdict 對固定 fixture 回確定結論;grep CERT_NONE 為 0;未同步只放 cloud 序列
對照雛形:~/Projects/Billows/Audit-Manager/compliance-manager-be/docs/features/FR-166-2610-agent-standalone-console/prototype/index.html(上方「跟著走」)。