fix(codex): exclude codex-app-server synthetic apiKey from secrets audit#69581
Conversation
The Codex extension uses the literal string "codex-app-server" as a hardcoded placeholder apiKey in provider.ts, since the real authentication is managed by the app-server transport itself. The secrets audit currently reports this as a real plaintext leak (PLAINTEXT_FOUND), producing a false positive for any user who has configured the Codex harness. Declare it as a plugin-owned non-secret marker in the Codex plugin manifest, so it flows through the standard `listKnownNonSecretApiKeyMarkers()` path alongside `ollama-local`, `lmstudio-local`, `gcp-vertex-credentials`, and `minimax-oauth`. Also extends the existing `model auth markers` unit tests to lock in the behavior. Fixes openclaw#69511
Greptile SummaryThis PR fixes a false-positive Confidence Score: 5/5Safe to merge — purely additive manifest entry and regression test, no logic changes. The change follows the exact same pattern as four sibling plugins, the marker string is verified to match the hardcoded literal in provider.ts, no audit logic was modified, and both the direct-check and manifest-aggregation code paths are covered by the new test assertions. No files require special attention. Reviews (1): Last reviewed commit: "fix(codex): exclude codex-app-server syn..." | Re-trigger Greptile |
|
The three red checks look unrelated to the change in this PR:
Happy to rebase or push a trivial commit to retrigger — just did the latter. Let me know if there's anything I should adjust in the PR itself. |
|
LGTM, merging 👍 |
* 'main' of https://github.com/openclaw/openclaw: fix(agents): enforce subagent envelope inheritance on ACP child sessions [AI-assisted] (openclaw#69383) fix(tui): arm streaming watchdog on every delta, not only visible ones (openclaw#69338) fix(codex): exclude codex-app-server synthetic apiKey from secrets audit (openclaw#69581)
…dit (#69581) * fix(codex): exclude codex-app-server synthetic apiKey from secrets audit The Codex extension uses the literal string "codex-app-server" as a hardcoded placeholder apiKey in provider.ts, since the real authentication is managed by the app-server transport itself. The secrets audit currently reports this as a real plaintext leak (PLAINTEXT_FOUND), producing a false positive for any user who has configured the Codex harness. Declare it as a plugin-owned non-secret marker in the Codex plugin manifest, so it flows through the standard `listKnownNonSecretApiKeyMarkers()` path alongside `ollama-local`, `lmstudio-local`, `gcp-vertex-credentials`, and `minimax-oauth`. Also extends the existing `model auth markers` unit tests to lock in the behavior. Fixes #69511 * ci: retrigger checks (no-op) (cherry picked from commit 081da17)
…dit (openclaw#69581) * fix(codex): exclude codex-app-server synthetic apiKey from secrets audit The Codex extension uses the literal string "codex-app-server" as a hardcoded placeholder apiKey in provider.ts, since the real authentication is managed by the app-server transport itself. The secrets audit currently reports this as a real plaintext leak (PLAINTEXT_FOUND), producing a false positive for any user who has configured the Codex harness. Declare it as a plugin-owned non-secret marker in the Codex plugin manifest, so it flows through the standard `listKnownNonSecretApiKeyMarkers()` path alongside `ollama-local`, `lmstudio-local`, `gcp-vertex-credentials`, and `minimax-oauth`. Also extends the existing `model auth markers` unit tests to lock in the behavior. Fixes openclaw#69511 * ci: retrigger checks (no-op)
…dit (openclaw#69581) * fix(codex): exclude codex-app-server synthetic apiKey from secrets audit The Codex extension uses the literal string "codex-app-server" as a hardcoded placeholder apiKey in provider.ts, since the real authentication is managed by the app-server transport itself. The secrets audit currently reports this as a real plaintext leak (PLAINTEXT_FOUND), producing a false positive for any user who has configured the Codex harness. Declare it as a plugin-owned non-secret marker in the Codex plugin manifest, so it flows through the standard `listKnownNonSecretApiKeyMarkers()` path alongside `ollama-local`, `lmstudio-local`, `gcp-vertex-credentials`, and `minimax-oauth`. Also extends the existing `model auth markers` unit tests to lock in the behavior. Fixes openclaw#69511 * ci: retrigger checks (no-op)
…dit (openclaw#69581) * fix(codex): exclude codex-app-server synthetic apiKey from secrets audit The Codex extension uses the literal string "codex-app-server" as a hardcoded placeholder apiKey in provider.ts, since the real authentication is managed by the app-server transport itself. The secrets audit currently reports this as a real plaintext leak (PLAINTEXT_FOUND), producing a false positive for any user who has configured the Codex harness. Declare it as a plugin-owned non-secret marker in the Codex plugin manifest, so it flows through the standard `listKnownNonSecretApiKeyMarkers()` path alongside `ollama-local`, `lmstudio-local`, `gcp-vertex-credentials`, and `minimax-oauth`. Also extends the existing `model auth markers` unit tests to lock in the behavior. Fixes openclaw#69511 * ci: retrigger checks (no-op)
…dit (openclaw#69581) * fix(codex): exclude codex-app-server synthetic apiKey from secrets audit The Codex extension uses the literal string "codex-app-server" as a hardcoded placeholder apiKey in provider.ts, since the real authentication is managed by the app-server transport itself. The secrets audit currently reports this as a real plaintext leak (PLAINTEXT_FOUND), producing a false positive for any user who has configured the Codex harness. Declare it as a plugin-owned non-secret marker in the Codex plugin manifest, so it flows through the standard `listKnownNonSecretApiKeyMarkers()` path alongside `ollama-local`, `lmstudio-local`, `gcp-vertex-credentials`, and `minimax-oauth`. Also extends the existing `model auth markers` unit tests to lock in the behavior. Fixes openclaw#69511 * ci: retrigger checks (no-op)
…dit (openclaw#69581) * fix(codex): exclude codex-app-server synthetic apiKey from secrets audit The Codex extension uses the literal string "codex-app-server" as a hardcoded placeholder apiKey in provider.ts, since the real authentication is managed by the app-server transport itself. The secrets audit currently reports this as a real plaintext leak (PLAINTEXT_FOUND), producing a false positive for any user who has configured the Codex harness. Declare it as a plugin-owned non-secret marker in the Codex plugin manifest, so it flows through the standard `listKnownNonSecretApiKeyMarkers()` path alongside `ollama-local`, `lmstudio-local`, `gcp-vertex-credentials`, and `minimax-oauth`. Also extends the existing `model auth markers` unit tests to lock in the behavior. Fixes openclaw#69511 * ci: retrigger checks (no-op)
Summary
apiKey: "codex-app-server"(defined inextensions/codex/provider.ts) asPLAINTEXT_FOUND, even though it's not a real secret — Codex's real authentication lives inside the app-server transport.openclaw secrets audit, eroding trust in the signal.codex-app-serveras a plugin-owned non-secret marker inextensions/codex/openclaw.plugin.json, and extended the existingmodel-auth-markersunit tests to lock in the behavior. No code changes — just the manifest and a regression test.isNonSecretApiKeyMarkerimplementation, any other plugin's manifest. The fix flows through the same path already used byollama-local,lmstudio-local,gcp-vertex-credentials, andminimax-oauth.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Root Cause
codex-app-serverapiKey being declared as a non-secret marker on the plugin manifest, while sibling plugins (Ollama, LMStudio, Anthropic-Vertex, Minimax) already do so.models.jsonregisters it throughnonSecretAuthMarkers. (Out of scope for this PR, but could be a follow-up guardrail.)src/secrets/audit.ts:412) already guards plaintext reporting with!isNonSecretApiKeyMarker(apiKey), which in turn callslistKnownNonSecretApiKeyMarkers()— a function that aggregates markers from the plugin manifest registry vialoadPluginManifestRegistry({ cache: true }).plugins.flatMap(p => p.nonSecretAuthMarkers). Adding the marker to the Codex manifest is sufficient.Regression Test Plan
src/agents/model-auth-markers.test.tsisNonSecretApiKeyMarker("codex-app-server")returnstrue.listKnownNonSecretApiKeyMarkers()includes"codex-app-server"after the manifest registry is loaded.src/agents/model-auth-markers.test.tsalready covers the four peer markers (ollama-local,lmstudio-local,gcp-vertex-credentials,minimax-oauth). This PR extends those same tests with the Codex case.User-visible / Behavior Changes
openclaw secrets auditno longer reportsPLAINTEXT_FOUNDfor Codex's syntheticproviders.codex.apiKeyvalue inmodels.json.Diagram
N/A — no flow change, only an additional entry in an existing allow-list loaded at plugin-registry init time.
Security Impact (required)
codex-app-serveris a synthetic literal that has always been hardcoded inextensions/codex/provider.ts; this PR just declares it as a known non-secret marker. No tokens are read, stored, or transmitted differently.Repro + Verification
Environment
extensions/codex)openclaw secrets auditCLImodels.jsoncontainingproviders.codex.apiKey = "codex-app-server"(the default after Codex discovery)Steps
models.jsonpersists the provider).openclaw secrets audit.code: PLAINTEXT_FOUND,jsonPath: providers.codex.apiKey.Expected
PLAINTEXT_FOUNDentry for the Codex provider, becausecodex-app-serveris a synthetic non-secret marker.Actual (before this PR)
After this PR
ollama-local,lmstudio-local,gcp-vertex-credentials, andminimax-oauth.Evidence
src/agents/model-auth-markers.test.tsfail onmain(witharrayContaining([…, "codex-app-server", …])missing) and pass with this PR applied.Human Verification (required)
src/secrets/audit.tsto confirm the plaintext guard already callsisNonSecretApiKeyMarker.src/agents/model-auth-markers.tsto confirmlistKnownNonSecretApiKeyMarkers()aggregates bundled plugin manifests.loadPluginManifestRegistry(checkedsrc/plugins/manifest-registry.ts).codex-app-serveris used as the synthetic value inextensions/codex/provider.ts(lines 88, 89, 117).python3 -c "import json; json.load(...)").cache: true) is loaded at startup; no code path readsnonSecretAuthMarkersoutside the registry aggregation, so no additional sites need updating.pnpm test:unitlocally (no pnpm install on this machine); CI will run the suite.Review Conversations
Compatibility / Migration
Risks and Mitigations
codex-app-serverin a non-Codex context and ends up whitelisted.origin === "bundled"plugins only, so third-party plugins cannot injection-whitelist additional markers.