Back to skill

Security audit

视频号爆款 IP 脚本工厂

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent Chinese WeChat video-script skill, but it needs review because it can send API keys and draft content to any configured model endpoint.

Install only if you intend to use a Chinese-language content generator and you trust the configured model endpoint. Avoid setting MODEL_BASE_URL or OPENAI_BASE_URL to untrusted URLs, and prefer a separate gateway-specific API key instead of reusing a broad OPENAI_API_KEY.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
lib/modelInvoker.ts:33
Finding

Unrestricted Model Endpoint Can Expose API Credentials and Prompt Content

Content
View full analysis

Vulnerability Details

File Location: lib/modelInvoker.ts:33-42, 76-96
Vulnerability Type: Unrestricted credential forwarding and sensitive prompt transmission
Risk Level: High

Vulnerable Code

ts
function resolveApiKey(options: InvokeModelOptions): string {
  const apiKey = options.apiKey ?? readEnv("MODEL_API_KEY") ?? readEnv("OPENAI_API_KEY");
  if (!apiKey) {
    throw new Error("Missing API key. Set MODEL_API_KEY or OPENAI_API_KEY.");
  }
  return apiKey;
}

function resolveBaseUrl(options: InvokeModelOptions): string {
  return options.baseUrl ?? readEnv("MODEL_BASE_URL") ?? readEnv("OPENAI_BASE_URL") ?? DEFAULT_BASE_URL;
}
ts
const response = await fetch(resolveBaseUrl(options), {
  method: "POST",
  signal: controller.signal,
  headers: {
    "Content-Type": "application/json",
    Authorization: `Bearer ${resolveApiKey(options)}`,
    ...(options.headers ?? {}),
  },
  body: JSON.stringify({
    model: options.model ?? readEnv("MODEL_NAME") ?? DEFAULT_MODEL,
    temperature: options.temperature ?? 0.7,
    max_tokens: options.maxTokens ?? 1600,
    messages: [
      {
        role: "system",
        content: options.systemPrompt ?? "You are a helpful assistant that must return structured Chinese content.",
      },
      {
        role: "user",
        content: prompt,
      },
    ],
  }),
});

Technical Analysis

The model endpoint may be supplied through options.baseUrl, MODEL_BASE_URL, or OPENAI_BASE_URL. The implementation does not validate the URL scheme, destination host, port, or network range, and it does not bind credentials to an approved provider.

The request automatically attaches MODEL_API_KEY or OPENAI_API_KEY as a bearer token and sends the complete generated prompt. That prompt includes user-provided content and bundled runtime configuration. If the endpoint is changed to an untrusted destination, ...[truncated 1925 chars]

Remediation
View remediation

Remediation Suggestions

  1. Require HTTPS for all credential-bearing model requests.
  2. Maintain an allowlist of approved model API hosts, or require explicit trusted-gateway registration before using a custom endpoint.
  3. Bind credentials to endpoints. In particular, send OPENAI_API_KEY only to explicitly approved OpenAI hosts.
  4. Require a separate gateway-specific credential when a custom model endpoint is configured.
  5. Reject URLs containing embedded credentials and, unless explicitly required, reject loopback, link-local, private-network, and cloud metadata destinations.
  6. Validate redirect targets or disable redirects so an approved endpoint cannot redirect credentials to an untrusted host.
  7. Prevent options.headers from overriding security-sensitive headers such as Authorization, Host, and Content-Type.
  8. Display a clear warning or fail closed when a custom endpoint is combined with a generic provider credential.
  9. Document that user content and runtime prompt configuration are transmitted to the selected model provider.
  10. Add automated tests for plaintext HTTP endpoints, unapproved hosts, redirects, private-network destinations, and cross-provider credential forwarding.
Vulnerability Patterns
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (71)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

If the core implementation is only generic script style rewriting, the current manifest overclaims a wider generation pipeline including hooks, covers, comments, and camera suggestions. Overclaimed capabilities are a security concern because they impair informed consent and proper permission scoping.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

If the core implementation is only generic script style rewriting, the current manifest overclaims a wider generation pipeline including hooks, covers, comments, and camera suggestions. Overclaimed capabilities are a security concern because they impair informed consent and proper permission scoping.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

If the core implementation is only generic script style rewriting, the current manifest overclaims a wider generation pipeline including hooks, covers, comments, and camera suggestions. Overclaimed capabilities are a security concern because they impair informed consent and proper permission scoping.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

If the core implementation is only generic script style rewriting, the current manifest overclaims a wider generation pipeline including hooks, covers, comments, and camera suggestions. Overclaimed capabilities are a security concern because they impair informed consent and proper permission scoping.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

