T08 · Insecure Dependencies
- Location
SKILL.md:13- Finding
Unpinned Global npm Dependency
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 13
Vulnerability Type: Supply-chain exposure through an unpinned third-party dependency
Risk Level: MediumVulnerable Code Snippet:
markdown - `mail-cli` installed (`npm i -g @clawemail/mail-cli`) with API key configuredTechnical Analysis
The documented installation command retrieves the current registry version of
@clawemail/mail-cliwithout specifying an exact version or verifying package integrity or provenance. Consequently, the code installed by users can differ from the code originally reviewed.npm packages may execute lifecycle scripts during installation. The global installation flag (
-g) also places the package in a broadly accessible tool location and exposes the installation process to the privileges of the user running npm. Although the audited project does not contain an actively malicious dependency payload, this installation pattern creates a supply-chain trust boundary that is not cryptographically or reproducibly constrained.Attack Path
- An attacker compromises the npm package, its publisher account, or a future package release.
- The attacker publishes a malicious version under the same package name.
- A user follows the documented
npm i -g @clawemail/mail-clicommand. - npm retrieves the attacker-controlled current version.
- Malicious lifecycle code can execute during installation, or malicious behavior can execute when the Skill later invokes
mail-cli. - The compromised tool may access the user environment, configured mail credentials, and email content available under that user account.
Impact Assessment
Exploitation could allow arbitrary code execution with the privileges of the user installing or invoking the package. The potential scope includes theft of mail API credentials, unauthorized mailbox operations, access to notification contents, modification of globally installed tooling, ...[truncated 295 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the dependency to an exact, reviewed version, for example:
bash npm install --global @clawemail/mail-cli@<reviewed-exact-version> - Document and verify the expected package integrity digest and publisher provenance before installation.
- Prefer a project-local dependency with a committed lockfile over global installation where operationally feasible.
- Use
npm ciwith a reviewed lockfile in a controlled installation workflow. - Review dependency lifecycle scripts and disable them with
--ignore-scriptswhen they are not required. - Run the mail client under a dedicated, least-privileged operating-system account and limit the configured API credential to only the mailbox permissions required for triage.
- Establish an update process in which new dependency versions are audited before the pinned version is changed.
- Pin the dependency to an exact, reviewed version, for example:
