Back to skill

Security audit

知乎发帖 (Zhihu Post via Browser Relay)

Security checks for vulnerabilities and agentic risk

Overview

The skill openly automates posting to Zhihu, but it can publish through a logged-in browser session without a strong final confirmation gate.

Install only if you are comfortable letting the agent operate a logged-in Zhihu tab. Before use, keep the target tab visible, review the exact title and body, and require an explicit final confirmation before any publish button is clicked. Treat generated HTML from the helper script as untrusted unless sanitized.

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/zhihu_prepare.py:30
Finding

Unescaped Markdown Content Produces Unsafe HTML

Content
View full analysis
{line[4:]}') elif line.startswith('## '): html_lines.append(f'

{line[3:]}

') elif line.startswith('# '): html_lines.append(f'

{line[2:]}

') # 分隔线 elif re.match(r'^---+$', line): html_lines.append('
') # 空行 elif line == '': html_lines.append('') else: # 行内格式 line = re.sub(r'\*\*(.+?)\*\*', r'\1', line) line = re.sub(r'\*(.+?)\*', r'\1', line) line = re.sub(r'`(.+?)`', r'\1', line) line = re.sub(r'\[(.+?)\]\((.+?)\)', r'\1', line) html_lines.append(f'

{line}

') ``` ### Technical Analysis The Markdown converter interpolates user-controlled text directly into HTML elements without applying context-appropriate HTML escaping. This affects heading text, paragraph text, inline formatting content, link labels, and link destinations. For example, the following input remains active markup in the generated `html` field: ```markdown ``` The link conversion also places an arbitrary user-controlled value inside an `href` attribute without escaping the attribute or validating its URI scheme: ```markdown [Open link](javascript:alert(document.domain)) ``` This produces: ```html Open link ``` The script serializes the result as JSON and does not itself render or execute it. Exploitation therefore requires a downstream component to insert the generated `html` value into an HTML-capable context without additional sanitization. Becau ...[truncated 1826 chars]
Remediation
View remediation
[link](javascript:alert(1)) [link](" onmouseover="alert(1)) **** ``` A hardened implementation should ensure these inputs are escaped, rejected, or reduced to safe allowlisted markup. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (6)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

声明描述的核心能力是“发布到知乎”,且明确依赖 Chrome Browser Relay 控制浏览器完成发布。但代码实际只做输入解析、长度校验、Markdown 到 HTML 转换和统计输出,属于发帖前的辅助预处理组件。它没有访问知乎、没有网络请求、没有浏览器自动化、没有用户会话操作,也没有将内容提交到任何平台。虽然这段代码可能是完整技能中的支持模块,但就所给代码块本身而言,其实际行为与声明的主要用途存在明显差异,因此应判定为描述与代码行为不匹配。

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The README explains that the skill takes over a logged-in Chrome tab and publishes directly to Zhihu, but it does not prominently warn users that the agent can perform irreversible posting actions in their authenticated browser session. In this context, omission of an explicit consent/safety warning increases the risk of unintended publication, reputational harm, or abuse if the skill is triggered with incorrect or manipulated content.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The trigger list includes broad natural-language phrases such as '发知乎' and '帮我发知乎', which can match ordinary user requests without sufficiently confirming intent to perform an external posting action. In a skill that can publish content using the user's logged-in browser, accidental invocation could cause unwanted account actions or public posting.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill automates posting to a third-party platform through the user's authenticated browser but does not prominently require an explicit warning or confirmation about account-side effects, public visibility, rate limits, or irreversible publication. Because the action affects an external account and may create publicly visible content, the absence of strong consent and warning language materially increases the risk of unintended or unauthorized posting.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The documented fallback snippet programmatically finds a usable "发布" button and clicks it immediately, with no built-in confirmation, preview, or explicit user approval step. In a browser automation skill whose purpose is posting to a live social platform, this increases the risk of accidental or unintended publication of drafts, malformed content, or user-supplied content that was not meant to be sent yet.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The README presents the skill entirely as operating in Chinese for Zhihu posting, but does not explicitly state that the language/locale restriction is inherent to the Zhihu-specific use case or offer any user choice. This can be read as a fixed language constraint without opt-in, which falls under the language/locale policy check.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.