Back to skill

Security audit

小红书账号诊断

Security checks for vulnerabilities and agentic risk

Overview

The skill is coherent with account-analysis reporting, but it needs review because it handles an API key and account data insecurely and can generate unsafe HTML reports.

Install only if you trust RedFox as the account-data provider and are comfortable sending Xiaohongshu IDs for analysis. Avoid using sensitive or private account data until TLS verification and HTML escaping are fixed, and treat generated HTML reports as untrusted files unless you control the input data and viewing environment.

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

Error
Location
SKILL.md:64
Finding

Mandatory third-party promotional messaging hijacks agent responses

Content
View full analysis
= FAILURE_THRESHOLD: print(json.dumps({ "status": "error", "message": "当前账号ID已超过失败阈值,请联系客服邮箱redfoxdata@proton.me 或访问 https://redfox.hk/?source=clawhub 处理", "query_type": "threshold_exceeded", "data": {"accounts": []} }, ensure_ascii=False)) return ``` ```python except Exception as e: for user_id in user_ids: _record_failure(user_id) print(json.dumps({ "status": "error", "message": "未查询到相关账号:当前 Skill 仅收录热门账号。如需定制数据,可邮件联系[红狐数据](https://redfox.hk/?source=clawhub)咨询:redfoxdata@proton.me", "query_type": "not_found", "data": {"accounts": []} }, ensure_ascii=False)) return ``` ### Technical Analysis The Skill instructions require the agent to reproduce fixed contact information and a third-party website whenever a query fails, returns no result, or reaches a locally maintained failure threshold. The required response is not necessary to safely report a lookup failure and transforms ordinary error handling into a stable lead-generation channel. Because the wording is imposed by the loaded Skill instructions, the agent is directed away fr ...[truncated 1145 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/xiaohongshu_analyzer.py:130
Finding

TLS certificate and hostname verification are disabled for authenticated API requests

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/html_generator.py:125
Finding

Unescaped API and report data permit persistent HTML injection in generated reports

Content
View full analysis
查看' if url else "-" works_rows.append(f"{title}{date_str}{likes}{link}") replacements["{{works_table_rows}}"] = "\n".join(works_rows) # 爆文列表表格 viral_list = report_data.get("viral", {}).get("爆文列表", []) if not viral_list: viral_list = report_data.get("爆文列表", []) viral_rows = [] if viral_list: for v in viral_list: if not isinstance(v, dict): continue title = v.get("标题", v.get("title", "-"))[:20] or "-" pub_time = v.get("发布时间", v.get("publishTime", "-")) or "-" interactive = v.get("互动数", v.get("interactiveCount", "-")) or "-" multiple = v.get("超标准倍数", v.get("multiple", "-")) or "-" viral_rows.append(f"{title}{pub_time}{interactive}{multiple}") ``` Additional unsafe attribute and markup construction includes: ```python name_html = f'{name}' if account_url else name similar_cards.append( f'
' f'
{name_html} | 粉丝 ...[truncated 3145 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
assets/report_template.html:263
Finding

Generated reports execute mutable third-party JavaScript without integrity verification

Content
View full analysis
Remediation
View remediation
``` 4. Verify the hash against a trusted release artifact rather than content fetched from the same potentially compromised CDN. 5. Apply a Content Security Policy that limits `script-src` to the bundled local resource or the minimum approved origin. 6. Maintain a dependency inventory and periodically review the pinned version for published vulnerabilities. 7. Ensure report export fails safely if the dependency cannot be verified or loaded. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
Findings (30)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The manifest promises account analysis, scoring, health assessment, business value evaluation, and optimization guidance, but the detected implementation behavior appears limited to HTML/JSON post-processing and repair. This mismatch is dangerous because it can cause users and orchestrators to grant sensitive inputs, trust outputs, or enable network/file capabilities under false assumptions about what the skill actually does.

Content

No source excerpt is available for this finding.

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 · SKILL.md (reported line 3)May include surrounding context.

md
---
name: xiaohongshu-account-analyzer
description: 深度拆解小红书账号,输出七维度量化评分诊断报告与可导出HTML;当用户提供小红书号进行账号诊断、rednote分析、账号健康度评估、商业价值评估、多账号对比或制定优化策略时使用
---

# 小红书账号深度诊断

