Back to skill

Security audit

短剧-小红书信息源

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its stated reporting purpose, but it automatically opens HTML built from unescaped remote data and contains overreaching instructions that could suppress normal agent responses.

Review before installing. Use only if you are comfortable sending RedFoxHub API requests with your REDFOX_API_KEY, writing cached/report data locally, and opening generated report files. The HTML generation should be fixed to escape untrusted API data and browser auto-open should be made opt-in before routine use.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:451
Finding

Skill Instructions Attempt to Override the Agent's Response Behavior

Content
View full analysis
⛔ **强制输出规则**:日报生成后,对话回复**必须严格按照下方「📊 输出格式」模板输出 md 内容**,禁止任何自由发挥、省略、简化或口语化文字。模板是唯一合法输出格式。 ## 📊 输出格式(强制执行) > ⛔ **严格执行规则**: > - 以下模板是**唯一合法输出格式**,禁止任何自由发挥、省略、简化或重新组织 > - 禁止输出模板中未定义的额外内容(如"我来帮你…""以下是…"等口语化文字) > - 禁止合并、跳过任何板块,即使某板块数据为"暂无"也必须保留该板块标题 > - **每次获取日报后,对话回复必须严格按此模板输出 md 内容,不得包含模板以外的任何文字** 每次运行日报后,对话输出**必须严格**按以下模板原样输出(仅替换 `{...}` 占位符): ``` The directives state that the supplied template is the “only legal output format,” prohibit any text outside it, and prevent the agent from reorganizing, omitting, or supplementing its response. ### Technical Analysis Skill documentation is treated as operational input to the agent. A Skill may legitimately recommend a report format, but it should not claim authority over all agent responses or prohibit safety notices, error explanations, higher-priority instructions, and user-requested output changes. The affected instructions repeatedly require strict compliance and characterize the Skill-defined format as the only permissible response. This exceeds the formatting needs of the declared reporting functionality and attempts to alter the agent's behavior for the current session. The same directive is repeated in both `SKILL.md` and `references/core_workflow.md`, increasing the likelihood that an agent loading either document will treat it as mandatory. ### Attack Path 1. The agent loads `SKILL.md` while handling a Xiaohongshu short-drama request. 2. The Skill instructs the agent to treat its report template as the only legal response format. 3. The report-generation workflow runs or encounters an error, warning, or safety-relevant condition. 4. The Skill directive prevents the agent from including information outside the suppli ...[truncated 816 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
assets/daily_report.py:241
Finding

Remote API Data Is Injected into an Automatically Opened HTML Report Without Escaping

Content
View full analysis
' if photo_id: title_html = f'{title}' else: title_html = f'{title}' articles_html += f'''
{cover_html}
{title_html}
{author} {metrics_html}
''' category_cards += f'''
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (24)

Tainted flow: 'req' from os.environ.get (line 114, 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 · assets/daily_report.py (reported line 124)May include surrounding context.

python
method="POST"
            )
            
            with request.urlopen(req, timeout=30) as response:
                result = json.loads(response.read().decode('utf-8'))
                
                # 检查响应状态(红狐API成功码为2000)

Tainted flow: 'req' from os.environ.get (line 114, 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/playlet_xhs_daily.py (reported line 124)May include surrounding context.

python
method="POST"
            )
            
            with request.urlopen(req, timeout=30) as response:
                result = json.loads(response.read().decode('utf-8'))
                
                # 检查响应状态(红狐API成功码为2000)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The documentation claims behavior that is either unimplemented or inconsistent with the actual workflow, including required user confirmation before data fetch, supported filters, local caching, browser auto-open, and subscription behavior. Security-relevant mismatches are dangerous because users and the calling agent may make trust decisions based on false assumptions, leading to unexpected network calls, persistent local writes, or other side effects without informed consent.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The line "直接用自然语言描述需求,无需记忆命令" gives no boundary on what kinds of requests should activate this skill, which makes invocation conditions ambiguous. Although examples are provided later, this phrasing still suggests the skill may respond to broad everyday requests rather than a clearly constrained trigger scope.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill documents capabilities that imply environment access, local file reads/writes, and network use, but it does not declare any tool scope or permissions boundaries. This is dangerous because an orchestrator or reviewer cannot reliably constrain what the skill may do, increasing the chance of unintended data access, network egress, or side effects when invoked.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The invocation description uses broad phrases that can match many ordinary user requests, which can cause the skill to trigger in contexts the user did not intend. In a skill with network access and local side effects, overbroad triggering increases the risk of unnecessary API calls, file creation, or browser launching from loosely related prompts.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The subscription mode creates recurring local files over time, but the documentation does not clearly warn users about ongoing automated writes and persistence. Recurring writes can consume storage, leak sensitive reporting history, or continue operating beyond the user's immediate expectation if enabled casually.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The repeated manifest-style section again defines ambiguous trigger scope without negative examples, reinforcing the chance of accidental activation. Repetition of broad routing logic makes mis-invocation more likely across orchestration layers and compounds the risk of executing side effects in response to general content-analysis queries.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The generated HTML sets lang="zh-CN", and the script’s user-facing descriptions and output are consistently Chinese-only. This appears to enforce a specific language/locale without any opt-in or configurability, which matches the language/locale policy violation category.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The workflow contains conflicting instructions about use of --latest: one section says the agent must not automatically execute --latest, while later examples and defaults instruct use of --latest after confirmation and describe it as auto-skipping unavailable dates. In an agentic workflow, this ambiguity can cause the model to bypass the required user-confirmation gate and fetch data for a different date than the user requested, violating user intent and access-control/business rules.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The document requires every post-run reply to follow one fixed Chinese markdown template and forbids any extra wording. This imposes a specific language/locale on all responses without user opt-in or an explicit justified regional constraint, which matches the language-policy violation category.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
