openclaw - ✅(Solved) Fix config.get leaks raw secrets via sourceConfig/runtimeConfig paths [2 pull requests, 1 comments, 2 participants]

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…
GitHub stats
openclaw/openclaw#66626Fetched 2026-04-15 06:25:15
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Timeline (top)
cross-referenced ×2commented ×1mentioned ×1referenced ×1

The config.get tool/command has inconsistent secret redaction across its different output paths. While parsed and resolved paths properly redact sensitive values (showing [REDACTED] or similar), the sourceConfig and runtimeConfig paths return raw unredacted values of all secrets loaded from the EnvironmentFile / .env.

Root Cause

The config.get tool/command has inconsistent secret redaction across its different output paths. While parsed and resolved paths properly redact sensitive values (showing [REDACTED] or similar), the sourceConfig and runtimeConfig paths return raw unredacted values of all secrets loaded from the EnvironmentFile / .env.

Fix Action

Fixed

PR fix notes

PR #66697: fix(config): correct sourceConfig/runtimeConfig assignment in redactConfigSnapshot

Description (problem / solution / changelog)

Summary

Fix critical credential leak in config.get gateway handler. The sourceConfig and runtimeConfig fields in the returned snapshot had their redaction assignments swapped.

Security impact: Any skill, plugin, or LLM turn that calls config.get could read all API keys, tokens, and secrets in plaintext via the sourceConfig or runtimeConfig paths, enabling credential exfiltration via prompt injection or malicious skills.

Root Cause

In src/config/redact-snapshot.ts, the return statement of redactConfigSnapshot assigned:

  • sourceConfig: redactedResolvedwrong (should be redactedConfig)
  • runtimeConfig: redactedConfigwrong (should be redactedResolved)

sourceConfig holds the runtime-shaped config (same as config), so it should be redacted as redactedConfig.
runtimeConfig holds the resolved config (post ${ENV} substitution), so it should be redacted as redactedResolved.

Changes

  • src/config/redact-snapshot.ts: Swap sourceConfig and runtimeConfig in both return statements (valid and invalid snapshot paths)
  • src/config/redact-snapshot.test.ts: Update two toBe reference-equality assertions that tested the buggy behavior; both now correctly assert sourceConfig === config and runtimeConfig === resolved

Test coverage

  • All 38 redact-snapshot tests pass
  • All 20 server.config-patch tests pass

Fixes #66626 (security)

Changed files

  • extensions/feishu/src/monitor.account.ts (modified, +1/-1)
  • extensions/feishu/src/sequential-key.test.ts (modified, +20/-0)
  • extensions/feishu/src/sequential-key.ts (modified, +1/-1)
  • extensions/qqbot/src/gateway.ts (modified, +1/-1)
  • extensions/qqbot/src/utils/text-parsing.test.ts (modified, +4/-0)
  • extensions/qqbot/src/utils/text-parsing.ts (modified, +2/-2)
  • package.json (modified, +2/-7)
  • scripts/openclaw-npm-release-check.ts (modified, +4/-6)
  • src/config/redact-snapshot.test.ts (modified, +9/-4)
  • src/config/redact-snapshot.ts (modified, +4/-4)
  • src/memory-host-sdk/host/embeddings.ts (modified, +1/-1)

PR #66739: fix(config): correct sourceConfig/runtimeConfig assignment in redactConfigSnapshot

Description (problem / solution / changelog)

Summary

Re-create #66697 which was auto-closed by r: too-many-prs policy. The fix is identical.

Fix critical credential leak in config.get gateway handler. The sourceConfig and runtimeConfig fields had their redaction assignments swapped.

Security impact: Any skill, plugin, or LLM turn that calls config.get could read all API keys/tokens in plaintext.

Root Cause

In src/config/redact-snapshot.ts, the return statement of redactConfigSnapshot assigned:

  • sourceConfig: redactedResolved ← wrong (should be redactedConfig)
  • runtimeConfig: redactedConfig ← wrong (should be redactedResolved)

Changes

  • src/config/redact-snapshot.ts: Swap sourceConfig and runtimeConfig in both return statements
  • src/config/redact-snapshot.test.ts: Update two toBe reference-equality assertions

Test coverage

  • All 38 redact-snapshot tests pass
  • All 20 server.config-patch tests pass

Fixes #66626

Changed files

  • extensions/qqbot/src/utils/text-parsing.test.ts (modified, +4/-0)
  • extensions/qqbot/src/utils/text-parsing.ts (modified, +2/-2)
  • src/config/redact-snapshot.test.ts (modified, +4/-4)
  • src/config/redact-snapshot.ts (modified, +4/-4)
  • src/plugins/uninstall.test.ts (modified, +19/-0)
  • src/plugins/uninstall.ts (modified, +11/-3)
RAW_BUFFERClick to expand / collapse

Summary

The config.get tool/command has inconsistent secret redaction across its different output paths. While parsed and resolved paths properly redact sensitive values (showing [REDACTED] or similar), the sourceConfig and runtimeConfig paths return raw unredacted values of all secrets loaded from the EnvironmentFile / .env.

Reproduction Steps

  1. Configure OpenClaw with secrets in .env (API keys, tokens, etc.) loaded via EnvironmentFile= in systemd
  2. Call config.get and inspect the sourceConfig or runtimeConfig path in the response
  3. Observe that all secret values are returned in plaintext

Expected Behavior

All output paths of config.get (parsed, resolved, sourceConfig, runtimeConfig) should consistently redact secret values. Secrets should never be returned in plaintext regardless of which path is accessed.

Actual Behavior

  • parsed path: secrets are redacted (correct)
  • resolved path: secrets are redacted (correct)
  • sourceConfig path: secrets are returned in plaintext (bug)
  • runtimeConfig path: secrets are returned in plaintext (bug)

Security Impact

This is a credential leak vector. Any installed skill, plugin, or LLM turn that calls config.get can read all API keys, tokens, and secrets in plaintext via sourceConfig or runtimeConfig. A malicious skill or a prompt injection attack could exfiltrate credentials by calling config.get and reading the unredacted paths.

Since OpenClaw injects skill outputs into LLM context, leaked secrets could also end up in API calls to model providers, logged in session transcripts, or forwarded to third-party services.

Environment

  • OpenClaw running on Linux (Ubuntu) via systemd
  • Secrets loaded via EnvironmentFile= pointing to .env
  • Affects any deployment where secrets are present in the environment

extent analysis

TL;DR

Modify the config.get tool to consistently redact secret values across all output paths, including sourceConfig and runtimeConfig, to prevent credential leaks.

Guidance

  • Review the config.get implementation to identify why sourceConfig and runtimeConfig paths are not redacting secrets, while parsed and resolved paths are.
  • Verify that the redaction logic is applied uniformly to all output paths, considering the loading of secrets via EnvironmentFile and .env.
  • Consider implementing a global redaction mechanism that applies to all config paths, ensuring consistency and security.
  • Test the modified config.get tool with various input scenarios to ensure secrets are properly redacted across all output paths.

Example

No code snippet is provided due to the lack of implementation details in the issue.

Notes

The provided information does not specify the exact implementation of config.get or the redaction mechanism, making it challenging to provide a precise fix. However, the guidance points should help in identifying and addressing the inconsistency in secret redaction.

Recommendation

Apply a workaround by modifying the config.get tool to redact secrets in sourceConfig and runtimeConfig paths, as this is a critical security issue that can lead to credential leaks.

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 - ✅(Solved) Fix config.get leaks raw secrets via sourceConfig/runtimeConfig paths [2 pull requests, 1 comments, 2 participants]