T08 · Insecure Dependencies
- Location
SKILL.md:27- Finding
Unpinned Global Package Installation with Trusted Lifecycle Scripts
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:27-30
Vulnerability Type: Unpinned third-party dependency and trusted package lifecycle scripts
Risk Level: MediumVulnerable Code
bash npm install -g agent-desktop # or bun install -g --trust agent-desktopTechnical Analysis
The installation instructions retrieve
agent-desktopwithout specifying an exact version or integrity hash. Consequently, the installed implementation can change independently of the reviewed Skill version.Both alternatives install the package globally, increasing the scope of any compromised package code. The Bun alternative explicitly uses
--trust, allowing package lifecycle scripts to run during installation. The artifact contains only documentation and metadata; it does not include the executableagent-desktopimplementation or dependency lock data. Therefore, the downloaded package and its transitive dependencies cannot be verified against the reviewed documentation.This is a supply-chain weakness rather than evidence that the current package is malicious.
Attack Path
- An attacker compromises the
agent-desktoppackage, its publisher account, or a transitive dependency. - The attacker publishes a malicious release under the same package name.
- A user follows the documented unpinned global installation command.
- The package manager retrieves the attacker-controlled release.
- With the Bun command, trusted lifecycle scripts can execute during installation. Malicious runtime code can also execute when the CLI is later invoked.
- If the hosting terminal has macOS Accessibility permission, the compromised CLI can abuse that authority to observe and control desktop applications.
Impact Assessment
Malicious installation scripts or runtime code would execute with the privileges of the installing user. Because the documented tool is intended to run from an Accessibility-enabled terminal, c ...[truncated 570 chars]
- An attacker compromises the
- Remediation
View remediation
Remediation Suggestions
- Pin the dependency to an exact reviewed version, for example:
bash npm install -g agent-desktop@0.1.8 - Publish and verify package integrity information, such as an expected registry integrity hash or signed release artifact.
- Remove
--trustunless audited lifecycle scripts are strictly necessary. Document which scripts require trust and what each script performs. - Prefer a project-local installation with a committed lockfile over global installation, reducing ambiguity and limiting package resolution changes.
- Make the executable source and dependency manifest available for review so implementation behavior can be compared with the documented capabilities.
- Use package provenance or signature verification and a trusted, explicitly configured registry.
- Run the CLI under a dedicated, least-privileged account or terminal context. Grant Accessibility permission only when needed and revoke it afterward.
- Add release controls such as reproducible builds, dependency review, vulnerability scanning, and publisher-account multi-factor authentication.
- Pin the dependency to an exact reviewed version, for example:
