Back to skill

Security audit

NEAR Protocol CLI installation and setup guide.

Security checks across malware telemetry and agentic risk

Overview

This documentation-only skill is not clearly malicious, but it asks agents to help with high-impact NEAR blockchain actions and credential workflows without enough safety boundaries.

Install only if you want an agent helping with NEAR CLI work. Before allowing any command that sends, stakes, deploys, signs, imports, or exports accounts, confirm the exact account, network, recipient, amount, fees, and command text. Avoid sharing seed phrases or private keys in chat or logs, prefer testnet or low-value accounts first, and use verified installer downloads instead of piping remote scripts directly into a shell.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
Findings (16)

Intent-Code Divergence

Medium
Confidence
84% confidence
Finding
The skill is presented as an installation/setup guide, but its description explicitly expands scope to using NEAR CLI for arbitrary blockchain actions. That broader operational capability increases the chance an agent will perform sensitive wallet, account, or transaction actions beyond simple setup, which is risky in an installation-focused skill.

Context-Inappropriate Capability

Medium
Confidence
87% confidence
Finding
The guide includes account import and account creation flows, which involve sensitive credentials and potentially state-changing blockchain operations. In a generic setup skill, this can prompt agents or users into handling seed phrases, keys, and funded account actions without strong consent boundaries or security warnings.

Missing User Warnings

Medium
Confidence
86% confidence
Finding
The README documents credential import/export, token transfers, staking, contract deployment, and signed transaction submission without clear safety warnings about irreversible fund movement, secret handling, or the risk of acting on the wrong network/account. In an agent context, this increases the chance that an automated system executes high-impact blockchain actions without explicit human confirmation or operational safeguards.

Missing User Warnings

Medium
Confidence
98% confidence
Finding
The documentation tells users to fetch a remote installer and execute it immediately via a shell pipe. This bypasses inspection, checksum/signature verification, and makes compromise of the upstream release channel or network path directly translate into arbitrary code execution.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The account import guidance references seed phrases or keys without any warning about their sensitivity. That omission can normalize unsafe handling of wallet secrets and increase the likelihood they are exposed in logs, chat transcripts, shell history, or to the agent itself.

Session Persistence

Medium
Category
Rogue Agent
Content
# Import existing account
near account import-account

# Create new account
near account create-account

# Export account credentials
Confidence
72% confidence
Finding
The documentation includes account import/export and creation flows that can establish or persist authenticated blockchain access, but it does not discuss secure storage, session lifetime, or cleanup of local credentials. In an AI-agent environment, this can leave usable credentials on disk or in tool state longer than intended, enabling later unauthorized actions if the host is compromised or shared.

External Script Fetching

Low
Category
Supply Chain
Content
**Linux/macOS/WSL (recommended):**
```bash
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/near/near-cli-rs/releases/latest/download/near-cli-rs-installer.sh | sh
```

**npm/npx (any platform with Node.js):**
Confidence
95% confidence
Finding
The install command fetches a remote script from the network and immediately executes it, which creates a supply-chain risk if the release asset, upstream account, transport endpoint, or local trust chain is compromised. Even though the source is a legitimate GitHub project, this pattern bypasses review of the downloaded content before execution.

External Script Fetching

Low
Category
Supply Chain
Content
```bash
# Use longer timeout
curl --proto '=https' --tlsv1.2 -LsSf --connect-timeout 30 --max-time 300 \
  https://github.com/near/near-cli-rs/releases/latest/download/near-cli-rs-installer.sh | sh
```
Confidence
95% confidence
Finding
This troubleshooting command repeats the same unsafe installation pattern by downloading a remote installer and executing it directly in one step. The longer timeout does not change the core risk: a compromised or unexpected remote script gains immediate code execution on the host.

External Script Fetching

Low
Category
Supply Chain
Content
**Best for:** Most Linux and macOS users

```bash
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/near/near-cli-rs/releases/latest/download/near-cli-rs-installer.sh | sh
```

