T09 · Insecure Skill Coding Practices
- Location
SKILL.md:46- Finding
Hardcoded Feishu Application Credentials
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 46-47
Vulnerability Type: Hardcoded application credentials
Risk Level: HighAffected code:
bash APP_ID="cli_a9217db4a3f59cb6" APP_SECRET="G34RRAc41XOY7vb2a7NmMgwl5chruBmo"Technical Analysis
The skill embeds a Feishu application ID and application secret directly in a tracked project file. Anyone who can read the skill package, repository history, build artifacts, backups, logs containing the file, or installed skill directory can recover these credentials.
The subsequent instructions submit these credentials to Feishu's tenant-token API to obtain a tenant access token. Consequently, this is not merely an informational identifier exposure: the application secret can be used to authenticate as the configured Feishu application.
Because the credential has already been committed or distributed in plaintext, deleting it from the current version alone is insufficient. It must be considered compromised and rotated. Copies may remain in repository history, caches, archives, and deployed skill packages.
Attack Path
- An attacker obtains read access to
SKILL.mdthrough the project repository, a distributed skill package, a backup, or a local installation. - The attacker extracts the exposed application ID and application secret.
- The attacker submits the credentials to the documented Feishu tenant access-token endpoint.
- If the credentials remain active, Feishu returns a tenant access token.
- The attacker invokes Feishu APIs as the application, subject to its configured scopes and resource authorization.
- In this skill's documented context, the attacker may inspect or change document-sharing permissions for resources accessible to the application.
Impact Assessment
Successful exploitation permits authentication as the affected Feishu application. The exact scope is determined by the application's Feishu permissions, ...[truncated 412 chars]
- An attacker obtains read access to
- Remediation
View remediation
Remediation Suggestions
- Immediately revoke and rotate the exposed Feishu application secret.
- Remove both credentials from the skill documentation and all distributed copies.
- Load credentials at runtime from an approved secret manager or protected environment variables, for example:
bash : "${FEISHU_APP_ID:?FEISHU_APP_ID is required}" : "${FEISHU_APP_SECRET:?FEISHU_APP_SECRET is required}" - Do not print secrets, tenant access tokens, or complete authentication responses to logs.
- Purge the secret from version-control history and invalidate old archives where feasible. Rotation remains mandatory even after history rewriting.
- Review Feishu application audit logs for suspicious token issuance and API activity since the credential was first exposed.
- Restrict the application to the minimum Feishu scopes and document resources required for permission management.
- Add secret scanning to pre-commit hooks and CI, and block commits containing credential patterns.
- Prefer short-lived credentials or workload identity mechanisms where supported.
