T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:9
- Finding
- Unpinned Global Installation of a Security-Sensitive Third-Party CLI## Vulnerability Details **File Location**: `SKILL.md:9` **Vulnerability Type**: Unpinned third-party dependency installed globally **Risk Level**: Medium **Code Snippet**: ```yaml install: npm install -g m365-cli ``` ### Technical Analysis The Skill instructs users or agents to globally install `m365-cli` without specifying an exact reviewed version or package integrity value. Consequently, installation resolves to whichever release is current in the npm registry at execution time. This CLI is particularly security-sensitive because it receives OAuth authorization to read and modify personal email, calendars, contacts, and OneDrive files. It also stores and uses refreshable credentials. A malicious future release, compromised publisher account, registry compromise, or malicious lifecycle script could execute locally during installation or later command invocation. The documented GitHub repository, npm package, and publisher provide provenance information but do not make the mutable installation reproducible or protect against a future supply-chain compromise. ### Attack Path 1. An attacker compromises the npm publisher account, release process, or package source. 2. The attacker publishes a malicious version under the legitimate `m365-cli` package name. 3. A user or agent follows the Skill and executes `npm install -g m365-cli`. 4. npm installs the compromised release globally and may execute its lifecycle scripts. 5. The malicious package accesses local data or intercepts OAuth credentials and Microsoft Graph operations when the user authenticates or invokes the CLI. 6. Stolen credentials or delegated access are used to access the victim's Microsoft account data. ### Impact Assessment Successful exploitation could execute code with the privileges of the user running npm. Because the installed CLI is trusted with broad Microsoft Graph scopes, compromise could expose or modify email, calendar events, contacts, an ...[truncated 199 chars]
- Remediation
- ## Remediation Suggestions - Pin `m365-cli` to an exact version that has been reviewed, rather than resolving the latest release. - Record and verify package integrity using a lockfile, npm integrity metadata, or a trusted package hash. - Prefer a project-local installation or isolated execution environment over global installation. - Disable lifecycle scripts during installation where compatible with the package and workflow. - Document the reviewed package version, source commit, publisher identity, and expected integrity value. - Periodically audit dependency ownership and release changes before updating the pinned version. - Run the CLI under a minimally privileged OS account and limit OAuth scopes to those required for the specific requested operation.
