Repository navigation
[codex] fix: omit provider api keys from generated models.json - #84566
piaoguodeafei wants to merge 1 commit into
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed June 30, 2026, 4:20 PM ET / 20:20 UTC. Summary PR surface: Source +20, Tests +84. Total +104 across 4 files. Reproducibility: yes. Source inspection shows current generated catalog planning still carries Review metrics: 2 noteworthy metrics.
Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Land one current-main Layer 1 fix that redacts plaintext generated catalog secrets across root and plugin-owned outputs while preserving or migrating supported credentials and non-secret markers. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection shows current generated catalog planning still carries Is this the best way to solve the issue? No, not as written. Serialization-boundary redaction is the right layer, but deleting every Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 640258d7b31d. Label changesLabel justifications:
Evidence reviewedPR surface: Source +20, Tests +84. Total +104 across 4 files. View PR surface stats
Security concerns:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
ClawSweeper PR egg 🎁 Pass real behavior proof to wake the egg and unlock a hatchable treat. Where did the egg go?
|
|
Thanks for tackling the generated credential exposure. We’re consolidating this cluster under #88562 and the maintainer-owned direction in #87166. This branch removes every provider Closing this incorrect competing implementation. The underlying security issue remains open; the current-main fix needs a non-secret marker with explicit runtime-auth semantics and coverage for both root and plugin-owned generated catalogs. Thank you for the contribution. |
Summary
Fixes #11829.
This prevents generated
models.jsonfiles from persisting provider-levelapiKeyfields. The sanitization happens at the serialization boundary, after provider discovery/normalization/merge, so provider catalog metadata remains available while credentials stay out of the prompt-visible model catalog.Covered cases:
OPENAI_API_KEYmodels.jsonin merge modeRoot cause
planOpenClawModelsJsonWithDeps()built the final provider catalog and serialized it directly. Earlier steps could addapiKeyvalues or preserve them from an existingmodels.json, so secrets or secret markers were written back into the agent model catalog.Validation
corepack pnpm exec oxfmt --check --threads=1 src/agents/models-config.plan.ts src/agents/models-config.applies-config-env-vars.test.ts src/agents/models-config.runtime-source-snapshot.test.ts src/agents/models-config.skips-writing-models-json-no-env-token.test.tscorepack pnpm check:test-typesnode scripts/test-projects.mjs $(rg --files src/agents | rg 'models-config.*\.test\.ts$')