T08 · Insecure Dependencies
Warning
- Location
- DESIGN.md:208
- Finding
- Unverified third-party binaries installed into a system-wide executable directory<![CDATA[ ## Vulnerability Details **File Location**: `DESIGN.md:208-213` **Vulnerability Type**: Unverified binary dependency installation **Risk Level**: Medium ```bash curl -LO https://github.com/BurntSushi/ripgrep/releases/download/14.1.1/ripgrep-14.1.1-x86_64-unknown-linux-musl.tar.gz tar xzf ripgrep-*.tar.gz && cp ripgrep-*/rg /usr/local/bin/ # fd curl -LO https://github.com/sharkdp/fd/releases/download/v10.2.0/fd-v10.2.0-x86_64-unknown-linux-musl.tar.gz tar xzf fd-*.tar.gz && cp fd-*/fd /usr/local/bin/ ``` ### Technical Analysis The documented fallback installation procedure downloads precompiled `ripgrep` and `fd` archives and copies their executables into `/usr/local/bin` without verifying a cryptographic checksum or trusted signature. Although the URLs identify pinned releases in the tools' official GitHub repositories, version pinning does not establish artifact integrity. The broad archive and directory wildcards (`ripgrep-*.tar.gz`, `ripgrep-*/rg`, `fd-*.tar.gz`, and `fd-*/fd`) also allow an unintended preexisting archive or extracted directory in the working directory to be selected. The procedure does not create or validate a clean installation directory. The runtime script does not automatically perform these downloads: `scripts/search.sh:28` and `scripts/search.sh:37` only print the download URLs when dependencies are missing. Exploitation therefore requires a user or privileged Agent to follow the installation instructions. Nevertheless, the documented operation modifies a system-wide executable directory, exceeding the least privileges required for a read-only search Skill. ### Attack Path 1. The dependency check reports that `rg` or `fd` is unavailable. 2. A user or Agent follows the fallback installation procedure in `DESIGN.md`. 3. A compromised upstream release asset, publisher account, delivery mechanism, or attacker-controlled matching file in the current directory supplies a modified archive or executable. 4. Because no check ...[truncated 1160 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Prefer operating-system packages from a trusted, configured package repository. 2. If release archives must be used, pin and verify the expected SHA-256 digest before extraction. Obtain the digest through a trusted release-signing channel rather than from the same unauthenticated workflow. 3. Verify a trusted publisher signature where the upstream project provides signed artifacts. 4. Download into a newly created, permission-restricted temporary directory and remove it after installation. 5. Replace wildcard paths with exact archive and extracted-directory names. 6. Install into a user-scoped executable directory unless system-wide installation is explicitly required and authorized. 7. Keep installation separate from the read-only Skill workflow and clearly disclose that installation changes the host system. 8. Update `scripts/search.sh` dependency messages to direct users to verified package-manager instructions rather than displaying a bare `curl -LO` command. ]]>
