T09 · Insecure Skill Coding Practices
- Location
SKILL.md:323- Finding
Hard-Coded Feishu Application Credentials
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 323–330
Vulnerability Type: Plaintext hard-coded application secret
Risk Level: CriticalVulnerable Code
markdown **App ID**: `cli_a932525f7ef99bd4` **App Secret**: `w3RGN8nNkpUEcTUTJsq8vdQugdSKMxL8` **获取 tenant_access_token**: ```bash curl -X POST "https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal" \ -H "Content-Type: application/json" \ -d '{"app_id":"cli_a932525f7ef99bd4","app_secret":"w3RGN8nNkpUEcTUTJsq8vdQugdSKMxL8"}'text ### Technical Analysis The Skill embeds a Feishu App ID and App Secret in plaintext and supplies the exact API request needed to exchange them for a tenant access token. Any party with access to the package or its repository history can extract and reuse these credentials without needing access to the legitimate deployment environment. The App Secret functions as an authentication credential, not as a public identifier. Storing it in Skill documentation exposes it wherever the package is downloaded, copied, indexed, logged, or shared. Moving it to another tracked file would not resolve the issue; it must be injected at runtime from protected secret storage. Successful exploitation depends on whether the credential remains valid. The operations available after token acquisition depend on the Feishu application's configured API scopes and the tenant's authorization. The repository does not establish those scopes, so no broader privilege claim can be confirmed. ### Attack Path 1. Obtain a copy of the Skill package or repository history. 2. Read `SKILL.md` and extract the hard-coded App ID and App Secret. 3. Submit the exposed credentials to Feishu's internal tenant-token endpoint: `https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal`. 4. If the credentials remain valid, receive a tenant access token. 5. Use that token to invoke Feishu APIs authorized for the application. 6. Access, enumerate, or modify ten ...[truncated 650 chars]- Remediation
View remediation
Remediation Suggestions
- Immediately revoke and rotate the exposed App Secret in the Feishu developer console.
- Review token issuance and API audit logs for use of the exposed credentials.
- Remove the secret from
SKILL.md, all tracked files, published packages, generated artifacts, and repository history. - Store the replacement credential in a managed secret store or protected deployment environment variable.
- Inject the secret only at runtime and prevent it from appearing in prompts, command output, logs, exceptions, or user-visible responses.
- Grant the Feishu application only the minimum API scopes and resource access required for document search.
- Where feasible, use separate credentials for development, testing, and production.
- Add automated secret scanning to pre-commit hooks and CI pipelines, and block releases containing credential patterns.
- Treat the exposed credential as compromised even if the repository or package was intended to be private.
