Back to skill

Security audit

Hot Content Writer

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its content-generation purpose, but it needs review because it handles API keys, external requests, and sibling-script execution with weak scoping.

Install only if you are comfortable giving this skill an API key and sending your topics, audience notes, and prompts to the configured LLM endpoint. Prefer an environment variable over editing config.json, avoid sensitive or regulated content, do not use a custom api_base unless you fully trust it, and review any neighboring hot-list skills before using --from-hot or daily_content.py.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (4)

T01 · Skill Instruction Hijacking

Note
Location
daily_content.py:134
Finding

Unsolicited Promotional Content Is Injected into WeChat-Formatted Output

Content
View full analysis

Vulnerability Details

File Location: daily_content.py, lines 134-135
Vulnerability Type: Deterministic output manipulation
Risk Level: Low

Vulnerable Code

python
lines.append("💡 完整文案请使用 hot-content-writer 技能生成")
lines.append("📦 安装:npx clawhub install hot-content-writer")

Technical Analysis

The format_for_wechat() function unconditionally appends product promotion and an installation command to every result generated with the --wechat-format option. This content is unrelated to formatting and cannot be disabled independently.

Although the appended command is not executed by the code, the behavior changes user-facing output without clearly disclosing that advertising will be inserted. This represents output-level instruction hijacking rather than system-level code execution.

Attack Path

  1. A user invokes daily_content.py with --wechat-format.
  2. The Skill obtains topics and generates the requested content.
  3. format_for_wechat() formats the results.
  4. The function unconditionally appends promotional language and an installation command.
  5. The user may publish or forward the resulting text without noticing the injected promotion.

Impact Assessment

The issue does not grant filesystem, network, or operating-system privileges. Its scope is limited to the integrity of generated WeChat-formatted content. It may cause users to unknowingly redistribute advertising or installation guidance and may undermine trust in generated output.

Remediation
View remediation

Remediation Suggestions

  • Remove the promotional lines from the standard formatter.
  • If promotional content is desired, introduce an explicit --include-promotion option that defaults to disabled.
  • Clearly document any non-content material that may be appended to output.
  • Keep formatting functions limited to transforming user-requested content rather than adding unrelated instructions.
  • Add a test confirming that default formatted output contains only requested content and formatting elements.

T09 · Insecure Skill Coding Practices

Warning
Location
config.json:1
Finding

API Credentials Are Designed to Be Stored in a Plaintext Project Configuration File

Content
View full analysis

Vulnerability Details

File Location: config.json, lines 1-10
Vulnerability Type: Plaintext secret storage
Risk Level: Medium

Vulnerable Code

json
{
  "api_provider": "deepseek",
  "api_key": "",
  "api_base": "https://api.deepseek.com",
  "model": "deepseek-chat",
  "max_tokens": 2000,
  "temperature": 0.8,
  "free_daily_limit": 3,
  "notes": "填入你的 DeepSeek API Key 即可启用AI智能生成。DeepSeek价格约 1元/100万token,极便宜。获取地址: https://platform.deepseek.com"
}

The corresponding loader in generate.py reads this project-local file directly:

python
def load_config():
    """从config.json加载配置"""
    config_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "config.json")
    default = {
        "api_provider": "deepseek",
        "api_key": "",
        "api_base": "https://api.deepseek.com",
        "model": "deepseek-chat",
        "max_tokens": 2000,
        "temperature": 0.8
    }
    try:
        with open(config_path, "r", encoding="utf-8") as f:
            return {**default, **json.load(f)}
    except Exception:
        return default

Technical Analysis

The shipped configuration instructs users to place an API key directly into config.json, which resides beside the project source files. The loader does not check file ownership or permissions before consuming the credential.

Project-local configuration files are frequently copied, archived, uploaded, included in support bundles, or committed to version control. The repository also contains no audited ignore rule protecting this file. The current artifact contains an empty key, so no credential was exposed during the audit; the risk arises when users follow the supported configuration workflow.

Attack Path

  1. A user inserts a live API key into config.json as instructed.
  2. The key remains in plaintext inside the project directory.
  3. The directory is committed, backed up, shar ...[truncated 573 chars]
Remediation
View remediation

