T09 · Insecure Skill Coding Practices
- Location
_meta.json:13- Finding
Unimplemented Integrations Request and Load Unnecessary Sensitive Credentials
- Content
View full analysis
Vulnerability Details
File Location:
_meta.json:13-29; supporting credential loading inconfig.ts:13-48and setup instructions inSKILL.md:46-65
Vulnerability Type: Violation of least privilege through unnecessary credential collection and loading
Risk Level: MediumRelevant code from
_meta.json:json "requiredCredentials": [ "TAVILY_API_KEY", "FEISHU_APP_ID", "FEISHU_APP_SECRET", "WECHAT_APP_ID", "WECHAT_APP_SECRET", "DINGTALK_WEBHOOK", "AMAP_API_KEY", "ALIPAY_APP_ID", "ALIPAY_PRIVATE_KEY", "ALIPAY_PUBLIC_KEY" ], "optionalCredentials": [ "FEISHU_USER_ACCESS_TOKEN", "DINGTALK_APP_KEY", "DINGTALK_APP_SECRET", "ALIPAY_SANDBOX" ],Supporting code from
config.ts:ts export const FEISHU_CONFIG = { enabled: process.env.FEISHU_ENABLED === 'true', appId: process.env.FEISHU_APP_ID || '', appSecret: process.env.FEISHU_APP_SECRET || '', userAccessToken: process.env.FEISHU_USER_ACCESS_TOKEN || '', }; export const WECHAT_CONFIG = { enabled: process.env.WECHAT_ENABLED === 'true', appId: process.env.WECHAT_APP_ID || '', appSecret: process.env.WECHAT_APP_SECRET || '', }; export const DINGTALK_CONFIG = { enabled: process.env.DINGTALK_ENABLED === 'true', webhook: process.env.DINGTALK_WEBHOOK || '', appKey: process.env.DINGTALK_APP_KEY || '', appSecret: process.env.DINGTALK_APP_SECRET || '', }; export const AMAP_CONFIG = { enabled: process.env.AMAP_ENABLED === 'true', apiKey: process.env.AMAP_API_KEY || '', }; export const ALIPAY_CONFIG = { enabled: process.env.ALIPAY_ENABLED === 'true', appId: process.env.ALIPAY_APP_ID || '', privateKey: process.env.ALIPAY_PRIVATE_KEY || '', alipayPublicKey: process.env.ALIPAY_PUBLIC_KEY || '', sandbox: process.env.ALIPAY_SANDBOX === 'true' || true, };Technical Analysis
The Skill declares numerous high-value cred ...[truncated 2774 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove all credentials for unimplemented integrations from
_meta.jsonandSKILL.md. - Retain only
TAVILY_API_KEYfor the currently implemented authenticated operation, and make it optional unless Tavily search is explicitly selected. - Do not load all credentials at module initialization. Read each credential only inside the integration method that requires it.
- Separate payment functionality from the general localization package. Do not expose an Alipay private key to a process that only provides localization and search.
- Mark integration credentials as optional and conditionally request them only after explicit user activation.
- Store secrets in a dedicated secret manager where available rather than a broad process environment.
- Validate that enabled integrations have only the minimum service scopes necessary.
- Add tests confirming that importing the localization or Baidu search functionality does not access unrelated credentials.
- Correct the Alipay sandbox expression because
process.env.ALIPAY_SANDBOX === 'true' || truealways evaluates totrue.
- Remove all credentials for unimplemented integrations from