82% confidence
Finding

This markdown file is entirely presented in Chinese, including headings, usage examples, agent dialogues, and remediation steps. Under the stated policy, forcing a specific language without offering a language or locale choice is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The example explicitly shows the agent asking for user confirmation before executing the fallback query, which is good, but it also normalizes an automatic fallback behavior to the latest available date once the user says '好的'. Because the skill metadata states that when the target date has no data the agent must first notify the user and wait for confirmation before any API call, ambiguous examples around '--latest' can cause implementations to bypass or weaken the required consent gate. In a data-query skill, that can lead to unauthorized or unexpected API usage and user intent being overridden.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

All user-facing instructions, examples, and interaction guidance are written only in Chinese, and the file does not indicate whether other languages are supported or that Chinese is a required opt-in locale. Under the policy, forcing a specific language without user choice can be a natural-language policy issue unless clearly justified as region-specific.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill states that generated HTML will automatically open in a browser, but this local side effect is not presented as a clear warning or opt-in action. Automatic opening can surprise users, expose local browsing context, and execute rendered local HTML content without explicit consent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The workflow mandates automatic browser opening after report generation without framing it as a user-approved side effect. Even if low severity, forced preview weakens user control and can chain into execution of local HTML or unintended exposure of generated content on shared systems.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

The parameter documentation says preview is always automatic after generation, but it does not clearly emphasize that this is an enforced local side effect. Undisclosed forced side effects undermine informed consent and can be problematic in automated or headless environments.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The JSON example sets source to 短剧小红书信息源-ClawHub, but the note immediately below says the field is fixed as 短剧小红书信息源-GitHub. Because this field is described as fixed for source tracking, the two documented values actively contradict each other.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The manifest emphasizes scanning, filtering, clustering, and generating an HTML daily report, but the code also persists API results into a cache under ~/.workbuddy/cache. Local data retention is not described in the manifest, so the actual behavior is broader than the advertised reporting workflow.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The manifest describes a reporting skill for querying and summarizing Xiaohongshu short-drama trends, but does not mention credential handling or environment access as part of its user-facing scope. While API authentication may be operationally necessary, directly pulling secrets from process environment is an additional capability not justified by the stated purpose text alone.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

This code performs a network POST request and includes the REDFOX_API_KEY in the request headers, transmitting credentials to an external service. Although the script has comments/docstrings for developers, there is no user-facing disclosure at runtime that data and credentials are being sent off-host.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The script writes cached API results and HTML reports into user directories automatically, which can persist potentially sensitive or proprietary content longer than expected. On multi-user systems or systems with weak home-directory protections, this may expose collected data to other local users or backup/indexing processes.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The generated document hard-codes the zh-CN language locale, which is a natural-language policy concern when no user opt-in or alternative locale is provided. The file overall is Chinese-language oriented, but there is no explicit statement that the skill is intentionally limited to Chinese output for a region-specific use case.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

Automatically opening a generated HTML report in the user's browser causes an implicit side effect not clearly surfaced at execution time. Because the HTML embeds remote image URLs from API data, opening the file can trigger network requests to third-party hosts and reveal local usage metadata without explicit user consent.

Content

No source excerpt is available for this finding.