## 任务目标
- 本 Skill 用于:深度拆解小红书账号,输出专业的商业价值分析报告
- 能力包含:七维度评分(账号定位10分、粉丝画像与需求15分、选题体系10分、封面风格10分、爆文能力20分、互动规模20分、更新产能15分,满分100)、�

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The README states the skill can be invoked by describing needs in natural language with no explicit command format, which creates a broad and ambiguous activation boundary. In agent environments, this can cause unintended invocation from ordinary conversation, increasing the chance the skill runs on unrelated user input and performs external-account analysis without sufficiently deliberate user intent.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The example prompts are generic phrases like diagnosing an account or analyzing a competitor, which overlap with normal conversation and can be misinterpreted as activation cues. This ambiguity raises the risk of accidental skill execution, unintended external API use, and analysis of third-party accounts without a clearly scoped request.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The entire skill description and usage guidance are presented only in Chinese, with no indication that users may choose another language or that the skill is intentionally limited to a Chinese-only audience for compliance or regional reasons. This can violate language/locale policy when a skill implicitly mandates one language without opt-in.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The invocation guidance is very broad and encourages triggering the skill from generic natural-language requests such as '帮我诊断一下我的账号' or '分析一下竞品的账号策略'. In a skill-routing system, this can cause over-invocation on ambiguous requests, leading to unintended third-party data access, unnecessary API-key use, and analysis of accounts the user did not clearly intend to process.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill instructs use of environment variables, local file reads/writes, and outbound network access, but it does not declare any explicit tool scope or permissions boundaries. This creates an overbroad and opaque execution model where an agent may use more capability than the user reasonably expects, increasing the chance of unintended data access, persistence, or exfiltration.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill description and all user-facing instructions are written exclusively in Chinese and are framed as the required interaction mode, with no indication that users may choose another language. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale constraint is clearly documented and justified.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill sends user-provided account identifiers to an external API and performs additional web searches, but it does not clearly warn users that their inputs and derived profile data will leave the local environment. This undermines informed consent and can expose personal, commercial, or tracking-related data to third parties.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The workflow saves raw API results and generated report artifacts to local files such as output/raw_data.json and report JSON/HTML files, but the skill does not clearly warn users about this persistence. Local storage of potentially sensitive account analysis can create confidentiality and retention risks, especially on shared systems or managed agent runtimes.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This manifest-style JSON file contains user-facing schema keys entirely in Chinese, such as 数据获取时间, 账号名, and 综合诊断结论内容. Because the file provides no indication that the skill is region-specific or that users may opt into this locale, it appears to enforce a specific language by default.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The HTML root declares lang="zh-CN" and the visible UI text is entirely in Chinese, with no indication that the user can choose another language or that the skill is intentionally limited to a China-specific audience. Under the policy, forcing a specific language or locale without opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The HTML root sets lang="zh-CN", and the visible report text throughout the template is exclusively in Simplified Chinese. This imposes a specific language/locale on all users without any opt-in, fallback, or justification that the skill is region-specific.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The guide instructs sending user account identifiers to a third-party endpoint and using an API key, but it provides no privacy notice, consent guidance, retention expectations, or safe credential-handling guidance. In a skill that analyzes social-media accounts, this increases the risk of unauthorized data sharing, accidental disclosure of user-provided identifiers, and unsafe secret management by downstream implementers.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This markdown template is entirely written in Chinese and includes a fixed Chinese response structure, ending with a Chinese instruction to continue analysis. That indicates the skill output is constrained to a specific language/locale without any opt-in, choice, or documented region-specific justification, which matches the language-policy violation criteria.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The file is entirely framed as a Chinese-language workflow and even prescribes a fixed Chinese standard opening statement, which effectively forces a specific language for the skill's interaction. There is no indication that the user may choose another language or opt into Chinese, so this is a natural-language locale policy concern.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The workflow instructs the agent to automatically perform web searches on a person's nickname, interviews, media reports, and cross-platform presence without any explicit user notice, consent check, or data-minimization guardrail. In an account-analysis context, this increases the risk of collecting and correlating personal profile data across platforms beyond what the user may expect, which can expose privacy-sensitive information or enable profiling.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This code performs a direct file write back to the path supplied by --html, replacing the original contents in place. Although the script name and comments imply checking/fixing HTML, there is no runtime warning, confirmation prompt, or explicit disclosure near the write operation that the original file will be modified.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The code builds HTML by directly interpolating untrusted fields such as titles, URLs, publish times, interaction counts, and similar account metadata into HTML fragments without any escaping or URL validation. If report_data contains attacker-controlled content, this can produce stored HTML/script injection in the generated report, leading to script execution when the report is opened locally or hosted/viewed in a browser.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The multi-account detail builder embeds untrusted values directly into an HTML template, including avatar in an img src attribute and account names, tags, scores, and narrative text inside markup. Because these values are not escaped or sanitized, a crafted account field can break out of the intended context and inject active HTML or JavaScript into the generated report.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill sends user-supplied account identifiers to a third-party endpoint and authenticates with an API key, but there is no user-facing disclosure or consent mechanism. In this skill context, the whole purpose is analyzing social-media accounts, so outbound transfer is expected technically, but undisclosed external transmission still creates privacy, compliance, and trust risks.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill writes fetched account/profile data and later analysis results to local files under output/ without warning the user. This is risky because profile and behavioral data may persist longer than expected, be accessible to other local processes or users, and create an undeclared retention surface.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The code documents raw_data.json as containing raw API output, but on successful single-account queries it overwrites that file with transformed analysis results. This inconsistency is dangerous because downstream components may trust the file as raw source data, causing integrity issues, incorrect processing, and accidental disclosure of enriched profile data beyond what operators expect.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The query flow enforces a per-account failure threshold and, once exceeded, blocks further use while directing users to an external contact email/site. That behavior goes beyond pure account analysis and creates a soft lockout/lead-generation funnel, which is risky because it can deny service and steer users toward an off-platform channel under error conditions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

This HTML code provides an export button that converts the report into an image and immediately downloads it via a generated link click. Although the action is user-initiated, there is no accompanying disclosure near the control explaining that report data will be saved locally as a PNG file.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.dynamic_code_execution, suspicious.insecure_tls_verification

Dynamic code execution detected.

Critical
Code
suspicious.dynamic_code_execution
Location
scripts/xiaohongshu_analyzer.py:105

HTTPS certificate verification is disabled.

Warn
Code
suspicious.insecure_tls_verification
Location
scripts/xiaohongshu_analyzer.py:142