T08 · Insecure Dependencies
Error
- Location
- install.sh:5
- Finding
- Unpinned Third-Party Homebrew Formula Creates a Mutable Supply-Chain Execution Path## Vulnerability Details **File Location**: `install.sh`, lines 5-13 **Vulnerability Type**: Unverified and unpinned third-party dependency installation **Risk Level**: High ### Vulnerable Code ```bash brew update # use brew to install deps if not exists command -v ffmpeg || brew install ffmpeg command -v jq || brew install jq # install formula from tap: # https://github.com/guoqiao/homebrew-tap/blob/main/Formula/mlx-audio-server.rb brew install guoqiao/tap/mlx-audio-server || true ``` ### Technical Analysis The installer updates Homebrew metadata and installs `mlx-audio-server` from the mutable third-party tap `guoqiao/tap`. The project does not pin the formula to a reviewed commit or version and does not independently verify the formula, downloaded resources, or expected checksums. A Homebrew formula may execute installation logic and install executable resources. Consequently, the effective code installed by this script can change after the audited Skill package has been published. Compromise of the tap repository, its maintainer account, or an upstream resource referenced by the formula could turn the documented installation command into an arbitrary-code execution channel. The `|| true` suffix also suppresses installation failure. This can conceal dependency problems and allow execution to continue with an unexpected, stale, or partially installed package. ### Attack Path 1. An attacker compromises or gains update access to the third-party Homebrew tap or one of the formula's mutable upstream resources. 2. The attacker modifies the formula or referenced package to include malicious installation or runtime behavior. 3. A user follows the documented instructions and executes `install.sh`. 4. `brew update` obtains current package metadata, and `brew install guoqiao/tap/mlx-audio-server` retrieves the attacker's modified package. 5. Homebrew executes the malicious installation logic under the privileges of ...[truncated 737 chars]
- Remediation
- ## Remediation Suggestions - Pin `mlx-audio-server` and all significant resources to reviewed, immutable versions or commits. - Verify downloaded artifacts using cryptographic hashes maintained in a trusted part of this project. - Audit and vendor the Homebrew formula where practical instead of relying on a mutable personal tap. - Avoid unconditional `brew update` during installation; document a tested Homebrew state or update dependencies through an explicit user-controlled step. - Remove `|| true` from security-relevant installation commands so failures are visible and abort installation. - Display the formula source, version, and expected checksums before installation. - Consider distributing a signed release and verifying its signature before installing or starting the service.