Remediation Suggestions

  • Remove api_key from the project-local configuration workflow.
  • Prefer environment variables, an operating-system credential manager, or a dedicated secret-management service.
  • Ship a secret-free example such as config.example.json rather than a writable configuration file intended to hold credentials.
  • Add the actual secret-bearing configuration file to .gitignore and package exclusion rules.
  • Document key rotation and revocation procedures.
  • Where project-local secret files must be supported, validate restrictive file permissions and warn or refuse to proceed when the file is accessible to other users.
  • Avoid passing API keys through command-line arguments because process listings and shell history may expose them.

T09 · Insecure Skill Coding Practices

Warning
Location
generate.py:179
Finding

Bearer Credentials and User Content Can Be Sent to an Unrestricted Custom API Endpoint

Content
View full analysis

Vulnerability Details

File Location: generate.py, lines 179-205
Vulnerability Type: Unvalidated credential destination and sensitive-data transmission
Risk Level: Medium

Vulnerable Code

python
api_key = api_key or os.environ.get("DEEPSEEK_API_KEY") or os.environ.get("OPENAI_API_KEY") or config.get("api_key")
api_base = api_base or os.environ.get("OPENAI_API_BASE") or config.get("api_base", "https://api.deepseek.com")
model = model or os.environ.get("CONTENT_MODEL") or config.get("model", "deepseek-chat")
max_tokens = config.get("max_tokens", 2000)
temperature = config.get("temperature", 0.8)

if not api_key:
    return None, "未配置API密钥!请在 config.json 中填入 api_key,或设置 DEEPSEEK_API_KEY 环境变量"

headers = {
    "Authorization": f"Bearer {api_key}",
    "Content-Type": "application/json"
}

data = {
    "model": model,
    "messages": [
        {"role": "system", "content": "你是一位资深自媒体运营专家,精通各平台爆款文案创作。输出必须是合法的JSON格式。"},
        {"role": "user", "content": prompt}
    ],
    "temperature": temperature,
    "max_tokens": max_tokens
}

try:
    resp = requests.post(f"{api_base}/chat/completions", headers=headers, json=data, timeout=60)

Technical Analysis

Sending a prompt and bearer credential to an AI provider is necessary for the declared API-generation feature. The default destination, https://api.deepseek.com, is consistent with the documentation and no evidence of intentional credential exfiltration was found.

However, api_base can be replaced through a command-line argument, the OPENAI_API_BASE environment variable, or config.json. The code performs no scheme validation, hostname validation, provider-to-key binding, or confirmation before attaching the selected API key to the request. It can therefore send both the bearer credential and prompt data to an unintended host, including a plaintext HTTP endpoint.

The transmitted prompt may contain user-supplied topic ...[truncated 1108 chars]

Remediation
View remediation

Remediation Suggestions

  • Require HTTPS for all API endpoints and reject plaintext HTTP URLs.
  • Use an explicit allowlist of trusted provider hosts by default.
  • Bind each credential to a specific provider and endpoint instead of selecting keys and endpoints independently.
  • Require clear interactive confirmation or an explicit unsafe override before using a custom endpoint.
  • Do not automatically send DEEPSEEK_API_KEY or OPENAI_API_KEY to an arbitrary custom host.
  • Normalize and validate URLs, including redirects; either disable redirects or revalidate the destination before forwarding authorization headers.
  • Display the destination hostname before the first request without displaying the key.
  • Document that topics, audience information, and prompts are transmitted to the selected provider.
  • Use separate, narrowly scoped credentials for custom OpenAI-compatible services.

T08 · Insecure Dependencies

Note
Location
package.json:26
Finding

Unnecessary and Unpinned npm Dependency Introduces Supply-Chain Exposure

Content
View full analysis

Vulnerability Details

File Location: package.json, lines 26-28
Vulnerability Type: Unsafe and unnecessary dependency declaration
Risk Level: Low

Vulnerable Code

json
"dependencies": {
  "python": ">=3.7"
},

Technical Analysis

Python is a runtime prerequisite for this project, not a JavaScript library used by the application. Declaring "python" under npm dependencies may cause npm-compatible tooling to resolve and install a registry package with that name.

The open-ended >=3.7 constraint does not pin an audited package version. The dependency is also unnecessary because the Skill metadata already declares the python3 binary requirement. This expands the installation supply chain without supporting the Skill's functionality.

The audit did not establish that the referenced registry package is malicious. The finding concerns unnecessary dependency resolution and the resulting exposure to package compromise, unexpected package behavior, or future ownership changes.

