Back to skill

Security audit

Gator CLI

Security checks for vulnerabilities and agentic risk

Overview

The skill is coherent and not deceptive, but it deserves Review because it guides high-impact blockchain account actions while relying on plaintext wallet profiles and an unpinned global CLI install.

Install only if you are comfortable using an alpha blockchain CLI with plaintext local private-key storage. Use a low-value test account, verify profile, chain, recipient addresses, contract targets, amounts, call data, and delegation scopes before signing, and consider pinning or reviewing the npm package version before global installation.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:30
Finding
Cryptographic Private Keys and API Credentials Are Stored in Plaintext## Vulnerability Details **File Location**: `SKILL.md:30-50`, `SKILL.md:56`, and `SKILL.md:227` **Vulnerability Type**: Plaintext storage of sensitive credentials **Risk Level**: High The Skill explicitly documents that account private keys are generated and saved in JSON configuration files without encryption. It also instructs users to place delegation-storage API credentials directly in the same configuration structure. ```text - Config path: `~/.gator-cli/permissions.json` (or `~/.gator-cli/profiles/<profile-name>.json`) - Delegations local cache: `~/.gator-cli/delegations/<profile-name>.json` when storage not configured ``` ```json { "delegationStorage": { "apiKey": "your-api-key", "apiKeyId": "your-api-key-id" }, "rpcUrl": "https://your-rpc-url.com" } ``` ```text Generate a private key and save config. Errors if the profile already exists. ``` ```text - **Private key security**: This is alpha version. Private keys are stored in plaintext JSON. Never use accounts with significant funds. ``` ### Technical Analysis A private key is a bearer credential that provides cryptographic control of the associated blockchain account. Storing it in an unencrypted JSON file means that access to the file is sufficient to copy and use the key; no additional password, hardware confirmation, or key-unwrapping operation is required. The configuration example also stores `apiKey` and `apiKeyId` as plaintext values. Depending on the permissions associated with those credentials, disclosure could allow unauthorized access to remote delegation storage. The documentation warns users about the plaintext storage model, but a warning does not mitigate the underlying exposure. The risk applies to local malware, other users on a shared system, overprivileged applications or agents, improperly configured backups, support bundles, and accidental publication of the profile directory. ### Attack Pat ...[truncated 1459 chars]
Remediation
## Remediation Suggestions - Replace plaintext private-key storage with an OS credential vault, hardware wallet, encrypted keystore, or external signing service. - Require explicit signing confirmation for high-impact operations such as raw contract calls, ownership transfers, and unrestricted delegations. - Store API credentials in a secret manager or protected credential provider rather than directly in profile JSON. - If temporary file-based storage cannot be eliminated, encrypt secrets using a user-supplied credential and an authenticated, memory-hard key derivation scheme. - Create profile files and directories with owner-only permissions and verify permissions before every read or write. - Prevent profile files from being included in source control, cloud synchronization, telemetry, logs, crash reports, and support archives. - Add credential rotation and key-migration procedures for users of the alpha version. - Continue warning users not to use materially funded accounts until secure signer integration is available; this warning should supplement, not replace, technical controls.

T08 · Insecure Dependencies

Warning
Location
SKILL.md:10
Finding
Global Installation of an Unpinned npm Executable## Vulnerability Details **File Location**: `SKILL.md:10-15` and `SKILL.md:22-26` **Vulnerability Type**: Mutable and unverified third-party executable dependency **Risk Level**: Medium The Skill declares and installs `@metamask/gator-cli` without a fixed package version or integrity digest. The installation is global. ```yaml install: - id: "node" kind: "node" package: "@metamask/gator-cli" bins: ["gator"] label: "Install gator CLI" ``` ```sh npm install -g @metamask/gator-cli ``` ### Technical Analysis Because no version is specified, npm resolves the package to the registry version selected at installation time, normally the current version associated with the applicable distribution tag. Consequently, the code installed by a future user may differ from the version that existed when this Skill was reviewed. No package-lock file, integrity hash, signature check, or other reproducibility control is supplied. A compromised publisher account, registry compromise, malicious future release, or unsafe transitive dependency could therefore introduce executable behavior that was not represented in the audited `SKILL.md`. Global installation increases exposure by making the binary broadly available in the user's environment. npm packages may also execute lifecycle scripts during installation unless that behavior is separately restricted. This finding does not establish that the named package is currently malicious; it identifies an unsafe and mutable dependency-installation mechanism. ### Attack Path 1. An attacker compromises the npm publisher, package distribution channel, or a dependency used by a future release. 2. A malicious version becomes the version resolved by the unpinned package specification. 3. A user follows the Skill and runs `npm install -g @metamask/gator-cli`. 4. npm downloads and installs the substituted release; applicable package lifecycle scripts may execute during install ...[truncated 1005 chars]
Remediation
## Remediation Suggestions - Pin `@metamask/gator-cli` to a specifically reviewed version rather than resolving a mutable latest release. - Use a project-local installation with a lockfile instead of a global installation where practical. - Verify package integrity through lockfile integrity metadata, trusted provenance, signatures, or an independently published checksum. - Review the pinned package and its transitive dependency tree before approving upgrades. - Perform dependency updates through an explicit review process rather than automatically accepting registry changes. - Use a trusted registry and consider restricting npm lifecycle scripts with `--ignore-scripts` when compatible with the package. - Run installation and the CLI under a least-privileged account with no unnecessary access to unrelated credentials or sensitive files. - Document the exact supported package version and provide a controlled upgrade and rollback procedure.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (1)

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The skill documents state-changing blockchain operations such as upgrading an account and granting, redeeming, or revoking delegations, but the warning about transaction irreversibility and value-transfer risk is not presented prominently alongside those commands. In this context, users may execute actions that move assets or alter account authority without fully appreciating that blockchain transactions are final and can expose funds or permissions.

Static analysis

No suspicious patterns detected.