Repository navigation
Strip resolved provider api keys from models.json - #84689
Trojan7210 wants to merge 2 commits into
Conversation
|
Codex review: found issues before merge. Reviewed June 30, 2026, 10:31 PM ET / 02:31 UTC. Summary PR surface: Source +82, Tests +121. Total +203 across 3 files. Reproducibility: yes. at source level: current main serializes plugin-owned provider maps directly into generated plugin catalog sidecars, and the PR proof covers only the older root writer path. I did not run a mutating repro because this review is read-only. 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:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Land one current-main fix that redacts plaintext provider credentials before the root/plugin catalog split or in both writers, preserves documented non-secret markers, and explicitly implements the chosen upgrade path for existing plaintext keys. Do we have a high-confidence way to reproduce the issue? Yes, at source level: current main serializes plugin-owned provider maps directly into generated plugin catalog sidecars, and the PR proof covers only the older root writer path. I did not run a mutating repro because this review is read-only. Is this the best way to solve the issue? No, not as submitted. Sanitizing generated catalog output is the right layer, but the branch must cover current-main plugin sidecars and settle the existing-plaintext upgrade policy before it is the best fix. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 816038e97a5d. Label changesLabel justifications:
Evidence reviewedPR surface: Source +82, Tests +121. Total +203 across 3 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 ✨ Hatched: 🥚 common Brave Branchling Hatch commandComment Hatchability rules:
Rarity: 🥚 common. What is this egg doing here?
|
|
Thanks for the implementation and writer-path proof. We’re consolidating this credential-persistence cluster under #88562 and the maintainer-owned direction in #87166. This branch sanitizes the older root Closing this competing implementation rather than carrying an incomplete security contract forward. The bug remains open in #88562; a current fix must cover both outputs and prove request auth and upgrade behavior. Thank you for the proof and regression cases. |
Summary
apiKeyvalues with the non-secret SecretRef marker before writing plannedmodels.jsoncontents.Real behavior proof
Behavior or issue addressed: Generated
models.jsonshould not persist a runtime-resolved providerapiKey; it should write the existing non-secret marker while preserving the provider/model entry.Real environment tested: Local checkout of
openclaw/openclawat PR head3410456354, Nodev26.1.0, pnpm11.1.0, Linux x86_64, temporary agent dir/tmp/openclaw-real-proof-qmMXI3.Exact steps or command run after this patch:
ensureOpenClawModelsJsonwriter with a provider config containingapiKey: "sk-live-proof-value".<temp-agent-dir>/models.jsonfile.providers.liveproof.apiKeyand checked whether the serialized output contained the input key.Evidence after fix:
Observed result after fix:
models.jsonwas written withproviders.liveproof.apiKeyequal tosecretref-managed; the serialized file did not containsk-live-proof-value.What was not tested: Full OpenClaw gateway runtime with a live external provider request was not exercised; this proof covers the actual
models.jsonwriter path and serialization result.Validation
node scripts/run-vitest.mjs run --config test/vitest/vitest.agents.config.ts src/agents/models-config.applies-config-env-vars.test.ts src/agents/models-config.merge.test.ts-> 22 passedgit diff --checkRefs #11829
Payment or bounty payout details can be coordinated privately if this is accepted.