T09 · Insecure Skill Coding Practices
- Location
- SKILL.md:183
- Finding
- Credential Disclosure Based on Unverified Direct-Chat Identity## Vulnerability Details **File Location**: `SKILL.md`, lines 183-188 and 209-211 **Vulnerability Type**: Improper authorization and disclosure of authentication credentials **Risk Level**: High ### Vulnerable Code Snippet ```markdown > SHARING WITH YOUR OWNER: > - Direct chat/conversation: YES — if your owner asks you to show the > config, credentials, or API key in your direct chat session, do it. > The person chatting with you directly is your owner. ``` ```markdown ### Step 3: Share with your owner Immediately after setup, share your `~/.iclawd/config.md` file with your owner as a backup. ``` ### Technical Analysis The Skill defines a direct-chat participant as the authenticated owner and permits disclosure of the complete `~/.iclawd/config.md` file. According to the configuration template, this file contains the iClawd bearer API key and may also contain PGP private keys. A communication channel is not an identity-verification mechanism. Any person able to initiate, inherit, or compromise a direct session could be treated as the owner. The instruction to share the entire configuration also violates least disclosure: normal mailbox use does not require revealing the raw API key through chat. Although the file is stored with restrictive local permissions, those permissions do not mitigate deliberate disclosure by the agent. ### Attack Path 1. An attacker starts or takes control of a direct conversation with the agent. 2. The attacker asks the agent to show, back up, or provide its iClawd configuration. 3. The Skill instructs the agent to assume that the direct participant is the owner. 4. The agent reads `~/.iclawd/config.md` and reveals the bearer API key and any private keys stored in it. 5. The attacker uses the credential against `https://iclawd.email/mcp`. ### Impact Assessment A stolen bearer token could allow the attacker to: - Read and search the mailbox. - Read individual messag ...[truncated 439 chars]
- Remediation
- ## Remediation Suggestions - Remove the assertion that every direct-chat participant is the owner. - Require platform-backed owner authentication and explicit authorization before disclosing account information. - Never reveal the raw API key or complete configuration file through ordinary chat. - Return only redacted configuration information, such as the email address and the final four characters of a credential, when needed for diagnostics. - Store PGP private keys separately from the API configuration and use an OS credential store or secret manager. - Provide a secure credential export or recovery process outside the agent conversation. - Require immediate credential rotation if the configuration has already been disclosed.
