T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:154- Finding
Unverified Remote Installer Is Piped Directly to a Shell
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a real multi-provider image generator, but it needs Review because it recommends unsafe remote installers and has under-scoped credential and endpoint handling.
Install only if you are comfortable reviewing the commands and configuration first. Avoid the `curl | bash` installer, prefer a verified/pinned Dreamina install path, keep API keys in user-level secret storage rather than project files, and do not run this skill from untrusted repositories that may contain `.panda-skills/.env` or custom provider endpoints.
SKILL.md:154Unverified Remote Installer Is Piped Directly to a Shell
SKILL.md:20Unpinned Bun Runtime Is Automatically Downloaded and Executed
scripts/main.ts:148Project-Controlled Environment Configuration Can Redirect Credentials and Private Inputs
scripts/providers/replicate.ts:82Replicate Bearer Token Is Forwarded to an Unvalidated Response-Controlled Polling URL
references/config/first-time-setup.md:77Setup Guidance Encourages Plaintext API Keys in Project Files
The documentation instructs users to pipe a remote script directly into bash, which executes unverified code from the network immediately. If the remote host, transport, or published installer is compromised, this becomes instant arbitrary code execution on the user's machine.
安装 dreamina CLI:
curl -fsSL https://jimeng.jianying.com/cli | bash
dreamina login
The shell pipe into bash is a classic command-chaining pattern that bypasses review of downloaded content and directly transfers trust from a remote endpoint to local code execution. In this skill's context, the command is presented as a normal prerequisite, making accidental execution by users especially likely.
安装 dreamina CLI:
curl -fsSL https://jimeng.jianying.com/cli | bash
dreamina login
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
CLI 参数 > EXTEND.md > 环境变量 > .panda-skills/.env > ~/.panda-skills/.env
EXTEND.md 中的配置优先于环境变量。例如 EXTEND.md 设置了 default_model.google: gemini-3-pro-image-preview,即使环境变量中有 GOOGLE_IMAGE_MODEL=其他模型,也会使用 EXTEND.md 的值。
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
CLI 参数 > EXTEND.md > 环境变量 > .panda-skills/.env > ~/.panda-skills/.env
EXTEND.md 中的配置优先于环境变量。例如 EXTEND.md 设置了 default_model.google: gemini-3-pro-image-preview,即使环境变量中有 GOOGLE_IMAGE_MODEL=其他模型,也会使用 EXTEND.md 的值。
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
## 加载优先级
```
CLI 参数 > EXTEND.md > 环境变量 > .panda-skills/.env > ~/.panda-skills/.env
```
EXTEND.md 中的配置优先于环境变量。例如 EXTEND.md 设置了 `default_model.google: gemini-3-pro-image-preview`,即使环境变量中有 `GOOGLE_IMAGE_MODEL=其他模型`,也会使用 EXTEND.md 的值。
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
## 加载优先级
```
CLI 参数 > EXTEND.md > 环境变量 > .panda-skills/.env > ~/.panda-skills/.env
```
EXTEND.md 中的配置优先于环境变量。例如 EXTEND.md 设置了 `default_model.google: gemini-3-pro-image-preview`,即使环境变量中有 `GOOGLE_IMAGE_MODEL=其他模型`,也会使用 EXTEND.md 的值。
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
const home = homedir();
const cwd = process.cwd();
const sources = [
path.join(home, ".panda-skills", ".env"),
path.join(cwd, ".panda-skills", ".env"),
path.join(home, ".baoyu-skills", ".env"),
path.join(cwd, ".baoyu-skills", ".env"),
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
const home = homedir();
const cwd = process.cwd();
const sources = [
path.join(home, ".panda-skills", ".env"),
path.join(cwd, ".panda-skills", ".env"),
path.join(home, ".baoyu-skills", ".env"),
path.join(cwd, ".baoyu-skills", ".env"),
Automatically loading a .env file from the current working directory can cross a trust boundary: if a user runs the tool inside an untrusted repository, attacker-controlled environment values may be injected into the process. That can redirect provider endpoints, swap API keys, or alter downstream module behavior, especially in a multi-provider networked image-generation skill.
const cwd = process.cwd();
const sources = [
path.join(home, ".panda-skills", ".env"),
path.join(cwd, ".panda-skills", ".env"),
path.join(home, ".baoyu-skills", ".env"),
path.join(cwd, ".baoyu-skills", ".env"),
];
As with the other cwd-based path, auto-loading .env from the current directory under a legacy namespace can allow attacker-supplied configuration to influence authentication and network behavior when the tool is executed in an untrusted folder. In this context, the skill connects to external providers, so poisoned environment variables can have real outbound effects.
path.join(home, ".panda-skills", ".env"),
path.join(cwd, ".panda-skills", ".env"),
path.join(home, ".baoyu-skills", ".env"),
path.join(cwd, ".baoyu-skills", ".env"),
];
for (const src of sources) {
for (const [k, v] of Object.entries(await loadEnvFile(src))) {
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
export function isDreaminaAvailable(): boolean {
if (_cliChecked !== null) return _cliChecked;
const credPath = path.join(homedir(), ".dreamina_cli", "credential.json");
_cliChecked = existsSync(credPath);
return _cliChecked;
}
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
export function isDreaminaAvailable(): boolean {
if (_cliChecked !== null) return _cliChecked;
const credPath = path.join(homedir(), ".dreamina_cli", "credential.json");
_cliChecked = existsSync(credPath);
return _cliChecked;
}
The error message instructs users to install the CLI via 'curl ... | bash', which normalizes executing remote script content directly in a shell without integrity verification. If the remote server, DNS, TLS trust chain, or distribution pipeline is compromised, users could execute attacker-controlled code on their machine.
async function generateViaApi(prompt: string, model: string, args: CliArgs): Promise<Uint8Array> {
if (args.referenceImages.length) {
throw new Error("即梦 API 模式不支持 --ref 参考图。请安装 dreamina CLI(curl -fsSL https://jimeng.jianying.com/cli | bash)以获得参考图支持");
}
const { width, height } = resolveSize(args);
This message again recommends piping a remotely fetched script directly to bash, creating a supply-chain and arbitrary code execution risk for users following the instructions. In a developer tool or agent skill context, such guidance is especially risky because users may copy-paste suggested commands with elevated trust.
throw new Error(
"即梦需要以下任一配置:\n" +
" 1. 安装 dreamina CLI(推荐):curl -fsSL https://jimeng.jianying.com/cli | bash\n" +
" 2. 设置 JIMENG_ACCESS_KEY_ID + JIMENG_SECRET_ACCESS_KEY 环境变量"
);
}
The skill explicitly invokes shell execution, accesses environment variables for API keys, and performs network calls to multiple third-party providers, yet it declares no permissions or allowed-tools scope. This creates an overbroad execution surface where users and hosting agents cannot clearly constrain what the skill is allowed to do.
This skill sends prompts, reference images, and possibly metadata to external image-generation providers, but the description does not clearly warn users about that data flow. In an agent context, users may unintentionally provide sensitive text or images, assuming processing is local when it is not.
Using 'npx -y bun' without a pinned version allows retrieval of whatever package/version is current at execution time, which weakens supply-chain integrity and reproducibility. If the resolved package or its distribution path is compromised, the skill may execute attacker-controlled code before image generation even begins.
All user-facing instructions and prompts in this file are presented in Chinese only. Under the policy, forcing a specific language without offering a user choice or documenting the locale constraint is a natural-language policy violation.
The CLI help output and many user-visible error/status strings in this file are written only in Chinese, which imposes a specific language on users without any opt-in or alternative locale. The policy explicitly flags language or locale constraints when the skill does not offer user choice or document a justified region-specific limitation.
The function reads AZURE_OPENAI_API_KEY from the environment and sends the prompt plus any referenced local image files in HTTP requests to an Azure OpenAI endpoint. There is no confirmation prompt, visible logging/print statement, or explanatory comment/docstring in this file warning that local content and user input will be uploaded to a remote service.
This TypeScript file includes multiple user-visible error and status messages in Chinese, such as the fixed-ratio error and missing API key error. Because the file does not offer a language selection mechanism or document that it is intentionally China/Chinese-specific, it appears to enforce a specific language without user opt-in.
This error string is presented only in Chinese, forcing a specific language for user-visible output without offering a choice or documenting a locale-specific constraint. That conflicts with the policy against language or locale restrictions without user opt-in.
The thrown error for unsupported --ref usage is written only in Chinese, which imposes a language choice on users without opt-in. There is no indication this file is intentionally region-specific or that users can select their preferred language.
This code reads local files from args.referenceImages, base64-encodes them, and includes their contents in an outbound HTTP request to the Google API. There is no confirmation prompt, user-facing log/print, or inline comment/docstring warning that local image data will be uploaded to a remote service.
This thrown error is a Chinese-only user-visible message and does not provide any language choice. In the absence of a documented locale constraint, it violates the requirement not to force a specific language without user opt-in.
Detected: suspicious.dangerous_exec, suspicious.env_credential_access