T03 · Remote Payload Retrieval and Execution
- Location
scripts/devbox.sh:360- Finding
Unverified Remote Bun Installer Is Piped Directly into Bash
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This appears to be a real Docker dev-environment helper, but it needs Review because it can generate Docker setups that run unverified remote installers and expose development services with weak defaults.
Review generated docker-compose.dev.yml before running it. Avoid the Bun path unless the installer is pinned or replaced, bind databases to localhost or avoid publishing their ports, change all default credentials, and do not use this on projects containing sensitive secrets without checking mounted files and env_file settings.
scripts/devbox.sh:360Unverified Remote Bun Installer Is Piped Directly into Bash
scripts/devbox.sh:759Generated Database Services Are Publicly Exposed with Fixed or Missing Authentication
references/docker-templates.md:446Reference Templates Reproduce Insecure Database Exposure and Predictable Credentials
scripts/devbox.sh:389Unvalidated User-Controlled Values Are Interpolated into Generated YAML and Shell Commands
Referenced artifact was not completely inspected
The `scripts/devbox.sh` script:
Referenced artifact was not completely inspected
The `scripts/devbox.sh` script:
The generated command downloads and immediately executes a remote script via curl | bash. If the remote endpoint, transport chain, or delivered script is compromised, arbitrary code will run in the container during setup, with access to the mounted application source and any injected environment values.
case "$pkg_mgr" in
pnpm) install_cmd="npm install -g pnpm && pnpm install --no-frozen-lockfile" ;;
yarn) install_cmd="npm install -g yarn && yarn install" ;;
bun) install_cmd="curl -fsSL https://bun.sh/install | bash && export BUN_INSTALL=/root/.bun && export PATH=\$BUN_INSTALL/bin:\$PATH && bun install" ;;
*) install_cmd="npm install" ;;
esac
This repeats the same unsafe remote-script execution pattern in the Node backend path. Because the container bind-mounts the project directory, malicious code run by the installer can tamper with source code, build artifacts, or developer secrets available inside the container.
case "$pkg_mgr" in
pnpm) install_cmd="npm install -g pnpm && pnpm install --no-frozen-lockfile" ;;
yarn) install_cmd="npm install -g yarn && yarn install" ;;
bun) install_cmd="curl -fsSL https://bun.sh/install | bash && export BUN_INSTALL=/root/.bun && export PATH=\$BUN_INSTALL/bin:\$PATH && bun install" ;;
*) install_cmd="npm install" ;;
esac
echo " command: >" >> "$COMPOSE_FILE"
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
generate_compose "$DETECTED_FW" "$PORT" "$PROJECT_PATH" "$PROJECT_NAME" "$PKG_MANAGER" "$PNPM_STORE" "$ENV_FILE"
# 更新 .gitignore
IGNORE_ENTRIES=("docker-compose.dev.yml" ".env.local" ".env.development" ".env")
case "$DETECTED_FW" in
nuxt|next|vue|react|vitepress|svelte|node)
IGNORE_ENTRIES+=("node_modules/" ".pnpm-store/")
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
generate_compose "$DETECTED_FW" "$PORT" "$PROJECT_PATH" "$PROJECT_NAME" "$PKG_MANAGER" "$PNPM_STORE" "$ENV_FILE"
# 更新 .gitignore
IGNORE_ENTRIES=("docker-compose.dev.yml" ".env.local" ".env.development" ".env")
case "$DETECTED_FW" in
nuxt|next|vue|react|vitepress|svelte|node)
IGNORE_ENTRIES+=("node_modules/" ".pnpm-store/")
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
generate_compose "$DETECTED_FW" "$PORT" "$PROJECT_PATH" "$PROJECT_NAME" "$PKG_MANAGER" "$PNPM_STORE" "$ENV_FILE"
# 更新 .gitignore
IGNORE_ENTRIES=("docker-compose.dev.yml" ".env.local" ".env.development" ".env")
case "$DETECTED_FW" in
nuxt|next|vue|react|vitepress|svelte|node)
IGNORE_ENTRIES+=("node_modules/" ".pnpm-store/")
The README encourages users to generate and run a Docker Compose configuration but does not warn that doing so may expose application and database ports, start network-reachable services, and create or modify project-side files such as compose manifests and env-related configuration. In a dev-environment skill, users are likely to execute these steps directly, so the omission increases the chance of unintended service exposure or trust in generated infrastructure without review.
The skill invokes shell scripts and instructs users to copy and execute them, but the manifest does not declare an explicit tool scope such as permissions or allowed-tools. This weakens security transparency and policy enforcement because consumers cannot easily tell that shell execution and file-writing behavior are required before use.
Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.
pnpm install --no-frozen-lockfile &&
PORT=3000 pnpm dev --host 0.0.0.0 --port 3000"
environment:
- NODE_ENV=development
- NITRO_PORT=3000
- NITRO_HOST=0.0.0.0
- CHOKIDAR_USEPOLLING=true
Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.
pnpm install --no-frozen-lockfile &&
PORT=3000 pnpm dev --host 0.0.0.0 --port 3000"
environment:
- NODE_ENV=development
- NITRO_PORT=3000
- NITRO_HOST=0.0.0.0
- CHOKIDAR_USEPOLLING=true
Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.
pnpm install --no-frozen-lockfile &&
PORT=3000 pnpm dev --host 0.0.0.0 --port 3000"
environment:
- NODE_ENV=development
- NITRO_PORT=3000
- NITRO_HOST=0.0.0.0
- CHOKIDAR_USEPOLLING=true
The script's user-facing comments, descriptions, and many runtime messages are written in Chinese, while some help text is in English, with no explicit language selection or opt-in. This creates a locale/language constraint in natural-language interaction that is not documented as optional or region-specific.
The manifest describes a tool that creates a Docker-based dev environment and generated files such as compose/config artifacts, but this function also edits the target project's .gitignore in place. That is a broader write operation to user source metadata, not just generating container-environment files, and it is not disclosed in the manifest description.
The ensure_gitignore function appends entries to the project's .gitignore, creating or changing repository files as a side effect. While it logs each change as it happens, the skill description and invocation flow do not clearly warn users in advance that their existing .gitignore will be edited.
This shell script generates and writes a docker-compose.dev.yml file directly into the user-supplied project path, which is a file-modifying operation. Although later output reports that the file was created, there is no prior warning, confirmation prompt, or explicit disclosure near invocation that the script will modify files in the target project.
Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.
echo " ports:" >> "$COMPOSE_FILE"
echo " - \"${port}:${port}\"" >> "$COMPOSE_FILE"
echo " environment:" >> "$COMPOSE_FILE"
echo " - NODE_ENV=development" >> "$COMPOSE_FILE"
# Nuxt 专用环境变量
if [ "$fw" = "nuxt" ]; then
Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.
echo " ports:" >> "$COMPOSE_FILE"
echo " - \"${port}:${port}\"" >> "$COMPOSE_FILE"
echo " environment:" >> "$COMPOSE_FILE"
echo " - NODE_ENV=development" >> "$COMPOSE_FILE"
# Nuxt 专用环境变量
if [ "$fw" = "nuxt" ]; then
The generated Compose file installs tooling and dependencies at container runtime by pulling code from public package registries and, for Bun, executing a remote install script. This expands the supply-chain attack surface and means every environment startup may execute unpinned third-party code inside a container with access to the mounted project source.
Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.
echo " - \"${port}:5000\"" >> "$COMPOSE_FILE"
echo " environment:" >> "$COMPOSE_FILE"
echo " - FLASK_APP=app.py" >> "$COMPOSE_FILE"
echo " - FLASK_ENV=development" >> "$COMPOSE_FILE"
echo " command: >" >> "$COMPOSE_FILE"
echo " sh -c \"pip install -r requirements.txt && flask run --host 0.0.0.0 --port 5000 --reload\"" >> "$COMPOSE_FILE"
;;
This markdown file explains that the script generates a compose file, but it does not explicitly warn users that invoking the skill modifies the target project by creating a new file. Because markdown files should disclose behaviors that affect user data or system state, this file-write side effect should be called out more clearly in the usage or quick-start sections.
The file is primarily written in English, but some headings and table labels switch to Chinese (隔离策略, 隔离速查表, 项目类型, 命名卷) without indicating that the skill is multilingual or giving the user a language option. This can violate language/locale policy because it imposes a locale choice without opt-in or justification.
This markdown file contains user-facing instructional text in Chinese alongside English headings and technology names, but it does not state that the skill is intended specifically for Chinese-speaking users or offer an alternative language. Under the natural-language policy rules, forcing a specific language or locale without opt-in can be a policy violation.
This shell script includes comments and user-facing warning/usage text only in Chinese, which imposes a specific language/locale without offering the user a choice. The policy explicitly flags language-forcing behavior unless the locale constraint is documented and justified or the user can opt in.
No suspicious patterns detected.