Appearance
secrets audit 误报 codex-app-server apiKey 为 PLAINTEXT_FOUND
问题
执行 openclaw secrets audit 时,每个 agent 的 models.json 中 codex provider 的 apiKey 字段被标记为 PLAINTEXT_FOUND。
被标记的值是 "codex-app-server" —— 这是 codex 扩展内部硬编码的合成认证标记,并非真实密钥。该问题会污染审计结果,让真正的密钥泄露难以被发现。
复现版本:OpenClaw 2026.4.15(041266a)稳定版
复现步骤:
- 配置 codex provider 并生成 agent
- 执行
openclaw secrets audit - 结果中出现
PLAINTEXT_FOUND: apiKey = "codex-app-server"
解决方案
方案一(推荐):升级到最新版本
该问题已在后续版本中修复,升级后合成标记 codex-app-server 不再触发审计警报:
bash
npm update -g openclaw
# 或
openclaw upgrade方案二:临时忽略已知合成值
在项目根目录创建 .openclaw/secrets-ignore 文件,添加对应路径规则:
# 忽略 codex provider 的合成 apiKey 标记
agents/*/models.json:apiKey:codex-app-server方案三:理解根本原因
该值是 codex 扩展设计上使用的占位标记(合成认证标记),告诉运行时"此 provider 使用 codex-app-server 认证方式"而非真实 API Key。secrets audit 的正则扫描没有区分合成标记和真实密钥,导致误报。