T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:32
- Finding
- Unpinned Third-Party Package Installed Globally<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 32–36 **Vulnerability Type**: Supply-chain exposure through an unpinned globally installed dependency **Risk Level**: Medium ### Vulnerable Code ```bash npm i @talesofai/neta-skills@latest -g ``` ```bash pnpm add -g @talesofai/neta-skills@latest ``` ### Technical Analysis The installation instructions retrieve whichever package version the mutable `latest` tag references at installation time. Consequently, the installed code can change after this Skill has been reviewed. The global installation option also exposes the broader user environment to package lifecycle scripts and executable files. The package implementation is not included in the audited project. Its lifecycle scripts, API destinations, token handling, and runtime behavior therefore cannot be verified from this artifact. This is especially significant because `SKILL.md:22` instructs users to place `NETA_TOKEN` in the environment used by the CLI. Network access and token-based authentication are necessary for the declared community API functionality. However, obtaining executable code through an unpinned global installation exceeds the minimum safe installation privileges needed to provide that functionality. ### Attack Path 1. An attacker compromises the npm package, its maintainer account, publication process, or a future release assigned to `latest`. 2. A user follows the documented npm or pnpm global installation command. 3. The package manager downloads and executes the attacker-controlled package version, including any permitted lifecycle scripts. 4. The malicious package runs with the installing user's privileges. 5. It can inspect the process environment, including `NETA_TOKEN` if present, and access files available to that user. 6. The compromised CLI can subsequently intercept API inputs, alter responses, or transmit account data to an attacker-controlled service. ### Impact Assessment Successful exploitation ...[truncated 461 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin the package to an exact reviewed version rather than using `@latest`. 2. Verify package integrity through a lockfile, registry integrity hash, signed provenance, or an equivalent reproducible mechanism. 3. Prefer a project-local installation executed with minimal privileges instead of a global installation. 4. Review and document the package's lifecycle scripts before installation. 5. Use `--ignore-scripts` where compatible with the package's legitimate operation. 6. Document the expected npm registry, package publisher, API domains, and certificate requirements. 7. Run the CLI in a restricted environment containing only the required token and files. 8. Scope `NETA_TOKEN` to the minimum API permissions necessary and support prompt revocation and rotation. 9. Vendor or include the reviewed CLI source when feasible so its network and credential behavior can be audited together with the Skill. ]]>
