T09 · Insecure Skill Coding Practices
Error
- Location
- feishu-config.env:1
- Finding
- Live Feishu application credentials committed to the project<![CDATA[ ## Vulnerability Details **File Location**: `feishu-config.env:1-3`; duplicate at `original-skill/feishu-config.env:1-3` **Vulnerability Type**: Hardcoded application credentials **Risk Level**: Critical ### Vulnerable Code ```ini FEISHU_APP_ID=cli_a90efed2d4f91cd0 FEISHU_APP_SECRET=BS3xuRyo9YRyLE3nu9DEvbAZfYTEQrq0 FEISHU_API_DOMAIN=https://open.feishu.cn ``` The same credentials are duplicated in: ```text original-skill/feishu-config.env ``` ### Technical Analysis The package contains a non-placeholder Feishu application ID and application secret in plaintext. These files are part of the distributed project rather than an ignored local configuration. Multiple runtime components actively consume these credentials and exchange them for a `tenant_access_token`. Therefore, the exposure is not merely an unused example value. Application secrets are long-lived authentication material and must not be stored in source archives, version-control history, generated artifacts, or distributable Skill packages. Duplicating the credentials in two locations increases the chance that attempts to remove or rotate the exposed secret will be incomplete. ### Attack Path 1. An attacker downloads, clones, or otherwise obtains the Skill package. 2. The attacker reads either committed `feishu-config.env` file. 3. The attacker sends the exposed app ID and secret to Feishu's tenant-token endpoint. 4. If the credentials remain active, Feishu returns a tenant access token. 5. The attacker invokes any Feishu API allowed by the application's granted scopes. 6. Depending on the configured application permissions, the attacker may create or modify documents, upload files, or manage document collaborators. ### Impact Assessment Successful exploitation allows impersonation of the Feishu application within the scope granted to that application. The exact tenant-wide impact depends on the application's Feishu permission configuration, but the audited code expects permissions ...[truncated 258 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Revoke and rotate the exposed Feishu application secret immediately. 2. Review Feishu application audit logs for suspicious token issuance and API activity. 3. Remove both credential-bearing files from the current package and all version-control history. 4. Distribute only a placeholder file such as `.env.example`. 5. Add `feishu-config.env`, `.claude/feishu-config.env`, `.openclaw/feishu-config.env`, and token files to `.gitignore` and package exclusion rules. 6. Load production secrets from an operating-system credential store, deployment secret manager, or protected environment variables. 7. Add automated secret scanning to CI and release packaging. 8. Ensure local secret files are created with owner-only permissions, such as mode `0600`. ]]>
