Back to skill

Security audit

Flomo笔记同步

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it says at a high level: it sends user-provided notes to a configured flomo webhook, with some privacy and credential-handling cautions.

Install only if you are comfortable sending selected note text to the webhook URL stored in ~/.flomo_token. Protect that file like a password, restrict its permissions, and check that it contains the intended flomo HTTPS webhook before using the skill with private or business-sensitive notes.

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/flomo.sh:9
Finding

Unprotected Webhook Credential and Unrestricted Request Destination

Content
View full analysis

Vulnerability Details

File Location: scripts/flomo.sh, lines 9–20
Vulnerability Type: Unprotected sensitive configuration and insufficient destination validation
Risk Level: Medium

Vulnerable Code

bash
WEBHOOK_URL=$(cat ~/.flomo_token)
CONTENT="$1"

if [ -z "$CONTENT" ]; then
    exit 1
fi

response=$(curl -s -X POST -H "Content-Type: application/json" -d "$(jq -n --arg content "$CONTENT" '{"content": $content}')" "$WEBHOOK_URL")

The associated configuration instructions in SKILL.md, line 8, direct users to store the webhook URL in ~/.flomo_token without requiring restrictive file permissions.

Technical Analysis

The webhook URL is a bearer credential because possession of the complete URL can permit requests to the associated flomo account. The script reads this credential from a plaintext file without checking whether the file is owned by the current user or accessible to group and other users.

The value read from the file is also used directly as the curl destination. The script does not require HTTPS or verify that the destination belongs to an expected flomo domain. Although the URL is quoted and therefore does not directly provide shell command injection, modification of the configuration file can redirect note contents to an attacker-controlled server.

Attack Path

  1. An attacker with local read access obtains ~/.flomo_token if it was created with permissive permissions.
  2. The attacker reuses the exposed bearer URL to submit unauthorized content to the victim's flomo account.

Alternatively:

  1. An attacker with permission to modify ~/.flomo_token replaces the legitimate URL with an attacker-controlled endpoint.
  2. The user invokes the skill with private note content.
  3. The script reads the modified URL without validating its scheme or hostname.
  4. curl sends the note content to the attacker's endpoint.

Impact Assessment

Exploitation does not ...[truncated 313 chars]

Remediation
View remediation

Remediation Suggestions

  • Require the token file to be owned by the current user and reject symbolic links or files with group or other permissions.
  • Document secure creation and enforce mode 0600, for example with chmod 600 "$HOME/.flomo_token".
  • Validate that the configured URL uses https:// and matches the officially supported flomo webhook hostname and path structure.
  • Invoke curl with transport and HTTP failure controls, such as --proto '=https', --fail-with-body, and --show-error.
  • Use -- before the validated URL to mark the end of command options.
  • Consider storing the webhook in an operating-system credential manager rather than a plaintext file.
  • Avoid displaying or logging the webhook URL, and provide credential-rotation instructions for suspected disclosure.
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
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (7)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

代码的核心功能确实是把提供的文本发送到 flomo webhook,这与“同步到 flomo”这一主目的基本一致。但描述中额外宣称了“自动标签识别、内容格式化”等能力,而代码只是读取 webhook、获取入参并原样 POST,不存在标签解析或格式化逻辑。此外,描述提到的触发关键词也未在该代码中实现。虽然读取 ~/.flomo_token 属于实现所需的配置访问,并非严重越权,但功能描述相较实际行为有明显夸大,因此应判定为不匹配。

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
83% confidence
Finding

The skill invokes a shell script but does not declare any tool scope or allowed tools, so its execution capabilities are not transparently constrained. This increases the risk of unintended shell access or broader command execution than users or reviewers expect, especially because note content is passed to an external-syncing script.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger conditions are broad enough that the skill may activate on casual mentions of flomo, causing content to be sent externally when the user did not clearly intend a webhook transmission. In a note-sync skill, ambiguous activation is security-relevant because it can lead to accidental disclosure of sensitive user text to a third-party endpoint.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill description does not warn users that their note content will be transmitted to an external flomo webhook, which can expose sensitive personal or business information. Because the skill is designed to handle arbitrary note content, lack of disclosure and consent materially increases privacy and data-leakage risk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script's comments, usage instructions, and runtime messages are entirely in Chinese, which imposes a specific language on users without any opt-in or explanation of a locale-specific requirement. This matches the policy category for language or locale constraints that are not user-selectable or justified.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
89% confidence
Finding

This skill transmits arbitrary user-provided content to an external webhook with no confirmation, allowlisting, or visibility into what data may leave the host. In the context of an agent skill that may be triggered by natural-language cues, this increases the chance of accidental exfiltration of sensitive notes, prompts, or secrets to a third-party endpoint controlled by whoever set the webhook.

Content

Scanner excerpt · scripts/flomo.sh (reported line 20)May include surrounding context.

sh
fi

# 发送请求
response=$(curl -s -X POST -H "Content-Type: application/json" -d "$(jq -n --arg content "$CONTENT" '{"content": $content}')" "$WEBHOOK_URL")

# 解析返回结果
code=$(echo "$response" | jq -r '.code')

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

This shell script reads a webhook URL from ~/.flomo_token, which is a credential-like secret, but there is no explicit warning or comment to the user about storing and using sensitive authentication material. Although the script logs success and failure for the network action, it does not disclose the sensitivity of the token file or advise safe handling of that secret.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.