Audit fixes: LIVE symbols/fills/expiry/pending, security harden, add 更新说明.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-26 22:28:03 +08:00
parent bc8d1fb127
commit f48ea5bbcc
18 changed files with 1389 additions and 1069 deletions
+3 -5
View File
@@ -22,14 +22,12 @@ def upsert_env_keys(updates: dict[str, str]) -> Path | None:
return target
def mask_secret(raw: str | None, *, keep: int = 4) -> str | None:
"""脱敏:****末尾;过短则全部打码"""
def mask_secret(raw: str | None, *, keep: int = 0) -> str | None:
"""脱敏:仅返回是否已配置(不再泄露末尾字符)"""
s = (raw or "").strip()
if not s:
return None
if len(s) <= keep:
return "*" * len(s)
return "*" * max(4, len(s) - keep) + s[-keep:]
return "********"
def okx_keys_configured(s=None) -> bool: