T09 · Insecure Skill Coding Practices
- Location
index.js:85- Finding
API Credentials Exposed in Query Results and In-Memory Cache
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill looks like a U.S. policy-query scaffold, but it overstates live AI analysis and can expose configured API keys in ordinary query results.
Review this before installing as a demo or scaffold, not as a trustworthy source for regulatory or investment decisions. Do not pass real API keys or sensitive endpoint strings through dataSources until the skill separates credentials from source names and stops returning or caching secret values.
index.js:85API Credentials Exposed in Query Results and In-Memory Cache
The README shows invocation phrases such as '查询美国最新的投资政策' and '如何在美国开展业务?' that are broad, natural-language requests rather than narrowly namespaced commands. In an agent platform, such generic triggers can cause the skill to activate on ordinary user queries unintentionally, expanding the skill’s reach and increasing the chance of inappropriate data access, unexpected tool use, or policy/business advice being produced when the user did not explicitly intend to invoke this specific skill.
The top-level description claims intelligent querying and analysis of U.S. market policies, but the implementation only emits canned placeholder responses. This discrepancy is dangerous because users may rely on the skill for regulatory or investment decisions under the false assumption that it performs live or substantive analysis.
This code sets the default language to 'zh-CN' when the user does not provide a language, which imposes a specific locale automatically. Under the policy, forcing a language without user opt-in is a natural-language policy violation unless the locale constraint is clearly justified or optional.
The function advertises fetching policy data from a configured data source, but it actually returns hardcoded mock content with placeholder values such as ${name}. In a policy-analysis skill, this can mislead downstream users or agents into treating fabricated regulatory information as authoritative, creating integrity and decision-making risk.
The package description is written only in Chinese while the skill advertises "多语言支持" elsewhere, which creates a mismatch and may impose a language choice on users without consent. This is a natural-language policy concern because the user-facing metadata does not offer a language option or explain a locale restriction.