Back to skill

Security audit

Canvas Workspace

Security checks for vulnerabilities and agentic risk

Overview

The skill is for image canvas workflows, but it asks agents to automatically run mutable external code and persist API keys while under-disclosing some data exposure.

Review this skill carefully before installing. Use it only in a restricted environment, avoid automatic activation, pin and verify the npm package version, do not store provider API keys in shell startup files, and do not pass sensitive local files or internal URLs as image inputs unless you intend them to be sent to the selected service.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (5)

T03 · Remote Payload Retrieval and Execution

Error
Location
SKILL.md:28
Finding

Mandatory execution of an unpinned remote npm package

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:68
Finding

API keys are required to be stored persistently in plaintext startup configuration

Content
View full analysis
> ~/.bashrc echo 'export QWEN_TEXT_IMAGE_MODEL="qwen-image-2.0-pro"' >> ~/.bashrc echo 'export QWEN_BASE_URL="https://dashscope.aliyuncs.com/api/v1"' >> ~/.bashrc echo 'export QWEN_EDIT_IMAGE_API_KEY="user-provided value"' >> ~/.bashrc echo 'export QWEN_EDIT_IMAGE_MODEL="qwen-image-edit"' >> ~/.bashrc source ~/.bashrc ``` ``` The Windows instructions similarly use permanent user-level environment variables: ```powershell [Environment]::SetEnvironmentVariable("QWEN_TEXT_IMAGE_API_KEY", "user-provided value", "User") [Environment]::SetEnvironmentVariable("QWEN_EDIT_IMAGE_API_KEY", "user-provided value", "User") ``` ### Technical Analysis The Skill explicitly prohibits session-only configuration and requires API credentials to be persisted. On macOS and Linux, keys are appended in plaintext to shell startup files. These files are long-lived, are commonly included in backups or dotfile synchronization, and may be read by other processes running under the user account. Permanent user environment variables on Windows similarly expand secret lifetime and make credentials available to later processes in the user's session. Repeated activation may also append duplicate entries to shell configuration. Image generation only requires a key while a provider request is being made. Permanent storage therefore exceeds the minimum privilege and lifetime necessary for the declared functionality. ### Attack Path 1. The user supplies an image-provider API key. 2. The Agent follows the mandatory setup instructions and writes it to a persistent user environment or shell startup file. 3. The secret remains availabl ...[truncated 557 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/push_to_canvas.py:27
Finding

Unrestricted image and marker URL fetching enables SSRF and resource exhaustion

Content
View full analysis
str: """Download a remote image and upload it to the local server.""" req = urllib.request.Request(image_url, headers={"User-Agent": "Mozilla/5.0"}) with urllib.request.urlopen(req, timeout=60) as resp: image_data = resp.read() content_type = resp.headers.get("Content-Type", "image/png") ext = ".png" if "jpeg" in content_type or "jpg" in content_type: ext = ".jpg" elif "webp" in content_type: ext = ".webp" elif "gif" in content_type: ext = ".gif" filename = f"gen_{uuid.uuid4().hex[:12]}{ext}" boundary = uuid.uuid4().hex body = ( f"--{boundary}\r\n" f'Content-Disposition: form-data; name="image"; filename="{filename}"\r\n' f"Content-Type: {content_type}\r\n\r\n" ).encode("utf-8") + image_data + f"\r\n--{boundary}--\r\n".encode("utf-8") upload_req = urllib.request.Request( f"{CANVAS_SERVER}/api/upload/image", data=body, headers={"Content-Type": f"multipart/form-data; boundary={boundary}"}, method="POST", ) with urllib.request.urlopen(upload_req, timeout=30) as resp: result = json.loads(resp.read().decode("utf-8")) return result.get("url", image_url) ``` Equivalent unrestricted fetches occur in `scripts/image_to_base64.py:31-38`: ```python if image_path.startswith(("http://", "https://")): req = urllib.request.Request(image_path, headers={"User-Agent": "Mozilla/5.0"}) with urllib.request.urlopen(req, timeout=60) as resp: data = resp.read() content_type = resp.headers.get("Content-Type", "image/png") ``` Marker files are also fetched without ...[truncated 2137 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/qwen_edit_image.py:63
Finding

Arbitrary local image contents are uploaded to Qwen despite contradictory privacy disclosure

Content
View full analysis
str: """Download an image and convert it to a base64 data URL.""" from image_to_base64 import image_to_base64 return image_to_base64(image_ref) def call_qwen(prompt: str, image_refs: list[str]) -> str: """Call the Qwen image-editing API and return the result URL.""" if not QWEN_EDIT_IMAGE_API_KEY: raise RuntimeError("Please set QWEN_EDIT_IMAGE_API_KEY") from dashscope import MultiModalConversation import dashscope dashscope.base_http_api_url = QWEN_BASE_URL content = [{"image": download_as_base64(ref)} for ref in image_refs] content.append({"text": prompt}) response = MultiModalConversation.call( api_key=QWEN_EDIT_IMAGE_API_KEY, model=QWEN_EDIT_IMAGE_MODEL, messages=[{"role": "user", "content": content}], stream=False, n=1, watermark=False, ) ``` The conversion helper reads any existing local file in `scripts/image_to_base64.py:39-48`: ```python elif os.path.isfile(image_path): mime_type, _ = mimetypes.guess_type(image_path) content_type = mime_type or "image/png" with open(image_path, "rb") as f: data = f.read() else: raise RuntimeError(f"Unrecognized image path: {image_path}") encoded = base64.b64encode(data).decode("utf-8") return f"data:{content_type};base64,{encoded}" ``` This conflicts with the privacy statement at `SKILL.md:363-367`, which states that only prompts and image URLs leave the machine and that local file contents do not. ### Technical Analysis Sending source image bytes to a cloud model is functionally necessary for cloud-based editing. The security defect is that the implementation ...[truncated 1439 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/gemini_generate_image.py:17
Finding

