Skip to content

[Bug]: skills.update echoes raw apiKey and env secrets in gateway response #66769

Description

@ai-hpc

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

The gateway skills.update method stores secret-bearing fields under skills.entries.<skillKey>, but its success response returns the updated entry without redaction. If apiKey or secret values in env are supplied, they are echoed back in plaintext in the RPC response. This can leak secrets into Control UI websocket traffic, client logs, session transcripts, or any wrapper that records gateway responses.

Steps to reproduce

  1. Connect to the gateway with a client that has operator.admin scope.
  2. Call skills.update with a payload like:
{
  "skillKey": "demo-skill",
  "apiKey": "secret-api-key-123",
  "env": {
    "GEMINI_API_KEY": "secret-env-key-456",
    "BRAVE_REGION": "us"
  }
}
  1. Inspect the successful RPC response payload.
  2. Observe that payload.config.apiKey and payload.config.env.GEMINI_API_KEY are returned in plaintext.

Expected behavior

skills.update should never echo secret-bearing values in plaintext. The response should either:

  • redact sensitive fields such as apiKey and secret-like env values, or
  • avoid returning the updated config object entirely and only return non-sensitive confirmation metadata.

Actual behavior

skills.update returns:

  • config.apiKey in plaintext
  • config.env[...] values in plaintext, including secret values

The current response path returns config: current directly instead of a redacted view.

OpenClaw version

2026.4.14

Operating system

Ubuntu 24.04

Install method

No response

Model

Not model-specific

Provider / routing chain

OpenClaw gateway -> skills.update handler -> config write -> gateway RPC response -> client / Control UI / websocket consumer

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingbug:behaviorIncorrect behavior without a crash

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions