From f9f4d8f9fdc1b10e298cee33d62200c074d5db42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=BF=E7=94=B7?= Date: Tue, 28 Apr 2026 15:53:54 +0800 Subject: [PATCH] =?UTF-8?q?chore(ci):=20=E8=BF=9C=E7=A8=8B=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E8=BE=93=E5=87=BA=E5=A2=9E=E5=8A=A0=E8=84=B1=E6=95=8F?= =?UTF-8?q?=E8=BF=87=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Made-with: Cursor --- scripts/moicen-remote-readonly-check.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/moicen-remote-readonly-check.sh b/scripts/moicen-remote-readonly-check.sh index 6e8c830..704e5bf 100755 --- a/scripts/moicen-remote-readonly-check.sh +++ b/scripts/moicen-remote-readonly-check.sh @@ -4,6 +4,13 @@ set -euo pipefail echo "=== moicen readonly verify $(date -u +%Y-%m-%dT%H:%M:%SZ) ===" +sanitize_output() { + sed -E \ + -e 's/(Bearer )[A-Za-z0-9._-]+/\1/g' \ + -e 's/((token|password|passwd|secret)[=: ]+)[^[:space:]]+/\1/Ig' \ + -e 's/[0-9]{1,3}(\.[0-9]{1,3}){3}//g' +} + HTYPROC_ENV="${HOME}/works/huike-back/htyproc/.env" if [[ ! -r "$HTYPROC_ENV" ]]; then echo "ERROR: cannot read ${HTYPROC_ENV}" @@ -27,9 +34,9 @@ echo "--- Redis ---" redis-cli ping echo "--- htyproc log (tail, last 50 lines) ---" -tail -n 50 "${HOME}/works/huike-back/htyproc/htyproc.nohup.log" 2>/dev/null || echo "(no htyproc log)" +tail -n 50 "${HOME}/works/huike-back/htyproc/htyproc.nohup.log" 2>/dev/null | sanitize_output || echo "(no htyproc log)" echo "--- OpenResty error.log (tail, last 30 lines) ---" -tail -n 30 /usr/local/openresty/nginx/logs/error.log 2>/dev/null || echo "(no nginx error log)" +tail -n 30 /usr/local/openresty/nginx/logs/error.log 2>/dev/null | sanitize_output || echo "(no nginx error log)" echo "=== moicen readonly verify OK ==="