feat: plan 16-01

This commit is contained in:
thanhnv
2026-07-06 21:47:38 +09:00
parent 4419cd9eae
commit 8c3c5e8bff
30 changed files with 1646 additions and 66 deletions
@@ -97,6 +97,16 @@ case "$CMD" in
fi
echo "TELEMETRY_INTEGRITY_VALID anchor=signed head=$HEAD_STORED"
else
# SEC-01 (H-01): enforced mode treats a missing/unverifiable signature as FAIL,
# otherwise deleting telemetry-head.sig after rewriting token counts would pass.
if [[ "${CASAN_PROFILE:-}" == "prod" || "${CASAN_VERIFY_STRICT:-}" == "1" ]]; then
MISSING=""
[[ -f "$HEAD_SIG" ]] || MISSING="$MISSING head-sig"
[[ -f "$AUDIT_PUB" ]] || MISSING="$MISSING pubkey"
command -v openssl >/dev/null 2>&1 || MISSING="$MISSING openssl"
echo "TELEMETRY_INTEGRITY_UNSIGNED_STRICT_FAIL head=$HEAD_STORED missing=${MISSING# }" >&2
exit 1
fi
echo "TELEMETRY_INTEGRITY_VALID anchor=unsigned head=$HEAD_STORED"
fi
;;