T08 · Insecure Dependencies
- Location
SKILL.md:6- Finding
Unpinned Third-Party npm Packages Permit Supply-Chain Code Execution
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:6anddecrypt-email.mjs:23-27
Vulnerability Type: Unpinned and unverifiable third-party dependencies
Risk Level: MediumVulnerable Code
SKILL.md:6:markdown **CLI:** `npm i -g @agntos/agentos` (or `npx @agntos/agentos`)decrypt-email.mjs:23-27:javascript try { nacl = (await import("tweetnacl")).default; } catch { console.error("Install tweetnacl: npm i tweetnacl tweetnacl-util"); process.exit(1); }Technical Analysis
The documented installation commands do not pin
@agntos/agentos,tweetnacl, ortweetnacl-utilto reviewed versions. The project also contains no package manifest, lockfile, package integrity metadata, or signature-verification procedure.As a result, npm resolves mutable package releases at installation time. The
npx @agntos/agentosalternative is particularly sensitive because it can download and immediately execute the currently published package. Package lifecycle scripts, transitive dependencies, and CLI entry points may all execute code with the privileges of the invoking user.This creates a supply-chain trust boundary in which the code executed by users can differ from the code reviewed during the audit. Exploitation would require compromise or malicious control of a package publisher, package release, registry response, or transitive dependency.
Attack Path
- An attacker compromises a referenced npm publisher account, package release process, registry delivery path, or transitive dependency.
- The attacker publishes a malicious release under one of the unpinned package names.
- A user follows the documented
npm i -g,npx, or dependency-installation instruction. - npm resolves and downloads the attacker-controlled release because no exact reviewed version or integrity value is required.
- Malicious lifecycle hooks, dependency initialization code, or CLI entry-po ...[truncated 1064 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin every direct dependency and documented CLI to an exact reviewed version rather than relying on the latest published release.
- Add a
package.jsonand committed lockfile generated from a trusted dependency-resolution environment. - Use reproducible installation commands such as
npm cifor the helper's dependencies. - Replace unpinned
npx @agntos/agentosguidance with an exact version, for examplenpx @agntos/agentos@<reviewed-version>. - Pin
tweetnaclas a declared dependency and remove the ad hoc instruction to install both packages at their latest versions. - Verify package provenance, publisher identity, repository linkage, and npm integrity metadata before approving version updates.
- Review transitive dependencies and lifecycle scripts as part of every dependency upgrade.
- Prefer execution in a restricted environment with minimal filesystem, wallet, SSH-agent, and network access.
- Avoid installing the CLI with elevated privileges and document the minimum permissions required for each workflow.
