T09 · Insecure Skill Coding Practices
- Location
references/feishu-api-setup.md:335- Finding
Hardcoded Feishu Application and User Credentials
- Content
View full analysis
Vulnerability Details
File Location:
references/feishu-api-setup.md, lines 335–341
Additional Occurrence:references/feishu-api-setup.md, lines 165–174
Vulnerability Type: Plaintext hardcoded secrets and sensitive account data
Risk Level: HighThe document contains a live-looking Feishu App Secret, user access token, refresh token, application identifier, and user identifier:
markdown - **App ID**: `cli_a948e3ca9fb99bcc` - **App Secret**: `1UakAZzxnrcp17qhH9R1FcRKOYJTp28S`markdown - **user_access_token**: `u-7YAewM3Y12bVmJ9rIPQGlBkl1.ugg5WXOwEaFQA02ASb` - **refresh_token**: `ur-71UTe8a0N3QWCQLyFIR4L7kl1YYgg5gjMgEaZMM02BCe` - **open_id**: `ou_cbcc27fa7979db72b850c0cf97c03ca6`Lines 165–174 also repeat the access token and refresh token in an API response example and disclose associated personal account data.
Technical Analysis
Secrets committed to a distributable Skill package are available to every person or automated system that can download, inspect, cache, or fork the package. An App Secret is an application authentication credential. A user access token grants user-scoped API access, while a refresh token may allow an attacker to obtain replacement access tokens without repeating interactive authorization.
Credential validity was not tested during this static audit. However, the values are concrete, internally consistent with the documented application, and presented as actual project credentials rather than unmistakable placeholders. Even if the access token has expired, the App Secret or refresh token may remain useful until revoked or expired.
The same document identifies granted document, drive, and wiki permissions. Consequently, any successful use of the exposed credentials would operate within the scopes and resources authorized for the application and affected user.
Attack Path
- An attacker downloads or otherwise obtains the Skill package.
- The a ...[truncated 1330 chars]
- Remediation
View remediation
Remediation Suggestions
- Immediately revoke the exposed user access token and refresh token.
- Rotate the exposed App Secret and investigate Feishu audit logs for unauthorized token refreshes or API activity.
- Remove all real credentials, account identifiers, phone numbers, and other personal data from the current files and repository history.
- Replace concrete values with unmistakable placeholders such as
${FEISHU_APP_SECRET},${FEISHU_ACCESS_TOKEN}, and${FEISHU_REFRESH_TOKEN}. - Store application secrets and OAuth tokens in an approved secret manager, not in source files or collaborative documents.
- Restrict secret access by service identity and environment, and apply the minimum necessary Feishu scopes.
- Enable automated secret scanning in pre-commit hooks and CI pipelines, including detection for Feishu token prefixes and high-entropy values.
- Add a credential-rotation procedure and document token revocation, expiration, and incident-response requirements.
