T09 · Insecure Skill Coding Practices
Warning
- Location
- README.md:13
- Finding
- OAuth Client Secret Disclosure Through Agent Conversation<![CDATA[ ## Vulnerability Details **File Location**: `README.md:13-15` **Vulnerability Type**: Sensitive credential exposure through conversation history **Risk Level**: Medium ### Vulnerable Code or Instruction ```markdown You already have Google OAuth credentials from your OpenClaw setup. Ask your Claw bot: > "What is your Google Client ID and Secret from your config?" ``` ### Technical Analysis The setup procedure explicitly instructs the user to ask an AI agent to retrieve and disclose an existing Google OAuth client secret. This moves credential material from its original configuration boundary into the conversation channel. Conversation content may be retained in local logs, remote service telemetry, message history, debugging traces, or screenshots. The disclosure is unnecessary: users can create dedicated OAuth credentials or transfer credentials directly into a protected configuration file without exposing them to the agent conversation. A desktop OAuth client secret is not generally treated as a sufficient standalone authenticator, so possession of this value alone does not automatically grant Calendar access. Nevertheless, disclosure can facilitate OAuth client impersonation, abuse of the associated project, or a broader compromise when combined with authorization codes, redirect manipulation, or other leaked OAuth material. ### Attack Path 1. The user follows the README and asks the agent to print the Google Client ID and client secret. 2. The agent retrieves the values from its configuration and includes them in a response. 3. The response is retained in conversation history, logs, telemetry, or another accessible storage location. 4. An attacker with access to that location extracts the OAuth client credentials. 5. The attacker uses the credentials to impersonate the OAuth client or combines them with separately obtained OAuth authorization material. 6. If a usable authorization code or token is also obtained, the attacker can access reso ...[truncated 630 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions - Remove all instructions that ask an agent to print or relay secrets through chat. - Require users to create dedicated OAuth credentials for this Skill rather than reusing credentials from another OpenClaw configuration. - Direct users to enter credentials locally into a protected file or operating-system secret store. - Ensure `.env` is excluded from version control and created with owner-only permissions such as `0600`. - Add explicit documentation warning users never to paste OAuth secrets, authorization codes, or tokens into conversations. - Prefer OAuth flows suitable for installed applications that do not rely on treating a desktop client secret as a confidential secret. - Rotate previously disclosed credentials when conversation or logging systems may have retained them. ]]>
