T09 · Insecure Skill Coding Practices
- Location
index.js:119- Finding
Unrestricted Caller Context Disclosure to an External API
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This market-analysis skill is mostly purpose-aligned, but it sends overly broad caller context to an external service without clear user control or minimization.
Review before installing if your prompts or agent context may contain private business plans, customer data, credentials, session identifiers, or internal metadata. The skill contacts Novai360 and may send more than the visible query, logs full API responses, and can expose constructed prompts when no LLM interface is available. It should be limited to non-sensitive market research unless the publisher adds context allowlisting, redaction, clearer privacy disclosure, and safer prompt handling.
index.js:119Unrestricted Caller Context Disclosure to an External API
index.js:145Remote API Content Is Inserted Directly into an LLM Instruction Prompt
index.js:138Complete External API Responses Are Written to Application Logs
If no dedicated LLM interface is present, the function returns the full internally constructed prompt verbatim, including tool inventory, hidden reasoning instructions, and embedded user/context-derived content. This is a prompt disclosure flaw because downstream components or users may receive internal orchestration prompts that should remain private, enabling prompt extraction, policy bypass tuning, or reconnaissance of system behavior.
// 方式 2:如果 OpenClaw 没有提供 LLM 接口,返回原始 prompt
// 让 OpenClaw 的主 LLM 在处理 skill 时自然调用
return prompt;
}
/**
return prompt is a direct prompt-extraction flaw: the skill discloses its internal prompt verbatim when no LLM interface is available. Because the prompt includes system-style instructions, tool descriptions, user question embedding, and potentially API-derived framework text, an attacker can intentionally trigger this path to harvest hidden orchestration details and sensitive embedded content.
// 方式 2:如果 OpenClaw 没有提供 LLM 接口,返回原始 prompt
// 让 OpenClaw 的主 LLM 在处理 skill 时自然调用
return prompt;
}
/**
The changelog headings and entries switch into Chinese-only content beginning at L05, which constitutes a language/locale constraint in natural-language documentation. There is no indication that users may choose another language or that the skill is intentionally region-specific, so this appears to violate the language/locale policy criteria.
The skill’s invocation guidance is broad and generic, which can cause the agent to trigger this external market-analysis service for loosely related user queries. That increases the chance of unintended data transmission to a third-party endpoint and may misroute user requests without clear informed consent.
The skill advertises external API endpoints and direct use without warning users that their queries will be transmitted to an outside analysis service. This is dangerous because users may include sensitive business data, product plans, or identifiers under the assumption the interaction remains local or platform-contained.
The skill sends the user's message plus expanded context fields to an external service at api.novai360.com without any visible consent gate, minimization, or warning. This creates a real privacy and data-governance risk because arbitrary context may contain identifiers, session data, or other sensitive information that users do not expect to be transmitted off-platform.
The code forwards both the raw user message and the full merged context object to an external chat endpoint, creating a direct natural-language exfiltration path. Because the spread operator includes arbitrary context fields, secrets, tokens, personal data, or internal metadata could be unintentionally leaked to the remote service.
The summary prompt explicitly requires 使用专业的中文, which imposes a specific language on all outputs. This is a natural-language policy concern because the file does not provide any user opt-in, locale selection, or documented reason that the skill must always respond in Chinese.
User input is fed into a multi-step LLM workflow that first determines intent/tooling and then shapes later API calls and final reporting. Without validation, confinement, or robust output parsing, adversarial input can manipulate tool selection, contaminate downstream prompts, or trigger inappropriate external requests and misleading analysis.
The skill forwards the entire caller-provided context to an external API and also passes context into the LLM path, even though a market-analysis function does not inherently require arbitrary context fields. This can leak secrets, system prompts, tokens, internal metadata, or user-identifying information to third parties, especially because the spread operator includes all context keys without allowlisting.
The skill sends the user query and context to https://api.novai360.com/chat without any visible user-facing disclosure, consent, or minimization. In a skill environment, users may reasonably expect local handling unless told otherwise, so this creates a privacy and data-governance risk.
The summary prompt explicitly requires '使用专业的中文', which hard-codes the report language to Chinese. This is a natural-language policy issue because the skill does not provide user opt-in, locale selection, or a documented region-specific justification for restricting output language.
The prompt and context may be sent to an LLM interface via context.llm(prompt) without any notice or control over what contextual data influences the prompt. Because prompts can contain user content and downstream API data, this can unintentionally disclose sensitive information to another processing component or provider.
When no context.llm is present, the function returns the full constructed prompt string instead of performing inference. That exposes internal prompt instructions, tool inventory, workflow details, and embedded user/context-derived content to the caller or host, which can aid prompt extraction and reveal internal orchestration logic.
The manifest presents the user-facing display name and description entirely in Chinese, with no indication that users can choose another language or that the skill is limited to a Chinese-speaking region. This can violate language/locale policy when a skill imposes a specific language without opt-in or documented justification.
The changelog states both that API key authentication was removed (L20) and that environment variable configuration was added (L22). In documentation terms, this creates a contradiction in stated intent: removing authentication should generally eliminate the need for credential-related configuration, yet the adjacent note suggests continued secret/config handling.
All natural-language instructions and descriptions in the skill file are written in Chinese, with no indication that users can choose another language or that the skill is intentionally limited to a Chinese-speaking audience. This can conflict with a language/locale policy requiring user choice or documented justification for locale constraints.