T09 · Insecure Skill Coding Practices
- Location
SKILL.md:59- Finding
Hardcoded Feishu Application Credentials
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:59-60
Vulnerability Type: Hardcoded reusable authentication credentials
Risk Level: HighVulnerable Code
bash APP_ID="cli_a924632610b8dbd9" APP_SECRET="c3TXscIJPF1f8jcQ4mJJegNVk72ktbwK"Technical Analysis
The Skill contains a plausible Feishu application identifier and application secret directly in a distributable example. Anyone with access to the Skill can recover these credentials without needing access to a separate secret store.
The document subsequently uses the credentials to request a tenant access token from Feishu's official authentication endpoint. Although sending credentials to that endpoint is necessary for the declared image-sending functionality, embedding reusable credentials in the Skill is not necessary and violates least-privilege and secret-management practices.
The exposed secret may allow an attacker to authenticate as the associated Feishu application if the credentials remain active. The actual privileges available to an attacker depend on the permissions granted to that application in Feishu.
Attack Path
- An attacker obtains or reads the distributed
SKILL.mdfile. - The attacker extracts the embedded
APP_IDandAPP_SECRET. - The attacker submits the credentials to:
https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal. - If the credentials are valid, Feishu returns a tenant access token.
- The attacker uses that token to call Feishu APIs authorized for the application.
- Possible follow-on actions include uploading images, sending messages, consuming API quotas, or invoking any other API permitted by the application's assigned scopes.
Impact Assessment
Successful exploitation may provide unauthorized access to the Feishu application's tenant-level API privileges. The precise scope is bounded by the permissions assigned to the application, but it could include unaut ...[truncated 349 chars]
- An attacker obtains or reads the distributed
- Remediation
View remediation
Remediation Suggestions
- Revoke and rotate the exposed Feishu application secret immediately.
- Replace both credential values in documentation with clearly nonfunctional placeholders.
- Load credentials at runtime from environment variables or a dedicated secret manager.
- Do not print, log, cache, or return application secrets or tenant access tokens.
- Restrict access to the runtime secret to the process and operators that require it.
- Configure the Feishu application with only the scopes required to upload images and send messages.
- Review Feishu authentication and API audit logs for unauthorized token issuance or API calls made using the exposed credentials.
- Add automated secret scanning to the repository and release process to prevent future credential inclusion.
