Back to skill

Security audit

metadig

Security checks for vulnerabilities and agentic risk

Overview

The media-generation workflow is coherent, but its automatic installation and repair instructions run changing internet scripts without checking them first.

Review installation before proceeding: use a fixed CLI release with independently verified integrity and prevent troubleshooting from automatically rerunning downloaded installers. Selected reference media is uploaded and receives public URLs, so use files you are permitted to share. Generation spends account credits. This review covers the bundled instructions; the external installer and CLI were not verified.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (9)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
88% confidence
Finding

The declared purpose covers AI generation and related queries, but does not disclose general local-file uploads. Uploading existing files is a distinct data-transfer capability, and the snippet does not establish that it is merely a supporting step in a declared generation workflow.

Content

No source excerpt is available for this finding.

External Script Fetching

High
Category
Supply Chain
Confidence
99% confidence
Finding

The installation instructions execute mutable remote content directly through Bash, with an equivalent PowerShell download-and-execute command. A compromised distribution endpoint could run arbitrary code with the agent's permissions; HTTPS does not establish artifact integrity if the publisher or hosting infrastructure is compromised.

Content

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

bash
# macOS / Linux
curl -fsSL https://waytometa.cn/cli/install.sh | bash

# Windows PowerShell
iwr https://waytometa.cn/cli/install.ps1 -useb | iex

Chaining Abuse

High
Category
Tool Misuse
Confidence
98% confidence
Finding

The pipe connects network-controlled installer content directly to a shell, crossing the trust boundary from downloaded data to executable instructions without verification. This is the same underlying installation risk as the SC2 finding, rather than evidence of a separate malicious chaining campaign.

Content

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

bash
# macOS / Linux
curl -fsSL https://waytometa.cn/cli/install.sh | bash

# Windows PowerShell
iwr https://waytometa.cn/cli/install.ps1 -useb | iex

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

text

- 无法打开浏览器(服务器 / 容器 / 远程会话):`metadig login --no-open` 只打印链接,让用户在任何已登录设备上打开授权;仍不行时让用户设置环境变量 `METADIG_TOKEN`(值为访问令牌)或执行 `metadig login --token <令牌>`。
- 凭证存本机 `~/.metadig/credentials.json`(约 30 天有效)。命令报「尚未登录」或「登录已过期」→ 重新 `metadig login`。
- CLI 登录与用户的网页登录并存,不会把网页登录顶掉。

## 命令速查

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/cli-command-guide.md (reported line 25)May include surrounding context.

md
| 路径 | 内容 |
| --- | --- |
| `~/.metadig/credentials.json` | 登录凭证(权限 0600):`accessToken` / `userName` / `apiBase` / `savedAt`。约 30 天有效 |
| `~/.metadig/config.json` | 全局配置:`defaultProjectId`(首次生成自动创建的「CLI 项目」) |
| `<目录>/.metadig/project.json` | `metadig project use` 写的目录级项目绑定 `{ "projectId": "..." }`;从当前目录向上查找,子目录里执行命令也命中 |

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/common-pitfalls.md (reported line 64)May include surrounding context.

md
## 安全提醒

- 授权链接只在用户自己的设备上打开;别人的授权链接一律不点。
- 令牌只放环境变量或 `~/.metadig/credentials.json`,不要写进代码、日志或对话记录。
- `metadig logout` 删除本地凭证;`METADIG_TOKEN` 需另行清除。

External Script Fetching

High
Category
Supply Chain
Confidence
99% confidence
Finding

The documented recovery command fetches an unpinned remote installer and immediately executes it, with an equivalent PowerShell path. The escaped pipe is Markdown table syntax, not a security mitigation, so following the rendered instructions exposes the machine to compromised installer content.

Content

Scanner excerpt · references/common-pitfalls.md (reported line 9)May include surrounding context.

md
| 看到 | 原因 | 怎么做 |
| --- | --- | --- |
| `metadig: command not found` / 不是内部或外部命令 | 刚装完 PATH 未刷新,或安装脚本没跑完 | 重开终端;仍不行重跑安装脚本(`curl -fsSL https://waytometa.cn/cli/install.sh \| bash` 或 PowerShell `iwr https://waytometa.cn/cli/install.ps1 -useb \| iex`),二进制装在 `~/.metadig/`(Windows `%USERPROFILE%\.metadig\`),可先用绝对路径 `~/.metadig/metadig --version` 验证 |
| `尚未登录` | 本地没有凭证且没设 `METADIG_TOKEN` | `metadig login`;无浏览器环境见下 |
| `登录已过期或无效`(401) | 凭证约 30 天过期,或 `METADIG_TOKEN` 里是旧令牌 | `metadig login` 重新授权;检查是否有过期的 `METADIG_TOKEN` 在覆盖本地凭证 |
| `令牌无效或已过期` | `--token` 给的令牌不可用,CLI 已把它清掉 | 确认令牌来源;优先走 `metadig login` 浏览器授权 |

Troubleshooting instructs execution of remotely downloaded installers without a security warning.

Medium
Category
Output Handling
Confidence
98% confidence
Finding

Troubleshooting recommends rerunning remotely fetched scripts directly in Bash or PowerShell, without verifying the downloaded code. This makes a routine recovery step an arbitrary-code execution opportunity if the installer distribution is compromised; adding a warning alone would not remove the underlying risk.

Content

No source excerpt is available for this finding.

The workflow submits a local reference image for remote generation without warning that its contents leave the user's machine.

Medium
Category
Output Handling
Confidence
88% confidence
Finding

The example instructs the agent to pass a local image to the platform's video-generation service. Although the guide explains billing, canvas storage, and public output URLs, it does not disclose that reference media is uploaded for external processing, which matters when users supply private images.

Content

No source excerpt is available for this finding.