T03 · Remote Payload Retrieval and Execution
- Location
scripts/detect-env.js:43- Finding
Privileged Remote Script Execution Recommended Without Integrity Verification
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill appears to be a real image compressor, but its setup path includes unsafe privileged install guidance that users should review before installing.
Install only if you are comfortable with a Node/sharp-based local image tool that runs npm install and processes files or folders you select. Do not copy the Linux curl | sudo bash Node installation commands from its environment output; use official Node.js or OS package-manager instructions instead. Prefer reviewing and pinning dependencies with a lockfile before use.
scripts/detect-env.js:43Privileged Remote Script Execution Recommended Without Integrity Verification
package.json:6Non-Reproducible Installation of Mutable npm Dependencies
The skill is presented as an image compression utility, but it also performs environment discovery and installation guidance involving system-level command execution. That mismatch matters because users may consent to image processing without realizing the skill can inspect local development tooling and trigger dependency installation flows, expanding the attack surface beyond the stated purpose.
The skill is presented as an image compression utility, but it also performs environment discovery and installation guidance involving system-level command execution. That mismatch matters because users may consent to image processing without realizing the skill can inspect local development tooling and trigger dependency installation flows, expanding the attack surface beyond the stated purpose.
Referenced artifact was not completely inspected
node scripts/detect-env.js
Referenced artifact was not completely inspected
node scripts/install.js
Referenced artifact was not completely inspected
node scripts/compress.js ~/Pictures/photo.png --quality 0.8
Referenced artifact was not completely inspected
node scripts/compress.js ~/Pictures/photo.png --quality 0.8
Referenced artifact was not completely inspected
node scripts/compress.js ~/Pictures/photo.png --quality 0.8
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
.option('-r, --recursive', '递归处理子文件夹', false)
.option('-o, --outputDir <dir>', '输出目录', '')
.option('-p, --preset <preset>', '压缩预设 (web, wechat, email, quality)', '')
.option('--no-confirm', '跳过确认提示', false)
.action(compress);
program.parse();
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
.option('-r, --recursive', '递归处理子文件夹', false)
.option('-o, --outputDir <dir>', '输出目录', '')
.option('-p, --preset <preset>', '压缩预设 (web, wechat, email, quality)', '')
.option('--no-confirm', '跳过确认提示', false)
.action(compress);
program.parse();
Piping network data directly into sudo is a classic high-risk pattern because it executes unaudited remote content with administrative privileges. The danger is amplified here by sudo -E, and by the likelihood that users will copy the exact command from the tool’s output.
},
linux: {
official: 'https://nodejs.org/en/download',
ubuntu: 'curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - && sudo apt-get install -y nodejs',
centos: 'curl -fsSL https://rpm.nodesource.com/setup_lts.x | sudo bash - && sudo yum install -y nodejs',
description: 'Linux'
}
Piping network data directly into sudo is a classic high-risk pattern because it executes unaudited remote content with administrative privileges. The danger is amplified here by sudo -E, and by the likelihood that users will copy the exact command from the tool’s output.
},
linux: {
official: 'https://nodejs.org/en/download',
ubuntu: 'curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - && sudo apt-get install -y nodejs',
centos: 'curl -fsSL https://rpm.nodesource.com/setup_lts.x | sudo bash - && sudo yum install -y nodejs',
description: 'Linux'
}
The curl ... | sudo bash pattern is dangerous because it collapses download and privileged execution into a single opaque step. If the downloaded content is malicious or tampered with, it can immediately obtain root-level code execution on the user’s system.
linux: {
official: 'https://nodejs.org/en/download',
ubuntu: 'curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - && sudo apt-get install -y nodejs',
centos: 'curl -fsSL https://rpm.nodesource.com/setup_lts.x | sudo bash - && sudo yum install -y nodejs',
description: 'Linux'
}
};
The curl ... | sudo bash pattern is dangerous because it collapses download and privileged execution into a single opaque step. If the downloaded content is malicious or tampered with, it can immediately obtain root-level code execution on the user’s system.
linux: {
official: 'https://nodejs.org/en/download',
ubuntu: 'curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - && sudo apt-get install -y nodejs',
centos: 'curl -fsSL https://rpm.nodesource.com/setup_lts.x | sudo bash - && sudo yum install -y nodejs',
description: 'Linux'
}
};
The skill clearly instructs the agent to invoke shell commands such as node scripts/detect-env.js, node scripts/install.js, and npm install, but it does not declare any permissions or allowed-tools scope. This creates a trust-boundary problem where a nominally simple image utility can execute host commands without explicit capability declaration, increasing the risk of unexpected command execution and making review and policy enforcement harder.
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
### Linux
- Install dependencies: `sudo apt-get install libvips-dev`
- May need `libimagequant-dev` for PNG
## Configuration Schema
The script's natural-language interface, including CLI descriptions, prompts, errors, and status messages, is hard-coded in Chinese throughout the file. This forces a specific language on users without opt-in or documented regional justification, which matches the locale-policy violation criteria.
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
.option('-r, --recursive', '递归处理子文件夹', false)
.option('-o, --outputDir <dir>', '输出目录', '')
.option('-p, --preset <preset>', '压缩预设 (web, wechat, email, quality)', '')
.option('--no-confirm', '跳过确认提示', false)
.action(compress);
program.parse();
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
.option('-r, --recursive', '递归处理子文件夹', false)
.option('-o, --outputDir <dir>', '输出目录', '')
.option('-p, --preset <preset>', '压缩预设 (web, wechat, email, quality)', '')
.option('--no-confirm', '跳过确认提示', false)
.action(compress);
program.parse();
Batch mode forces noConfirm: true for every file, bypassing the only large-file warning path and proceeding directly to write outputs. In recursive directory processing, this can trigger substantial CPU, memory, and disk consumption on many large files without an effective per-item or aggregate user acknowledgment.
The manifest explicitly says the skill does not handle file management and is for image compression/format conversion only, but the implementation reads a config file from the user's home workspace and defaults output into a managed Downloads folder structure. While writing compressed images is expected, maintaining dated output directories and consulting external configuration expands behavior beyond the narrowly described image-only operations.
The file contains natural-language comments and console messages in Chinese, and all user-facing status and installation guidance later in the script also assume Chinese. Because the skill does not offer a language/locale choice or state that it is intentionally limited to a Chinese-speaking context, this is a language-policy issue under the natural-language policy rule.
Using sudo -E is especially risky because it preserves user-controlled environment variables while invoking a privileged shell on remotely sourced content. That combination can magnify exploitation paths and is unnecessary for simple user guidance in an environment detection script.
},
linux: {
official: 'https://nodejs.org/en/download',
ubuntu: 'curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - && sudo apt-get install -y nodejs',
centos: 'curl -fsSL https://rpm.nodesource.com/setup_lts.x | sudo bash - && sudo yum install -y nodejs',
description: 'Linux'
}
Using sudo -E is especially risky because it preserves user-controlled environment variables while invoking a privileged shell on remotely sourced content. That combination can magnify exploitation paths and is unnecessary for simple user guidance in an environment detection script.
},
linux: {
official: 'https://nodejs.org/en/download',
ubuntu: 'curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - && sudo apt-get install -y nodejs',
centos: 'curl -fsSL https://rpm.nodesource.com/setup_lts.x | sudo bash - && sudo yum install -y nodejs',
description: 'Linux'
}
The CentOS/RHEL guidance includes sudo bash - for a remotely fetched setup script, encouraging execution of unverified code as root. In a skill context, users may trust and paste the command blindly, turning documentation text into a practical path for system compromise.
linux: {
official: 'https://nodejs.org/en/download',
ubuntu: 'curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - && sudo apt-get install -y nodejs',
centos: 'curl -fsSL https://rpm.nodesource.com/setup_lts.x | sudo bash - && sudo yum install -y nodejs',
description: 'Linux'
}
};
The dependency uses a caret range (^12.1.0), which allows automatic installation of newer minor/patch releases instead of a fully fixed version. This weakens build reproducibility and can unexpectedly introduce a vulnerable or malicious upstream release through normal dependency resolution.
"description": "Cross-platform image compression skill",
"type": "module",
"dependencies": {
"commander": "^12.1.0",
"sharp": "^0.33.5"
}
}
Detected: suspicious.dangerous_exec