Attack Path

  1. A user or automated installer processes package.json.
  2. The package manager resolves the npm package named python using the unrestricted version range.
  3. Registry-controlled package contents enter the installation process.
  4. If the resolved package is compromised or contains lifecycle behavior, that behavior may run with the package manager's privileges.
  5. The unrelated dependency can affect the host despite not being required by the Python scripts.

Impact Assessment

Potential impact depends on the behavior of the package resolved at installation time. A compromised dependency with lifecycle scripts could execute commands with the privileges of the user running the package manager, access files available to that user, or alter the installation. No such malicious package behavior was confirmed in the audited artifact itself.

Remediation
View remediation

Remediation Suggestions

  • Remove the npm dependency named python.
  • Retain Python only as a runtime prerequisite in the Skill metadata.
  • If relevant to the packaging ecosystem, use a runtime or engines field rather than a third-party dependency.
  • Pin all genuine third-party dependencies to reviewed versions and maintain a lockfile.
  • Disable dependency lifecycle scripts where they are unnecessary in automated installation environments.
  • Add automated dependency review and integrity checks to the release process.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
Findings (23)

Tainted flow: 'headers' from os.environ.get (line 188, credential/environment) → requests.post (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 · generate.py (reported line 204)May include surrounding context.

python
}
    
    try:
        resp = requests.post(f"{api_base}/chat/completions", headers=headers, json=data, timeout=60)
        resp.raise_for_status()
        result = resp.json()
        content = result["choices"][0]["message"]["content"]

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · generate.py (reported line 148)May include surrounding context.

