T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:82
- Finding
- Unpinned External Package Execution and Mutable Global Skill Installation<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:82-85` **Vulnerability Type**: Unpinned third-party package and mutable repository installation **Risk Level**: Medium ### Vulnerable Code ```bash npx skills add zhaoxinghua09-cell/agent-skills -g ``` ```bash git clone https://github.com/zhaoxinghua09-cell/agent-skills.git ``` ### Technical Analysis The documented installation procedure invokes the `skills` npm package through `npx` without specifying an exact package version or integrity digest. Depending on local npm behavior and cache state, this can download and execute the package version currently resolved by the registry. The command also globally installs a skill obtained from a mutable repository reference. The repository is cloned without a commit hash, signed tag, or checksum, so its contents can change after this artifact has been audited. Consequently, the effective code and skill instructions installed by users are not necessarily the same as the reviewed files. The repository clone alone does not execute code. However, the documented workflow copies the downloaded skill into an Agent skill directory, after which its instructions or scripts may be loaded or invoked. ### Attack Path 1. An attacker compromises the npm package, its publisher account, the source repository, or an associated release process. 2. The attacker publishes a modified package or changes the repository's default branch. 3. A user follows the documented `npx skills add ... -g` or `git clone` installation procedure. 4. `npx` executes the newly resolved package, or mutable repository content is copied into the Agent's skill directory. 5. Malicious code or instructions execute with the installing user's privileges when installation occurs or when the installed skill is subsequently loaded. ### Impact Assessment A compromised npm installer could execute arbitrary commands with the privileges of the user running `npx`. A compromised skill repository could in ...[truncated 462 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin the npm CLI to an audited version, such as `npx skills@<exact-version>`, and use a lockfile where applicable. 2. Publish and verify a cryptographic integrity digest or signed release before executing the installer. 3. Pin repository installation to a reviewed commit hash rather than the default branch. 4. Prefer a signed release archive with a documented SHA-256 checksum. 5. Avoid global installation by default. Install into a project-specific, least-privileged skill directory. 6. Require users to review downloaded scripts and skill instructions before activation. 7. Document the exact package version, repository commit, and expected file hashes used to produce this audited artifact. ]]>
