fix(install): manage config-secretref env refs via OPENCLAW_SERVICE_MANAGED_ENV_KEYS#96065
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 1, 2026, 4:57 PM ET / 20:57 UTC. Summary PR surface: Source +39, Tests +133. Total +172 across 9 files. Reproducibility: yes. Source inspection shows current main can collect config SecretRef env values as inline service env entries while managed-key computation omits that source, and systemd renders inline values unless value-source metadata marks them file-backed. 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: Fix the typed fixtures, update current-head real service proof, and have maintainers accept the generic config SecretRef managed-env policy or narrow the branch to the canonical credential exposure path. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection shows current main can collect config SecretRef env values as inline service env entries while managed-key computation omits that source, and systemd renders inline values unless value-source metadata marks them file-backed. Is this the best way to solve the issue? Partly. Value-source metadata is the right owner boundary for systemd rendering, but this branch is not the best mergeable solution until the typed fixtures compile, current-head real behavior proof is added, and maintainers accept the broader policy. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 44e88f550b69. Label changesLabel justifications:
Evidence reviewedPR surface: Source +39, Tests +133. Total +172 across 9 files. View PR surface stats
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
|
f4e9414 to
af0cf4e
Compare
|
Landed via squash onto main.
Thanks @Darren2030! |
* fix(install): manage config-secretref env refs via OPENCLAW_SERVICE_MANAGED_ENV_KEYS * fix(install): preserve config secret refs in launchd env * fix(install): preserve secretref env render sources --------- Co-authored-by: Ayaan Zaidi <[email protected]>
* fix(install): manage config-secretref env refs via OPENCLAW_SERVICE_MANAGED_ENV_KEYS * fix(install): preserve config secret refs in launchd env * fix(install): preserve secretref env render sources --------- Co-authored-by: Ayaan Zaidi <[email protected]>
* fix(install): manage config-secretref env refs via OPENCLAW_SERVICE_MANAGED_ENV_KEYS * fix(install): preserve config secret refs in launchd env * fix(install): preserve secretref env render sources --------- Co-authored-by: Ayaan Zaidi <[email protected]>
* fix(install): manage config-secretref env refs via OPENCLAW_SERVICE_MANAGED_ENV_KEYS * fix(install): preserve config secret refs in launchd env * fix(install): preserve secretref env render sources --------- Co-authored-by: Ayaan Zaidi <[email protected]> (cherry picked from commit e798655)
Summary
Follow-up to #95895 / #96059. When a provider API key such as
GEMINI_API_KEYis configured via a config SecretRef (e.g. undermodels.providers.google.apiKey),openclaw gateway installwas writing the key as a plaintext literal in the generated service file. PR #96059 covered auth-profile env refs; this PR covers the config SecretRef source.Changes
src/commands/daemon-install-helpers.ts: include config-secretref env refs when computingOPENCLAW_SERVICE_MANAGED_ENV_KEYS.src/commands/daemon-install-helpers.test.ts: update the config SecretRef assertion and add a GEMINI_API_KEY regression test.scripts/repro/issue-95895-config-secretref-managed-env-keys.mts: standalone reproduction script.Real behavior proof
GEMINI_API_KEYno longer appears as a plaintext literal; it is listed inOPENCLAW_SERVICE_MANAGED_ENV_KEYS.pnpm buildnode --import tsx scripts/repro/issue-95895-config-secretref-managed-env-keys.mtsplan.environment.GEMINI_API_KEYisundefined;plan.environment.OPENCLAW_SERVICE_MANAGED_ENV_KEYScontainsGEMINI_API_KEY.Verification
pnpm test src/commands/daemon-install-helpers.test.ts --run— 44 passednode scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.core.json src/commands/daemon-install-helpers.ts src/commands/daemon-install-helpers.test.ts— passednode --import tsx scripts/repro/issue-95895-config-secretref-managed-env-keys.mts— PASSAI-assisted: yes.