openclaw - 💡(How to fix) Fix secrets audit: PLAINTEXT_FOUND false positive for codex-app-server marker in generated models.json

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

openclaw secrets audit reports PLAINTEXT_FOUND for providers.codex.apiKey in generated agents/*/agent/models.json files when the value is the OC-written marker string "codex-app-server". This is a false positive.

Error Message

secrets audit should recognise that entries in generated agents/*/agent/models.json files are OC-written non-secret markers (as documented in the SecretRef credential surface docs) and either suppress the finding or classify it as LEGACY_RESIDUE / INFO rather than PLAINTEXT_FOUND / warn. secrets audit emits a PLAINTEXT_FOUND (severity: warn) finding for every worker's generated models.json file:

Root Cause

The OC docs state:

For SecretRef-managed model providers, generated agents/*/agent/models.json entries persist non-secret markers (not resolved secret values) for apiKey/header surfaces. Marker persistence is source-authoritative: OpenClaw writes markers from the active source config snapshot (pre-resolution), not from resolved runtime secret values.

The Codex provider uses "codex-app-server" as its fixed authentication identifier — this is a non-secret marker string written by OC itself, not a user-supplied credential. The audit tool does not cross-reference against the known marker pattern and flags it as plaintext regardless.

Code Example

[PLAINTEXT_FOUND] agents/<worker>/agent/models.json:providers.codex.apiKey
models.json provider apiKey is stored as plaintext.
RAW_BUFFERClick to expand / collapse

Summary

openclaw secrets audit reports PLAINTEXT_FOUND for providers.codex.apiKey in generated agents/*/agent/models.json files when the value is the OC-written marker string "codex-app-server". This is a false positive.

Expected behaviour

secrets audit should recognise that entries in generated agents/*/agent/models.json files are OC-written non-secret markers (as documented in the SecretRef credential surface docs) and either suppress the finding or classify it as LEGACY_RESIDUE / INFO rather than PLAINTEXT_FOUND / warn.

Actual behaviour

secrets audit emits a PLAINTEXT_FOUND (severity: warn) finding for every worker's generated models.json file:

[PLAINTEXT_FOUND] agents/<worker>/agent/models.json:providers.codex.apiKey
models.json provider apiKey is stored as plaintext.

This fires for all agents/workers — 17 files in our case (main agent + 16 workers), all flagged with PLAINTEXT_FOUND.

Root cause

The OC docs state:

For SecretRef-managed model providers, generated agents/*/agent/models.json entries persist non-secret markers (not resolved secret values) for apiKey/header surfaces. Marker persistence is source-authoritative: OpenClaw writes markers from the active source config snapshot (pre-resolution), not from resolved runtime secret values.

The Codex provider uses "codex-app-server" as its fixed authentication identifier — this is a non-secret marker string written by OC itself, not a user-supplied credential. The audit tool does not cross-reference against the known marker pattern and flags it as plaintext regardless.

Steps to reproduce

  1. Enable the Codex provider (plugins.entries.codex.enabled: true)
  2. Run openclaw secrets audit
  3. Observe PLAINTEXT_FOUND for providers.codex.apiKey: "codex-app-server" in all generated agents/*/agent/models.json files

Environment

  • OpenClaw version: 2026.5.7
  • OS: Windows 10 (x64)
  • Node: v24.6.0

Suggested fix

The audit scanner should either:

  • Skip agents/*/agent/models.json apiKey fields that match known OC-internal marker strings (e.g. codex-app-server, ollama-local), or
  • Treat all generated models.json apiKey values as markers and emit INFO/LEGACY_RESIDUE rather than PLAINTEXT_FOUND when the corresponding openclaw.json source entry is a SecretRef

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix secrets audit: PLAINTEXT_FOUND false positive for codex-app-server marker in generated models.json