#15296: Harden config redaction defaults; add explicit --show-secrets opt-in
cli
stale
size: XS
Cluster:
Config Redaction Improvements
## Summary
This PR hardens config secret handling in a **CLI-only** way:
- `openclaw config get` now returns redacted values by default.
- `--show-secrets` is the explicit unsafe opt-in for local debugging.
## Changes
- Updated `openclaw config get` to read from a redacted config view by default.
- Added `--show-secrets` flag to reveal raw values intentionally.
- Added a warning when `--show-secrets` is used.
- Reverted the earlier gateway-side `showSecrets` path (schema/server/test), so gateway `config.get` remains redacted-only.
## Why
The goal is secure-by-default behavior for routine config inspection while still preserving an explicit local escape hatch for trusted debugging workflows.
## Security Notes
- Secrets remain redacted by default.
- Unredacted output now requires explicit local CLI intent (`--show-secrets`).
- No remote/API toggle exists for unredacted `config.get` responses.
## Testing
- Verified CLI path behavior:
- default `config get` => redacted values
- `config get --show-secrets` => raw values with warning
- Confirmed gateway path stays redacted (gateway `showSecrets` support removed).
## Backward Compatibility
- Scripts relying on plaintext output from `openclaw config get` must now pass `--show-secrets`.
- Gateway clients are unaffected except that no new `showSecrets` parameter is supported.
Most Similar PRs
#23654: security(cli): redact sensitive values in config get output
by SleuthCo · 2026-02-22
73.2%
#11208: fix(config): prevent __OPENCLAW_REDACTED__ corruption on config writes
by janckerchen · 2026-02-07
65.3%
#22980: Gateway: add manual secrets reload command
by joshavant · 2026-02-21
63.9%
#15757: feat(security): add hardening gap audit checks
by saurabhsh5 · 2026-02-13
62.7%
#21901: fix: guard writeConfigFile against persisting redaction sentinels
by Protocol-zero-0 · 2026-02-20
62.6%
#16779: feat: add `openclaw sessions scrub` command and doctor check for se...
by akoscz · 2026-02-15
62.2%
#23364: Gateway: add risk-ack interlock for dangerous Control UI flags
by bmendonca3 · 2026-02-22
62.0%
#21055: security(cli): gate systemPromptReport behind --debug flag
by richvincent · 2026-02-19
61.9%
#22846: Config: add secret ref schema and redaction foundations
by joshavant · 2026-02-21
61.7%
#21100: Security/Gateway: require explicit break-glass env for Control UI b...
by bmendonca3 · 2026-02-19
61.7%