refactor(agent): 🛡️ 终极安全重构 - 阻断 FD 文件锁继承导致的任务死锁,并将深海声呐探针收编本地化执行,彻底铲除第三方 RCE 投毒风险

This commit is contained in:
hotyue
2026-04-24 10:28:38 +00:00
parent 8d16c549fc
commit 2c50c72fcb
2 changed files with 13 additions and 1 deletions
+11
View File
@@ -133,6 +133,17 @@ if [ -n "$REGION_JSON_FILE" ] && [ -f "$REGION_JSON_FILE" ]; then
fi
fi
# ==========================================================
# 5.5. 容灾更新深海声呐底层探针 (彻底消除第三方 RCE 依赖)
# ==========================================================
TMP_PROBE="/tmp/ip_sentinel_probe.sh"
$CURL_CMD "https://raw.githubusercontent.com/xykt/IPQuality/main/ip.sh" -o "$TMP_PROBE"
if [ -s "$TMP_PROBE" ]; then
mv "$TMP_PROBE" "${INSTALL_DIR}/core/ip_probe.sh"
chmod +x "${INSTALL_DIR}/core/ip_probe.sh"
log "Updater" "INFO " "✅ 深海声呐底层探针 (ip_probe.sh) 源文件安全对齐"
fi
# ==========================================================
# 6. 日志防满瘦身机制 (保留最近 2000 行)
# ==========================================================