Back to skill

Security audit

文章风格克隆助手

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to be a real writing helper, but it can send an OpenAI API key and user writing samples to the wrong external provider without clear warning.

Review this skill before installing. Use a provider-specific API key, set the matching API base explicitly, avoid custom API_BASE values unless you trust the endpoint, and do not provide confidential drafts or reference articles unless you are comfortable sending them to the configured LLM provider.

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
scripts/clone_style.py:16
Finding

OpenAI API Credential May Be Disclosed to an Unintended Provider

Content
View full analysis
str: if not API_KEY: return "[错误] 请设置环境变量 OPENAI_API_KEY 或 DEEPSEEK_API_KEY" payload = json.dumps({ "model": MODEL, "messages": [ { "role": "system", "content": ( "你是一位顶级的文字风格分析师和创意写作专家。" "你能精准捕捉任何作者的写作风格,并将其复制到新的内容上。" "你的改写保留原素材的核心信息和观点,同时完美呈现目标风格。" "请用中文输出。" ) }, {"role": "user", "content": prompt} ], "temperature": 0.85, }).encode("utf-8") req = urllib.request.Request( f"{API_BASE}/chat/completions", data=payload, headers={ "Content-Type": "application/json", "Authorization": f"Bearer {API_KEY}", } ) with urllib.request.urlopen(req, timeout=90) as r: data = json.loads(r.read()) return data["choices"][0]["message"]["content"] ``` ### Technical Analysis Credential selection and endpoint selection are performed independently. `OPENAI_API_KEY` has precedence whenever it is present, but the default API endpoint is `https://api.deepseek.com`. Therefore, when a user configures `OPENAI_API_KEY` without also configuring `OPENAI_API_BASE`, the program places the OpenAI credential in an HTTP Authorization header and sends it to DeepSeek. This is a provider-confusion flaw. A secret intended for one service must not be transmitted to another service based on an unrelated endpoint default. The project documentation explicitly permits ...[truncated 1973 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (8)

Tainted flow: 'req' from os.environ.get (line 47, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/clone_style.py (reported line 55)May include surrounding context.

python
"Authorization": f"Bearer {API_KEY}",
        }
    )
    with urllib.request.urlopen(req, timeout=90) as r:
        data = json.loads(r.read())
    return data["choices"][0]["message"]["content"]

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
78% confidence
Finding

The natural-language instructions and examples are entirely Chinese, and the skill does not indicate whether other languages are supported or that Chinese-only use is an intentional, justified regional constraint. This can be interpreted as forcing a specific language/locale without user opt-in.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
83% confidence
Finding

The skill advertises a Python tool invocation that can execute local code and write files, yet it does not declare any explicit tool scope or permissions. This weakens least-privilege controls and can allow broader-than-expected access to environment data, filesystem locations, or network resources if the runtime permits them.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The display name, description, and all usage instructions are written exclusively in Chinese, and the examples assume Chinese-language requests as the default interaction mode. This creates a natural-language locale constraint without documenting that the skill is region-specific or giving users a language choice.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script reads API credentials and transmits user-supplied reference articles and source material to an external LLM provider, but the declared skill description does not clearly disclose that third-party network transmission occurs. This creates a privacy and data-governance risk because users may supply proprietary or sensitive text believing processing is local.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The tool sends full user-provided reference articles and draft content to an external LLM without an explicit warning at runtime. In this skill context, users are likely to paste unpublished articles, client materials, or internal drafts, so silent exfiltration to a third party materially increases confidentiality and compliance risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The markdown file includes commands to export DEEPSEEK_API_KEY and later states that DEEPSEEK_API_KEY or OPENAI_API_KEY must be set, but it provides no user warning that these values are sensitive credentials that should be handled carefully. For a skill description, this is a user-facing omission affecting privacy and credential safety.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
98% confidence
Finding

The instruction 请用中文输出。 hard-codes a language requirement in the model prompt. This is a natural-language locale policy issue because the script does not offer the user any language selection or explain why output must always be in Chinese.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.