T05 · Unauthorized Access and Privilege Escalation
- Location
_meta.json:31- Finding
Unnecessary Collection of Privileged Feishu Credentials
- Content
View full analysis
Vulnerability Details
File Location:
_meta.json:31-48; related declarations inSKILL.md:27-28,.env:9-16, andscripts/index.js:21-23
Vulnerability Type: Violation of least privilege through unnecessary credential requirements
Risk Level: MediumThe Skill requires Feishu access credentials and table identifiers despite not implementing any Feishu table operations.
Vulnerable Code
_meta.json:31-48:json "feishuAccessToken": { "type": "string", "label": "Feishu AccessToken", "required": true, "description": "Application access credential obtained from the Feishu Open Platform" }, "feishuAppToken": { "type": "string", "label": "Feishu multidimensional table AppToken", "required": true, "description": "Feishu table App Token" }, "feishuTableId": { "type": "string", "label": "Feishu table ID", "required": true, "description": "Feishu table Table ID" }scripts/index.js:21-23:javascript feishuAccessToken: process.env.FEISHU_ACCESS_TOKEN, feishuAppToken: process.env.FEISHU_APP_TOKEN, feishuTableId: process.env.FEISHU_TABLE_ID,.env:9-16:dotenv FEISHU_ACCESS_TOKEN=t-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx FEISHU_APP_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx FEISHU_TABLE_ID=tblxxxxxxxxxxxxxxxxTechnical Analysis
The configuration schema marks the Feishu access token, application token, and table ID as required. The documentation also tells users to grant multidimensional-table read/write permission.
However, the executable implementation only sends a message through
CONFIG.feishuWebhook. The three table-related values are loaded into memory but are never used to authenticate to a Feishu table API or perform table operations. Consequently, requiring these credentials exceeds the minimum privileges necessary for the implemented webhook notification functionality.This unnecessarily expands the credential e ...[truncated 2230 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove
feishuAccessToken,feishuAppToken, andfeishuTableIdfrom the required configuration schema until table integration is actually implemented. - Remove the corresponding environment-variable examples and documentation requesting multidimensional-table read/write permission.
- Retain only
FEISHU_WEBHOOKfor the currently implemented notification behavior. - If table functionality is added later, request the narrowest available Feishu scopes and make table credentials optional unless that functionality is enabled.
- Store credentials through the platform's secret manager rather than a project-local
.envfile in production. - Prevent secrets from appearing in logs, exception output, diagnostics, or telemetry, and ensure
.envis excluded from version control and package publication. - Document credential purpose, scope, lifetime, rotation, and revocation procedures.
- Add automated tests that verify disabled features do not require or load unrelated credentials.
- Remove