python
5. 符合{plat['name']}平台的内容调性
"""

    return prompt


def load_config():

YARA rule 'agent_skill_mcp_tool_poisoning_metadata': MCP/tool metadata poisoning indicators in tool schemas or skill manifests [agent_skills]

High
Category
YARA Match
Confidence
80% confidence
Finding

YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).

Content

Scanner excerpt · generate.py (reported line 261)May include surrounding context.

python
topic}攻略来了",
                    f"姐妹们冲!{topic}我亲测有效"
                ],
                "content": f"姐妹们!!!\n\n今天必须跟你们聊聊{topic}!\n\n🌟 为什么重要?\n[此处填写原因]\n\n✅ 具体方法:\n1️⃣ [方法一]\n2️⃣ [方法二]\n3️⃣ [方法三]\n\n💡 小tips:\n[补充建议]\n\n用过的姐妹评论区举个手🙋‍♀️\n\n#{topic.replace(' ', '')} #干货分享 #必看",
                "hashtags": [f"#{topic.replace(' ', '')}", "#干货分享", "#必看"]
            }
        },
        "douyin": {
            "casual": {
                "titles": [
                    f"关于{topic},90%的人都不知道!",
                    f"{topic}?看这一条就够了",
                    f"千万别再这样做了!{topic}正确方式"
                ],
                "content": f"家人们!\n\n{topic}这件事,\n我真的研究了好久!\n\n今天一次性告诉你们:\n\n👉 [核心

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill documentation describes capabilities involving environment variables, file I/O, network access, and shell execution, but the manifest does not declare any explicit tool scope or permissions. This creates an overbroad-trust situation where consumers cannot clearly evaluate or constrain what the skill may access, increasing the chance of unintended data exposure or unsafe execution in permissive runtimes.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
87% confidence
Finding

The installation command uses npx clawhub@latest, which pulls the latest published package rather than a pinned version. If the upstream package is compromised or a breaking/malicious release is published, users may install and execute unreviewed code during setup.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill instructs users to configure a DeepSeek API key and send prompts for content generation, but it does not clearly warn that user topics and related content will be transmitted to an external third-party service. This can lead to accidental disclosure of sensitive business plans, customer data, or unpublished campaign material entered as prompts.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The module description and CLI-facing messages are presented exclusively in Chinese, with no indication that users can choose another language or locale. This can violate language-choice policy when the skill is not clearly documented as region-specific.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The code silently expands from user-provided topic generation into autonomous collection of trending topics from external fetcher skills. In an agent setting, this changes the data sources and behavior materially, creating undisclosed external-data intake and transitive execution paths that can surprise operators and weaken security assumptions.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
72% confidence
Finding

This code executes other local skills from the workspace, expanding trust to sibling directories without integrity checking or version pinning. If a malicious or replaced fetch_hot.py exists in the expected path, running this orchestrator will execute attacker-controlled code automatically, especially risky in scheduled-task usage.

Content

Scanner excerpt · daily_content.py (reported line 38)May include surrounding context.

python
if not script or not os.path.exists(script):
            continue
        try:
            result = subprocess.run(
                [sys.executable, script, "--top", str(top), "--format", "json", "--output", f"C:\\tmp\\hot_{name}.json"],
                capture_output=True, text=True, timeout=30, encoding="utf-8", errors="replace"
            )

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
82% confidence
Finding

The skill claims to be a content writer but also orchestrates execution of other local skills, broadening its effective privileges and behavior beyond user expectations. This increases attack surface because invoking the skill can transitively run additional code from the workspace, which is dangerous in agent environments that rely on scoped capabilities.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · daily_content.py (reported line 73)May include surrounding context.

python
# 先尝试API模式
    try:
        result = subprocess.run(
            [sys.executable, CONTENT_WRITER, "--topic", topic, "--platform", platform, "--style", style, "--api"],
            capture_output=True, text=True, timeout=60, encoding="utf-8", errors="replace"
        )

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · daily_content.py (reported line 88)May include surrounding context.

python
# 回退到模板模式
    try:
        result = subprocess.run(
            [sys.executable, CONTENT_WRITER, "--topic", topic, "--platform", platform, "--style", style],
            capture_output=True, text=True, timeout=30, encoding="utf-8", errors="replace"
        )

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file’s natural-language description and all generation instructions are written to produce Chinese social-media copy only, with no option for user language or locale preference. This creates a language/locale policy issue because the skill effectively mandates one language without opt-in or a documented region-specific justification.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

The skill sends user content and configuration-derived metadata to an external network endpoint. External transmission is expected for LLM-backed generation, but it remains a real security/privacy concern because api_base is configurable and the code does not constrain the destination to trusted providers.

Content

Scanner excerpt · generate.py (reported line 204)May include surrounding context.

python
}
    
    try:
        resp = requests.post(f"{api_base}/chat/completions", headers=headers, json=data, timeout=60)
        resp.raise_for_status()
        result = resp.json()
        content = result["choices"][0]["message"]["content"]

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

User-supplied topic and audience text is transmitted to an external LLM API without a clear in-tool notice about third-party disclosure. In this skill's context, users may paste sensitive campaign plans, unpublished topics, or audience profiling data, so silent transmission creates a real privacy and compliance risk.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill performs capability expansion beyond text generation by executing external sibling scripts to fetch hot topics. In context, this is more dangerous because the description emphasizes content generation, so users may not expect arbitrary local code execution as part of normal operation.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
89% confidence
Finding

The code executes a sibling Python script via subprocess based on a selectable source. Although it does not invoke a shell and limits source values to a fixed set, it still expands the skill's trust boundary to other local scripts, so a compromised or replaced sibling script would run with the current user's privileges.

Content

Scanner excerpt · generate.py (reported line 343)May include surrounding context.

python
try:
        import subprocess
        result = subprocess.run(
            [sys.executable, script, "--top", str(top), "--format", "json"],
            capture_output=True, text=True, timeout=30
        )

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The package description is entirely in Chinese and presents the skill as generating platform copy for Chinese social-media ecosystems, but it does not state that the skill is intentionally China-specific or offer any user opt-in for language/locale constraints. Under the policy, forcing a specific language without user choice or clear justification is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

The daily automation workflow describes generating content, writing output, and preparing WeCom-distribution formats without warning about downstream publication or file-output effects. In practice, this can cause users to automatically persist or redistribute low-quality, sensitive, or externally influenced content without sufficient review.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The natural-language note is written entirely in Chinese and provides no indication that other languages are supported. Under the policy, locale or language constraints should either be optional or clearly justified; this config text presents a single-language experience without opt-in.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

Fetched data is written to a fixed path under C:\tmp without uniqueness, access control, or cleanup. On multi-user systems or systems with permissive temporary-directory access, this can lead to data exposure, file clobbering, race conditions, or unintended interaction with preexisting files.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The manifest description claims generation for 小红书/抖音/公众号/微博, which implies a defined set of supported platforms. The code adds a fifth platform, 知乎, expanding behavior beyond the described scope even though it is still content generation-related.

Content

No source excerpt is available for this finding.