T08 · Insecure Dependencies
Warning
- Location
- scripts/install_if_needed.sh:10
- Finding
- Automatic Installation of an Unpinned Third-Party Homebrew Dependency## Vulnerability Details **File Location**: `scripts/install_if_needed.sh:10-19` **Related Instruction Locations**: `SKILL.md:26-32`, `SKILL.md:146` **Vulnerability Type**: Supply-chain risk from an automatically installed, mutable third-party dependency **Risk Level**: Medium ### Vulnerable Code ```bash if ! command -v brew >/dev/null 2>&1; then echo "STATUS=brew-missing" exit 2 fi brew install steipete/tap/peekaboo echo "STATUS=installed-now" command -v peekaboo peekaboo --version || true ``` The corresponding skill instructions state: ```bash If `peekaboo` is missing, install it proactively: brew install steipete/tap/peekaboo ``` They also explicitly instruct the agent not to request approval before this installation when Homebrew is available. ### Technical Analysis The installation command obtains Peekaboo from the third-party Homebrew tap `steipete/tap`. It does not pin the dependency to a reviewed version, immutable source revision, or cryptographic digest. It also does not independently verify an artifact signature or checksum before installation. As a result, the effective code installed and executed can change after this skill package has been audited. Homebrew formula installation may download artifacts and execute formula-defined installation logic. If the tap, its publishing account, the formula, or an upstream release is compromised, the skill could install attacker-controlled code while appearing to perform its documented setup workflow. This finding does not establish that the current Peekaboo package or tap is malicious. It identifies an avoidable supply-chain trust risk caused by automatic installation from a mutable external source without integrity pinning. ### Attack Path 1. A user requests Peekaboo setup or native macOS automation. 2. The skill checks the local environment and finds that `peekaboo` is absent. 3. Homebrew is present, so the workflow does not ask the user to approve the package installation. 4. `brew inst ...[truncated 1269 chars]
- Remediation
- ## Remediation Suggestions 1. Require explicit user approval before installing any third-party package, even when Homebrew is already installed. 2. Pin Peekaboo to a specifically reviewed release and, where practical, an immutable source or formula revision. 3. Verify downloaded artifacts using a trusted cryptographic signature or a hardcoded checksum obtained through an independent trusted channel. 4. Record and report the exact package version and source revision before installation. 5. Separate dependency acquisition from execution so users can inspect and approve the resolved package metadata. 6. After installation, verify that `command -v peekaboo` resolves to the expected Homebrew-managed path and validate the installed version before invoking it. 7. Document the third-party trust boundary and advise users that Screen Recording and Accessibility authorization should only be granted after the installed binary has been verified. 8. Consider distributing a reviewed, version-locked dependency manifest rather than resolving the latest state of a mutable tap at runtime.