Configurable API base URLs can redirect credentials and prompts to untrusted endpoints

Content
View full analysis
str: """Call a Gemini-compatible API and return an image URL or data URI.""" if not GEMINI_TEXT_IMAGE_API_KEY: raise RuntimeError( "Please set GEMINI_TEXT_IMAGE_API_KEY before using the Gemini generator" ) url = f"{GEMINI_BASE_URL}/v1/chat/completions" headers = { "Content-Type": "application/json", "Authorization": f"Bearer {GEMINI_TEXT_IMAGE_API_KEY}", } messages = [ { "role": "user", "content": prompt, } ] body = { "model": GEMINI_TEXT_IMAGE_MODEL, "messages": messages, "stream": False, } data = json.dumps(body).encode("utf-8") req = urllib.request.Request(url, data=data, headers=headers, method="POST") with urllib.request.urlopen(req, timeout=300) as resp: result = json.loads(resp.read().decode("utf-8")) ``` Equivalent endpoint configurability exists in: - `scripts/qwen_generate_image.py:15-39` - `scripts/qwen_edit_image.py:30-33,69-91` For Qwen, the configured value is assigned to the SDK's global API base URL before the API key and user content are submitted. ### Technical Analysis No validation requires HTTPS, checks the destination hostname, or distinguishes official provider endpoints from arbitrary cu ...[truncated 1550 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
Findings (46)

Tainted flow: 'req' from os.environ.get (line 129, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

The request URL is derived from environment-controlled GEMINI_BASE_URL and then used in urllib.request.urlopen with an Authorization header carrying the Gemini API key. If an attacker can influence the environment or deployment config, they can redirect requests to an attacker-controlled host and exfiltrate the credential and prompt data; in this image-generation skill, transmitting prompts externally is expected, but allowing the destination itself to be overridden materially increases risk.

Content

Scanner excerpt · scripts/gemini_generate_image.py (reported line 52)May include surrounding context.

python
req = urllib.request.Request(url, data=data, headers=headers, method="POST")

    try:
        with urllib.request.urlopen(req, timeout=300) as resp:
            result = json.loads(resp.read().decode("utf-8"))
    except urllib.error.HTTPError as e:
        error_body = e.read().decode("utf-8", errors="replace")

Tainted flow: 'req' from os.environ.get (line 129, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

The upload target is derived from environment-controlled CANVAS_SERVER and used for a POST of image content. If an attacker can set this variable, the skill can be coerced into sending generated image data or large payloads to an unintended internal or external endpoint, creating SSRF/data exfiltration risk; the canvas context makes local uploads expected, but not arbitrary destination control.

Content

Scanner excerpt · scripts/gemini_generate_image.py (reported line 136)May include surrounding context.

python
method="POST",
    )
    try:
        with urllib.request.urlopen(req, timeout=30) as resp:
            result = json.loads(resp.read().decode("utf-8"))
            return result.get("url", "")
    except Exception:

Tainted flow: 'req' from os.environ.get (line 74, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
91% confidence
Finding

The script fetches an attacker-controlled image_url with urllib and only distinguishes 'local' vs 'non-local' by hostname prefix, without validating scheme, resolving redirects, or restricting destinations. In an agent skill context, this creates an SSRF primitive that can reach internal services, cloud metadata endpoints, or local resources, and it also downloads arbitrary-sized content into memory, increasing abuse potential.

Content

Scanner excerpt · scripts/push_to_canvas.py (reported line 30)May include surrounding context.

python
def _download_and_upload(image_url: str) -> str:
    """下载远程图片并上传到本地服务器,返回本地 URL"""
    req = urllib.request.Request(image_url, headers={"User-Agent": "Mozilla/5.0"})
    with urllib.request.urlopen(req, timeout=60) as resp:
        image_data = resp.read()
        content_type = resp.headers.get("Content-Type", "image/png")

Tainted flow: 'upload_req' from os.environ.get (line 50, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/push_to_canvas.py (reported line 56)May include surrounding context.

python
headers={"Content-Type": f"multipart/form-data; boundary={boundary}"},
        method="POST",
    )
    with urllib.request.urlopen(upload_req, timeout=30) as resp:
        result = json.loads(resp.read().decode("utf-8"))
        return result.get("url", image_url)

Tainted flow: 'req' from os.environ.get (line 74, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/push_to_canvas.py (reported line 80)May include surrounding context.

python
headers={"Content-Type": "application/json"},
        method="POST",
    )
    with urllib.request.urlopen(req, timeout=10) as resp:
        resp.read()
    return element_id, final_url

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill description emphasizes canvas/image operations, but the actual behavior includes local file reading, remote content retrieval from user-provided URLs, and image-to-base64 conversion tooling not clearly declared as separate sensitive capabilities. This mismatch undermines informed consent and can hide broader data access and network behavior than a user expects.

Content

No source excerpt is available for this finding.

YARA rule 'backdoor_persistence': Backdoor persistence with malicious payloads (shell commands, SSH key injection, hidden root users) [malware]

High
Category
YARA Match
Confidence
90% confidence
Finding

Appending secrets to ~/.bashrc establishes persistence for sensitive credentials across future sessions. While this is not a malware backdoor in the classic sense, it creates durable secret exposure in a broadly readable/configuration location and can be abused by later processes or accidental disclosure.

Content

Scanner excerpt · SKILL.md (reported line 91)May include surrounding context.

ronment]::SetEnvironmentVariable("QWEN_BASE_URL", "https://dashscope.aliyuncs.com/api/v1", "User")

[Environment]::SetEnvironmentVariable("QWEN_EDIT_IMAGE_API_KEY", "用户提供的值", "User") [Environment]::SetEnvironmentVariable("QWEN_EDIT_IMAGE_MODEL", "qwen-image-edit", "User")

text

> 设置后需要**重启终端**才能生效。

Mac/Linux(追加到 ~/.bashrc 或 ~/.zshrc):

```bash
echo 'export QWEN_TEXT_IMAGE_API_KEY="用户提供的值"' >> ~/.bashrc
echo 'export QWEN_TEXT_IMAGE_MODEL="qwen-image-2.0-pro"' >> ~/.bashrc
echo 'export QWEN_BASE_URL="https://dashscope.aliyuncs.com/api/v1"' >> ~/.bashrc

