Back to skill

Security audit

Mowenskill Clean

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly does what it claims, but it needs review because a documented privacy setting is ignored during note creation and local image uploads trust a server-provided destination without validation.

Install only if you are comfortable with an agent sending your note content and selected images to Mowen. Prefer MOWEN_API_KEY over --api-key, review whether a note will be public before publishing, and do not rely on privacyType during creation unless the skill is fixed to apply or reject it explicitly.

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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/publish_note.py:152
Finding

Local image uploads can be sent to an unvalidated server-provided endpoint

Content
View full analysis
{endpoint}") _multipart_upload(endpoint, form, file_path) ``` The endpoint is then used directly as the destination of the multipart request: ```python upload_url = endpoint.rstrip("/") + "/" req = Request( upload_url, data=body, headers={"Content-Type": f"multipart/form-data; boundary={boundary}"}, method="POST", ) ``` ### Technical Analysis The local-image upload workflow obtains a dynamically supplied `endpoint` from the Mowen upload-prepare API and trusts it without validating its URL scheme, hostname, port, or redirect behavior. Using a dynamic object-storage endpoint is necessary for the declared image-upload functionality. However, the implementation does not constrain that destination to Mowen-approved Alibaba OSS infrastructure. It consequently gives the remote prepare response control over where a user-selected local image and temporary signed upload fields are transmitted. The uploaded multipart body includes: - The complete contents of the selected local image. - The OSS policy and callback fields. - Temporary OSS credential and signature fields. - File and user identifiers returned by the prepare API. The long-lived `MOWEN_API_KEY` is not sent to the dynamic endpoint. It remains in the authenticated request to the fixed `https://open.mowen.cn` origin. ### Attack Path 1. A user asks the Skill to create or edit a note containing a local image. 2. The script reads th ...[truncated 1379 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/publish_note.py:351
Finding

Documented note privacy setting is silently ignored during creation

Content
View full analysis
10: _warn(f"Tag count {len(tags)} exceeds the limit of 10 and will be truncated") tags = tags[:10] for i, tag in enumerate(tags): if len(tag) > 30: _warn(f"Tag '{tag}' exceeds 30 characters and will be truncated") tags[i] = tag[:30] settings["tags"] = tags if input_data.get("autoPublish") is not None: settings["autoPublish"] = bool(input_data["autoPublish"]) payload = {"body": note_atom} if settings: payload["settings"] = settings ``` However, `SKILL.md` advertises a creation input containing a privacy field: ```json { "paragraphs": [], "tags": ["tag1", "tag2"], "autoPublish": true, "privacyType": 1 } ``` ### Technical Analysis The documented creation workflow instructs callers to collect a privacy setting and includes `privacyType` in the creation input schema. The `action_create` implementation never reads or validates that field. It only forwards `tags` and `autoPublish`. Because unsupported fields are silently ignored, the command can complete successfully while giving the user or invoking Agent the false impression that the requested privacy restriction was applied. This is particularly important when `autoPublish` is enabled, because the note may immediately become visible according to the service default rather than the user's intended privacy state. The bundled API reference indicates that privacy changes use the separate note-settings endpoint. Therefore, the creation workflow would need to call that endpoint after obtaining the new `noteId`, or the do ...[truncated 1105 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (9)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared purpose is centered on note publishing/editing/configuration for the Mowen platform. The actual code contains no API calls, no note content handling, no rich text or image processing, and no evidence of Mowen integration. Its sole purpose is test discovery and execution. This is a materially different primary purpose, so the description does not accurately represent the code chunk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared purpose describes operational functionality for interacting with Mowen's Open API to publish or manage notes. However, the provided code does not implement any such behavior; it only runs a test suite (tests/test_publish_note.py) using pytest or unittest. While this may support development of such a skill, the actual code chunk's purpose is test execution, which is materially different from the declared end-user capability. Therefore this chunk does not accurately represent the declared functionality.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
85% confidence
Finding

The skill requests access to sensitive capabilities through its documented behavior and metadata—environment secrets, local file access for image paths, and network access to the Mowen API—but does not declare any explicit tool scope or permission boundaries. In an agent environment, this weakens least-privilege controls and makes it harder to audit or constrain what the skill may access.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill instructs the agent to collect note content, images, tags, and settings and then publish them through an external API, but it does not clearly foreground that user-provided content will leave the local environment and be sent to Mowen. This creates a meaningful privacy and data-handling risk, especially if users provide sensitive text or local images without understanding the external transmission.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The documentation recommends passing the API key via --api-key or environment variable without warning that command-line arguments may be exposed in shell history, process listings, CI logs, or agent traces. This can lead to credential leakage and unauthorized use of the user's Mowen account or API quota.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The documentation enables operations that can transmit user-supplied content or remote URLs to an external service and can make notes public or change privacy settings, but it provides no guidance to require explicit user confirmation before publishing or changing visibility. In an agent skill context, this omission can lead to unintended data disclosure, especially because the skill is specifically designed to create and publish social-style notes on a third-party platform.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The module docstring, CLI description, help text, and user-facing messages are entirely in Chinese, which imposes a specific language on all users. The file does not provide an opt-in language selection or state that the tool is intended only for a Chinese-specific audience or region-bound compliance context.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

This code file contains user-facing natural-language text only in Chinese, including the module docstring and comments. The file does not offer a language choice or document a justified locale restriction, which can violate language/locale policy requirements.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

This code file contains natural-language documentation entirely in Chinese, including the primary module description and test comments, with no indication that language choice is optional or tied to a justified region-specific context. Under the policy rule for language or locale constraints, this can be treated as a forced language presentation without user opt-in.

Content

No source excerpt is available for this finding.