test(release): make account report mode check portable
Some checks failed
contract-gates / contract-gates (push) Has been cancelled
docs-gate / docs-gate (push) Has been cancelled

This commit is contained in:
lili 2026-07-23 03:07:37 -07:00
parent bcb7fec906
commit 8a81b37348

View File

@ -131,8 +131,8 @@ reset_state_probe
--output "$report"
[ -f "$report" ] && [ -f "$report.sig" ] || fail '没有生成报告及 detached signature'
[ "$(stat -f '%Lp' "$report" 2>/dev/null || stat -c '%a' "$report")" = 600 ] || fail '报告权限不是 0600'
[ "$(stat -f '%Lp' "$report.sig" 2>/dev/null || stat -c '%a' "$report.sig")" = 600 ] || fail '签名权限不是 0600'
[ "$(stat -c '%a' "$report" 2>/dev/null || stat -f '%Lp' "$report")" = 600 ] || fail '报告权限不是 0600'
[ "$(stat -c '%a' "$report.sig" 2>/dev/null || stat -f '%Lp' "$report.sig")" = 600 ] || fail '签名权限不是 0600'
openssl pkeyutl -verify -pubin -inkey "$TMP_DIR/public.pem" -rawin \
-in "$report" -sigfile "$report.sig" >/dev/null 2>&1 || fail 'detached signature 无法验证'
grep -q 'root@100.64.0.7' "$TMP_DIR/ssh-args" || fail 'SSH 目标不是固定 mini-desktop'