T08 · Insecure Dependencies
- Location
SKILL.md:50- Finding
Uncontrolled Automatic Installation of Third-Party CLI Dependencies
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 50–55 and 57–62
Vulnerability Type:T08: Insecure Dependencies
Risk Level: MediumVulnerable Code
markdown ### 外部 CLI Hub(自动安装) ```bash opencli gh pr list --limit 5 # GitHub CLI opencli docker ps # Docker opencli obsidian search "关键词" # Obsidian执行规则
- 公开命令直接执行:
opencli <site> <command> [args] - 需要登录的命令先检查:确保 Chrome 已登录目标网站
- operate 命令链式调用:用
&&合并多个操作减少往返 - 自动安装:如果外部 CLI 不存在,opencli 会自动尝试安装
text ### Technical Analysis The Skill authorizes `opencli` to install missing third-party command-line tools automatically. It does not specify trusted registries or download domains, exact package identifiers, pinned versions, cryptographic hashes, signature verification, or an explicit user-approval step. The `opencli` implementation and its installation logic are not included in the audited project. Consequently, the package resolution, download, integrity validation, and installer execution behavior cannot be verified. This creates an unaudited supply-chain execution path in which mutable remote packages or installers may run with the privileges available to the agent. An attacker could exploit this behavior by compromising an upstream registry or distribution source, publishing a malicious package under an incorrectly resolved or confusing name, or tampering with an unverified download. The current project does not establish that these attacks are occurring, but its documented automatic installation behavior exposes the execution path. ### Attack Path 1. A user requests an operation backed by an external CLI, such as GitHub, Docker, or Obsidian access. 2. The agent invokes the corresponding `opencli` command according to the Skill instructions. 3. `opencli` determines that the required external CLI is absent. 4. The documented automatic-installation feature resolves and retrieves a third-party package or installer. 5. If th ...[truncated 838 chars]- 公开命令直接执行:
- Remediation
View remediation
Remediation Suggestions
- Disable automatic installation during ordinary command execution.
- Require explicit, informed user approval before downloading or installing any external tool.
- Maintain an allowlist containing exact official package names, trusted registries, and approved download domains.
- Pin each dependency to a reviewed version and verify cryptographic hashes or publisher signatures before execution.
- Reject ambiguous, untrusted, redirected, or unsigned package sources.
- Separate installation from operational commands so invoking a normal CLI action cannot silently add executable software.
- Perform installation with least privilege in a sandbox or isolated environment, without access to authenticated browser sessions or sensitive local data.
- Record the resolved package name, version, source, integrity value, and approval decision in an audit log.
- Include the
opencliinstaller implementation and dependency manifest in the review scope so package resolution and verification behavior can be independently audited.
