T08 · Insecure Dependencies
Error
- Location
- SKILL.md:27
- Finding
- Unpinned Third-Party Package Installation and Execution<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:27-29`, `SKILL.md:90-96`, and `SKILL.md:221-222` **Vulnerability Type**: Unpinned and unaudited third-party dependencies **Risk Level**: High ### Vulnerable Code ```bash npm install @dolutech/agent-link ``` ```bash npx @agentlink/cli init --name "My Assistant" ``` ```bash npx @agentlink/cli start ``` ```bash npm install @dolutech/agent-link ``` ### Technical Analysis The documented installation and execution commands do not pin the npm packages to exact, audited versions. No lockfile, package integrity hash, signature, or vendored implementation is included in the reviewed project. The `npx` commands can retrieve and execute the version currently resolved by the npm registry. Consequently, the effective code run by a user may differ from the code that existed when this Skill was reviewed. Package installation may also invoke npm lifecycle scripts. There is an additional provenance concern because the package installed by the instructions is scoped as `@dolutech/agent-link`, while the executable invoked later is scoped as `@agentlink/cli`. The artifact does not explain or verify this package-scope distinction. ### Attack Path 1. An attacker compromises a referenced npm publisher account, package release process, registry entry, or upstream dependency. 2. The attacker publishes a malicious or modified release under one of the package names referenced by the documentation. 3. A user follows the documented unversioned `npm install` or `npx` command. 4. npm resolves and downloads the mutable package release. 5. Malicious lifecycle scripts or CLI code execute with the permissions of the user running the command. 6. The package can access resources available to that user, subject to operating-system and runtime restrictions. ### Impact Assessment Successful exploitation could result in arbitrary code execution with the invoking user's privileges. Depending on those privileges and the environme ...[truncated 427 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin every package to a specific audited version rather than relying on the registry's current resolution: ```bash npm install --save-exact @dolutech/agent-link@<audited-version> ``` 2. Commit an npm lockfile containing registry URLs and integrity hashes. 3. Replace unversioned `npx` use with an explicitly pinned package invocation, for example: ```bash npm exec --package=@agentlink/cli@<audited-version> -- agentlink init --name "My Assistant" ``` 4. Install dependencies with lockfile enforcement, such as `npm ci`, in supported project workflows. 5. Verify the publisher, package ownership, provenance attestations, signatures, and integrity metadata before installation. 6. Explain and validate why the installed library and executed CLI use different npm scopes. 7. Disable lifecycle scripts where they are unnecessary and operationally compatible, or review all lifecycle scripts before installation. 8. Run the software under a dedicated, least-privileged account or sandbox without unnecessary credentials or filesystem access. 9. Include the audited dependency manifests and lockfile in the project so reviewers can assess the actual dependency graph. ]]>
