T08 · Insecure Dependencies
Error
- Location
- scripts/ga.sh:35
- Finding
- Unpinned Packages Are Retrieved and Executed with Access to GA Credentials<![CDATA[ ## Vulnerability Details **File Location**: `scripts/ga.sh:35-42` **Related Documentation**: `SKILL.md:12-18`, `SKILL.md:51-55`, `references/setup.md:7` **Vulnerability Type**: Unpinned runtime dependency execution **Risk Level**: High ### Vulnerable Code ```bash # --- Call via mcporter --- exec npx --yes mcporter call \ --stdio uvx \ --stdio-arg analytics-mcp \ "${ENV_FLAGS[@]}" \ "analytics-mcp.$TOOL" \ "$@" ``` The documentation also recommends installation without a pinned version: ```bash mcporter — npm i -g mcporter ``` ### Technical Analysis The script invokes both `mcporter` and `analytics-mcp` by package name without pinning an audited version or verifying package integrity: - `npx --yes mcporter` can retrieve and immediately execute the current registry version of `mcporter` when it is not already available locally. - `uvx analytics-mcp` similarly resolves and executes an unpinned Python package. - No lockfile, package hash, exact version, or trusted artifact verification is present. The invoked MCP process receives `GOOGLE_APPLICATION_CREDENTIALS`, which identifies the service-account private-key file. Because the downloaded code executes with the caller's operating-system permissions, it can read that key file whenever filesystem permissions allow it. This is a supply-chain vulnerability rather than evidence that the current upstream packages are malicious. The effective executable code may nevertheless change after this Skill has been reviewed. ### Attack Path 1. An attacker compromises the registry account, release process, or upstream package for `mcporter` or `analytics-mcp`. 2. The attacker publishes a malicious version under the package name used by the script. 3. A user invokes `scripts/ga.sh` on a system where the relevant package is not securely pinned and cached. 4. `npx --yes` or `uvx` retrieves and executes the malicious release without an interactive approval step. 5. The malicious process reads `GOOGLE ...[truncated 847 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin exact audited versions of both dependencies rather than resolving their latest releases: - Invoke an exact `mcporter` version. - Invoke an exact `analytics-mcp` version. 2. Avoid downloading executable dependencies during each Skill invocation. Install verified artifacts during a controlled deployment phase. 3. Use lockfiles and integrity hashes for npm and Python artifacts. 4. Configure package managers to use approved registries and verify package provenance or signatures where supported. 5. Run the MCP process in a restricted environment that can access only the required credential file and necessary network endpoints. 6. Use a short-lived credential mechanism, such as workload identity federation, instead of a long-lived JSON private key where the deployment environment supports it. 7. Document and periodically review the exact approved package versions before upgrades. ]]>
