T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:24
- Finding
- Unpinned npm Dependency Creates a Mutable Supply-Chain Risk<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 24–30 **Vulnerability Type**: Unpinned third-party dependency **Risk Level**: Medium ### Vulnerable Code ```yaml install: - id: npm kind: npm package: '@googleworkspace/cli' bins: - gws label: Install gws CLI (npm) ``` ### Technical Analysis The installation metadata identifies `@googleworkspace/cli` only by package name and does not pin an audited version or package integrity digest. Consequently, installation may resolve to whichever release is current at installation time rather than the release evaluated during this audit. This creates a time-of-check/time-of-use supply-chain gap: the effective executable can change without any modification to the Skill. If the package, publisher account, release process, or npm distribution channel is compromised, malicious package code or lifecycle scripts could execute under the installing user's account. This risk is particularly significant because the installed `gws` executable is subsequently trusted to handle OAuth authorization, Google Workspace API requests, and locally stored credentials. No evidence indicates that the currently referenced package is malicious; the vulnerability is the absence of reproducible dependency pinning and integrity verification. ### Attack Path 1. An attacker compromises the package publisher, release pipeline, or npm package distribution account. 2. The attacker publishes a malicious version of `@googleworkspace/cli`. 3. A user installs the Skill dependency using the unversioned package declaration. 4. npm resolves and installs the attacker-controlled release. 5. Malicious installation hooks or runtime code execute with the installing user's local privileges. 6. When the user authenticates or invokes `gws`, the compromised executable may access OAuth artifacts, intercept Workspace request content, or perform unauthorized API operations within the scopes granted to the authenticated account. ### ...[truncated 944 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin the dependency to an exact audited version, for example: ```yaml package: '@googleworkspace/cli@<audited-exact-version>' ``` 2. Require integrity verification using an npm lockfile, package digest, or equivalent mechanism supported by the Skill installer. 3. Avoid floating tags and semantic version ranges for security-sensitive command-line tools. 4. Review package provenance, publisher identity, release signatures, and repository ownership before updating the pinned version. 5. Test dependency updates in an isolated environment before deployment. 6. Disable npm lifecycle scripts during installation where compatible with the package, or explicitly audit every required lifecycle script. 7. Run the CLI under a least-privileged local account and grant only the minimum Google OAuth scopes required for each workflow. 8. Treat version changes as security-relevant changes requiring a new audit, especially because this dependency processes OAuth credentials and sensitive Workspace data. ]]>
