自动安装、构建和测试会执行尚未审查的项目或依赖代码
原文依据:2 处只要检测到常见清单文件,Skill 就指示运行 npm install、cargo build、pip/poetry install 或 go mod download,随后运行测试。安装生命周期脚本、Rust build.rs、构建逻辑和测试都可能执行仓库或下载依赖提供的任意代码,而且这些步骤没有单独确认或禁用脚本的限制。
恶意或被入侵的仓库或依赖可能在代理权限范围内读取或修改可访问文件、调用本机工具,或使用包管理器允许的网络访问。worktree 隔离并不能隔离进程权限、凭据或工作区之外的数据。
该指令会在发现清单文件时自动运行依赖安装或构建,并随后运行项目测试。`npm install` 可能触发生命周期脚本,`cargo build` 可能执行 build.rs,Python 安装及测试也可能执行仓库或依赖代码;这里没有要求在执行前单独确认或禁用脚本。`go mod download` 通常仅下载模块,因此并非列出的每条命令都具有同等执行风险。
Auto-detect and run appropriate setup:```bash# Node.jsif [ -f package.json ]; then npm install; fi# Rustif [ -f Cargo.toml ]; then cargo build; fi# Pythonif [ -f requirements.txt ]; then pip install -r requirements.txt; fiif [ -f pyproject.toml ]; then poetry install; fi# Goif [ -f go.mod ]; then go mod download; fi```查看另外 1 个位置
Run tests to ensure workspace starts clean:```bash# Use project-appropriate commandnpm test / cargo test / pytest / go test ./...```