**if not add near to PATH:**
Confidence
97% confidence
Finding
The skill instructs fetching an external script from GitHub and executing it, which creates a direct arbitrary-code-execution path if the remote content is compromised or replaced. The risk is amplified because the script is not pinned to a specific version or verified before execution.

External Script Fetching

Low
Category
Supply Chain
Content
**Solution:**
```bash
# Use a longer timeout with curl
curl --proto '=https' --tlsv1.2 -LsSf --connect-timeout 30 --max-time 300 https://github.com/near/near-cli-rs/releases/latest/download/near-cli-rs-installer.sh | sh
```
Confidence
97% confidence
Finding
This troubleshooting variant repeats the same unsafe external-script execution pattern, only with longer curl timeouts. Operational retries do not reduce the core risk that unverified remote content is being executed immediately.

External Script Fetching

Low
Category
Supply Chain
Content
```bash
# Install (Shell script)
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/near/near-cli-rs/releases/latest/download/near-cli-rs-installer.sh | sh

# Install (npx)
npx near-cli-rs
Confidence
97% confidence
Finding
The quick reference reiterates the unsafe remote installer execution pattern, making the dangerous command more likely to be copied verbatim. Repetition in a summary section increases exposure because users often rely on quick-start snippets without reading warnings elsewhere.

Chaining Abuse

High
Category
Tool Misuse
Content
**Linux/macOS/WSL (recommended):**
```bash
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/near/near-cli-rs/releases/latest/download/near-cli-rs-installer.sh | sh
```

**npm/npx (any platform with Node.js):**
Confidence
97% confidence
Finding
Using '| sh' turns remote content into immediate shell input, eliminating the user's opportunity to review what will run and making command-injection or upstream compromise especially dangerous. In an agent setting, this is more severe because automation may execute the chain non-interactively and at scale.

Chaining Abuse

High
Category
Tool Misuse
Content
```bash
# Use longer timeout
curl --proto '=https' --tlsv1.2 -LsSf --connect-timeout 30 --max-time 300 \
  https://github.com/near/near-cli-rs/releases/latest/download/near-cli-rs-installer.sh | sh
```

## 📚 Resources
Confidence
97% confidence
Finding
This is the same dangerous chaining pattern in the troubleshooting section, where remote script content is directly piped into a shell interpreter. The context makes it plausibly copy-pasted during troubleshooting, when users may be less cautious and more likely to run it verbatim.

Chaining Abuse

High
Category
Tool Misuse
Content
**Best for:** Most Linux and macOS users

```bash
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/near/near-cli-rs/releases/latest/download/near-cli-rs-installer.sh | sh
```

**if not add near to PATH:**
Confidence
99% confidence
Finding
The use of `| sh` chains untrusted network-fetched content directly into a shell interpreter. That is a classic unsafe execution pattern because any malicious or tampered response is executed immediately with the user's privileges.

Chaining Abuse

High
Category
Tool Misuse
Content
**Solution:**
```bash
# Use a longer timeout with curl
curl --proto '=https' --tlsv1.2 -LsSf --connect-timeout 30 --max-time 300 https://github.com/near/near-cli-rs/releases/latest/download/near-cli-rs-installer.sh | sh
```

## Version Information
Confidence
99% confidence
Finding
This repeated `| sh` usage in troubleshooting preserves the same direct-execution risk as the primary install path. Framing it as a fix for slow installations may further encourage unsafe copy-paste behavior under time pressure.

Chaining Abuse

High
Category
Tool Misuse
Content
```bash
# Install (Shell script)
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/near/near-cli-rs/releases/latest/download/near-cli-rs-installer.sh | sh

# Install (npx)
npx near-cli-rs
Confidence
99% confidence
Finding
Including `| sh` in the quick reference condenses a dangerous pattern into the most copyable part of the document. This increases the likelihood of immediate arbitrary code execution from remote content without user scrutiny.

VirusTotal

66/66 vendors flagged this skill as clean.

View on VirusTotal

Static analysis

No suspicious patterns detected.