echo 'export QWEN_EDIT_IMAGE_API_KEY="用户提供的值"' >> ~/.bashrc
echo 'export QWEN_EDIT_IMAGE_MODEL="qwen-image-edit"' >> ~/.bashrc

source ~/.bashrc

如果文生图和编辑图使用同一个 Qwen Key,两个 API_KEY 填同一个值即可。 QWEN_BASE_URL 有默认值,不设也行;如果用新加坡地域需改成 `https://dashscope-intl.aliyuncs.com

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The README advertises pushing arbitrary image URLs to the canvas but does not warn that this triggers external network fetches and modifies workspace state. In practice, this can enable SSRF-style access to internal endpoints, unreviewed ingestion of attacker-controlled content, privacy leaks, or accidental contamination of a shared canvas if operators assume it is a local-only action.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding

The README instructs users to run an npm package via npx without pinning a specific version, which causes execution of whatever package version is current at install time. If the package is compromised, unpublished/republished, or a malicious update is released, users may execute attacker-controlled code immediately on their machine.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding

This example again uses npx without an exact version, so the command resolves and executes the latest published package at runtime. That creates a supply-chain execution path where a malicious or tampered package release can run arbitrary code under the user's account.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding

The edit example repeats the unsafe pattern of invoking an unpinned package through npx. Because this skill is specifically meant to be copied and executed by users, the documentation materially increases the chance of arbitrary code execution through package-supply-chain compromise.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding

This push example also relies on executing the latest npm package version via npx, which is unsafe in security-sensitive documentation. Since the command may be used in automated or trusted workflows, a compromised upstream release could lead to immediate code execution and downstream workspace abuse.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill declares substantial capabilities—network access, environment-variable handling, and file interaction—without an explicit tool scope or permissions boundary. That omission increases the chance an agent executes sensitive actions without clear user consent or policy enforcement, especially because the workflow includes package execution, remote API use, and local data handling.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The activation keywords are broad enough to match many ordinary image-related conversations, increasing the chance the skill auto-activates unexpectedly. Because activation leads to process execution and secret-collection instructions, overbroad triggering materially raises risk.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill mandates automatic execution of an external npm package immediately on activation. Requiring unconditional install-and-run behavior before user confirmation exceeds normal documentation scope and creates a direct remote-code-execution path whenever the skill triggers.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
98% confidence
Finding

The skill instructs running an external npm package with the @latest tag, which allows code to change over time without review. This creates a supply-chain risk: a compromised or malicious future package version would be executed automatically on activation.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
98% confidence
Finding

Using npx to invoke an unpinned package permits arbitrary upstream changes to be installed and executed. Because this step is framed as part of mandatory startup, the exposure is immediate and automatic rather than optional.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
98% confidence
Finding

This command again relies on an unpinned external package, preserving the same supply-chain execution risk. Repetition throughout the skill increases the likelihood that an agent will execute the package in multiple contexts.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The instructions prescribe exact user-facing wording in Chinese ('对用户这样说') and present the skill behavior entirely in Chinese without indicating that the language should follow user preference. This creates a locale/language policy risk because it may force a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill instructs collecting user API keys and persisting them as permanent OS-level environment variables, which is broader and more durable than needed for a single task. Persisting secrets in shell startup files or user environment settings increases exposure to later theft by unrelated processes, logs, backups, or future sessions.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 117)May include surrounding context.

powershell
[Environment]::SetEnvironmentVariable("GEMINI_TEXT_IMAGE_API_KEY", "用户提供的值", "User")
[Environment]::SetEnvironmentVariable("GEMINI_TEXT_IMAGE_MODEL", "gemini-3.1-flash-image", "User")
[Environment]::SetEnvironmentVariable("GEMINI_BASE_URL", "https://api.example.com/v1", "User")

设置完成后告知用户画布已就绪,可以开始使用。

Rp1

Medium
Category
MCP Rug Pull
Confidence
98% confidence
Finding

The generation workflow calls an unpinned npm package, so image-generation requests can trigger installation and execution of code that has not been reviewed in advance. In an agent setting, this widens the attack surface beyond simple API invocation.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
98% confidence
Finding

The Gemini variant has the same unpinned package risk as the default provider path. An attacker controlling or compromising the package could affect all supported providers uniformly.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
98% confidence
Finding

The edit workflow still depends on unpinned remote code execution via npx. Because edit operations may process user-supplied URLs and files, combining that with mutable upstream code materially increases risk.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
98% confidence
Finding

This invocation again allows latest-package execution for image editing, which is a classic supply-chain exposure. The risk is amplified because the command consumes user-controlled image sources.

Content

No source excerpt is available for this finding.