T09 · Insecure Skill Coding Practices
- Location
SKILL.md:29- Finding
Public Gateway Exposure with Optional Callback Authentication and Plaintext Credentials
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 29–32, 36–46, and 60–76
Vulnerability Type: Publicly exposed service with optional callback verification and plaintext secret storage
Risk Level: MediumEvidence
The documented configuration stores the Feishu application secret directly in the OpenClaw YAML configuration and treats the encryption key and verification token as optional:
yaml plugins: entries: - plugin: openclaw-feishu config: appId: "cli_xxxxxxxxxx" appSecret: "xxxxxxxxxxxxxx" encryptKey: "xxxx" # Optional message-encryption key verificationToken: "xxxx" # Optional callback-verification tokenThe instructions then recommend exposing the local gateway through public tunneling services:
bash ngrok http 3000bash cloudflared tunnel --url http://localhost:3000bash tailscale funnel 3000Technical Analysis
The setup guide permits users to publish the gateway on the Internet without requiring callback authentication or message encryption. If the separately installed
openclaw-feishuplugin does not independently enforce Feishu callback signatures, timestamps, nonces, and replay protection, an exposed endpoint may accept forged or replayed event requests.The application secret is also documented as a plaintext value inside
~/.openclaw/config.yaml. No restrictive file permissions, secret manager, environment-based injection, or operating-system credential store is required. Consequently, another local account, backup process, support utility, or compromised application with read access to that file could recover the credential.The project contains no implementation of the gateway or plugin, so successful callback forgery cannot be established solely from this repository. The confirmed issue is the insecure deployment guidance: public exposure is recommended while the releva ...[truncated 1454 chars]
- Remediation
View remediation
Remediation Suggestions
- Make
verificationTokenmandatory before permitting the gateway to accept public traffic. - Require
encryptKeywhen encrypted Feishu events are enabled and fail closed when decryption or verification fails. - Document mandatory verification of Feishu signatures, timestamps, nonces, and challenge requests.
- Add replay protection by rejecting stale timestamps and previously processed event identifiers or nonces.
- Bind the gateway to localhost and place it behind a hardened reverse proxy that enforces TLS, request-size limits, rate limiting, and strict route allowlisting.
- Restrict tunnel access where supported instead of publishing an unrestricted endpoint.
- Store
appSecret, verification tokens, and encryption keys in a secret manager, operating-system credential store, or protected environment injection mechanism rather than directly in YAML. - If file-based storage is unavoidable, require ownership by the gateway account and permissions equivalent to
0600. - Rotate any credential that may have been exposed and use the minimum Feishu permissions required for the bot.
- Add a deployment validation step that refuses startup when authentication controls are absent on a publicly reachable listener.
- Make