If the core implementation is only generic script style rewriting, the current manifest overclaims a wider generation pipeline including hooks, covers, comments, and camera suggestions. Overclaimed capabilities are a security concern because they impair informed consent and proper permission scoping.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

If the core implementation is only generic script style rewriting, the current manifest overclaims a wider generation pipeline including hooks, covers, comments, and camera suggestions. Overclaimed capabilities are a security concern because they impair informed consent and proper permission scoping.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

If the core implementation is only generic script style rewriting, the current manifest overclaims a wider generation pipeline including hooks, covers, comments, and camera suggestions. Overclaimed capabilities are a security concern because they impair informed consent and proper permission scoping.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

If the core implementation is only generic script style rewriting, the current manifest overclaims a wider generation pipeline including hooks, covers, comments, and camera suggestions. Overclaimed capabilities are a security concern because they impair informed consent and proper permission scoping.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

If the core implementation is only generic script style rewriting, the current manifest overclaims a wider generation pipeline including hooks, covers, comments, and camera suggestions. Overclaimed capabilities are a security concern because they impair informed consent and proper permission scoping.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

If the core implementation is only generic script style rewriting, the current manifest overclaims a wider generation pipeline including hooks, covers, comments, and camera suggestions. Overclaimed capabilities are a security concern because they impair informed consent and proper permission scoping.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

If the core implementation is only generic script style rewriting, the current manifest overclaims a wider generation pipeline including hooks, covers, comments, and camera suggestions. Overclaimed capabilities are a security concern because they impair informed consent and proper permission scoping.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

If the core implementation is only generic script style rewriting, the current manifest overclaims a wider generation pipeline including hooks, covers, comments, and camera suggestions. Overclaimed capabilities are a security concern because they impair informed consent and proper permission scoping.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

If the core implementation is only generic script style rewriting, the current manifest overclaims a wider generation pipeline including hooks, covers, comments, and camera suggestions. Overclaimed capabilities are a security concern because they impair informed consent and proper permission scoping.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

If the core implementation is only generic script style rewriting, the current manifest overclaims a wider generation pipeline including hooks, covers, comments, and camera suggestions. Overclaimed capabilities are a security concern because they impair informed consent and proper permission scoping.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

If the core implementation is only generic script style rewriting, the current manifest overclaims a wider generation pipeline including hooks, covers, comments, and camera suggestions. Overclaimed capabilities are a security concern because they impair informed consent and proper permission scoping.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

If the core implementation is only generic script style rewriting, the current manifest overclaims a wider generation pipeline including hooks, covers, comments, and camera suggestions. Overclaimed capabilities are a security concern because they impair informed consent and proper permission scoping.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 33)May include surrounding context.

md
- `openclaw.ts`:可执行 skill 入口,接收 JSON 请求

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 104)May include surrounding context.

md
echo '{"action":"script","payload":{"topic":"顾客不是嫌贵,是你不会讲价值"}}' | node dist/openclaw.js

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The file is written entirely as prescriptive instructions in Chinese and does not indicate that users may choose another language or locale. Under the policy, forcing a specific language without user opt-in is a natural-language policy concern unless the restriction is explicitly justified as region-specific.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
81% confidence
Finding

The skill advertises executable entrypoints, model API usage, and environment-variable based configuration, but the manifest shown in SKILL.md does not declare an explicit tool scope such as allowed network or env access. Undeclared capabilities reduce transparency and can cause the host to grant broader access than users expect, especially since API keys and outbound requests are involved.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The file is entirely written in Chinese and includes output-quality requirements such as '语言像真人' and '有安全版本输出', but provides no indication that Chinese is optional or limited to a region-specific use case. This can create an implicit language policy that forces a specific locale without user opt-in, which falls under the natural-language policy violation category.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The profile display names are hard-coded in Chinese ("完整合规结果" and "仅风险问题") with no indication that the skill is China-specific or that users can choose another language. This is a natural-language locale policy concern because it imposes a specific language on all users without opt-in or justification in the file.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The profile names and style values are entirely specified in Chinese, which indicates the skill is designed around a fixed language/locale without any visible opt-in or alternative language support in this file. Under the policy rule, a forced language choice can be a natural-language policy violation unless the locale restriction is explicitly justified or optional.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The natural-language values "完整发布包" and "精简发布包" indicate a fixed Chinese-language presentation in this profile configuration. Because the file provides no user opt-in, language selection, or justification for a China-specific scope, it creates a locale policy concern under the requirement to avoid forcing a specific language without user choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The configuration defines all style names and descriptions exclusively in Chinese, indicating a fixed language/locale choice in the skill's natural-language behavior. There is no visible option here for user language selection or documentation that this file is intended only for a Chinese-specific context.

Content

No source excerpt is available for this finding.