T08 · Insecure Dependencies
- Location
SKILL.md:28- Finding
Unpinned Global Installation of a Third-Party npm Package
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:28
Vulnerability Type: Insecure third-party dependency installation
Risk Level: MediumVulnerable Code:
bash npm install -g google-search-console-cliTechnical Analysis
The Skill instructs the Agent to install the latest available version of
google-search-console-cliglobally without pinning a reviewed version or verifying package integrity. Consequently, the code installed at execution time can differ from the code present when the Skill was audited.npm installation can execute package lifecycle scripts. A malicious release, compromised publisher account, or compromised transitive dependency could therefore execute arbitrary code with the privileges of the user running the Agent. Global installation also makes the package available beyond the current task and increases the scope and duration of exposure.
The documentation link to the package's GitHub repository does not cryptographically establish that the npm artifact corresponds to reviewed source code.
Attack Path
- An attacker compromises the npm package, its publisher account, or a transitive dependency and publishes a malicious version.
- The required CLI is absent from the target environment.
- The Agent follows
SKILL.md:28and runs the unpinned global installation command. - Malicious package code or an npm lifecycle script executes during installation.
- The payload runs with the installing user's privileges and may access files, environment variables, or credentials available to that user.
- The globally installed malicious CLI can subsequently execute whenever the Skill invokes apparently legitimate Search Console commands.
Impact Assessment
Successful exploitation could provide arbitrary code execution under the installing user's account. Accessible assets may include Google service-account credentials, Google Application Default Credentials, Search Consol ...[truncated 390 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the CLI to a specifically reviewed release rather than installing the latest version.
- Verify the package using an approved lockfile, npm integrity metadata, signed provenance, or a trusted artifact checksum.
- Avoid global installation; use a project-local, isolated environment with minimal filesystem and network permissions.
- Where compatible with the verified package, disable npm lifecycle scripts during installation and explicitly audit any scripts that are required.
- Confirm that the npm publisher and artifact correspond to the referenced source repository.
- Run the CLI under a dedicated low-privilege account with only the required Search Console properties and API permissions.
- Use read-only Google credentials for analytics, inspection, and listing workflows. Require explicit user confirmation before invoking
site-add,site-remove,sitemap-submit, orsitemap-delete. - Protect
~/.config/google-search-console-cli/credentials.jsonand Application Default Credentials with restrictive filesystem permissions, and never print or copy their contents into prompts or logs.
