T09 · Insecure Skill Coding Practices
- Location
toolkit/config/runtime.json:2- Finding
Live Feishu application credentials and a user OAuth token are committed to the project
- Content
View full analysis
Vulnerability Details
File Location:
toolkit/config/runtime.json:2-9
Vulnerability Type: Hardcoded credentials and plaintext authentication tokens
Risk Level: CriticalVulnerable Code
The credential values are redacted below to prevent further disclosure:
json { "app_id": "[REDACTED_APP_ID]", "app_secret": "[REDACTED_APP_SECRET]", "base_url": "https://open.feishu.cn/open-apis", "default_member_open_id": "[REDACTED_OPEN_ID]", "refresh_token": "", "timezone": "Asia/Shanghai", "user_access_token": "[REDACTED_JWT_ACCESS_TOKEN]", "user_scope": "auth:user.id:read task:task:read task:task:write", "user_token_expires_at": "2026-03-10T09:53:23.253756+00:00" }Technical Analysis
A real-looking Feishu application ID, application secret, user access token, user identity, and granted OAuth scopes are stored directly in the distributed runtime configuration. Anyone who can read the project artifact or its source history can extract these credentials without executing the Skill.
The user token declares task read and write scopes. Its configured expiration date is in the past as of this audit, which reduces its present direct utility, but does not make publishing it acceptable. More importantly, the application secret has no local expiration metadata and can be exchanged for a tenant access token by the implementation:
python payload = {"app_id": self.config.app_id, "app_secret": self.config.app_secret} response = self.request( "POST", "/auth/v3/tenant_access_token/internal", body=payload, use_auth=False, )This behavior is necessary when authenticating to Feishu, but embedding usable credentials in the Skill package is not necessary and violates least-secret and secure-deployment principles.
Attack Path
- An attacker downloads the Skill artifact, reads the repository, or obtains a historical copy.
- The attacker extracts ` ...[truncated 1210 chars]
- Remediation
View remediation
Remediation Suggestions
- Revoke and rotate the exposed Feishu application secret immediately.
- Revoke all exposed user and refresh tokens, even if they appear expired.
- Remove
toolkit/config/runtime.jsonfrom the repository and purge it from source history and release artifacts. - Add the runtime configuration and equivalent secret files to
.gitignore. - Ship only a credential-free example such as
runtime.example.json. - Prefer environment variables, an operating-system keychain, or a dedicated secret manager.
- Add automated secret scanning to CI and pre-commit checks.
- Review Feishu access logs for use of the exposed app ID and tokens.
- Reduce the application's configured Feishu permissions and authorized contact scope to the minimum required.
