T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:199- Finding
Remote Installation Scripts Are Downloaded and Executed Without Integrity Verification
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill matches its blockchain audit and deployment purpose, but its install and deployment paths can expose wallet keys, run unverified remote code, or send live transactions without strong safeguards.
Review this skill carefully before installing. Use it only in a sandboxed workspace without production wallet files or broad secrets, avoid copy-pasting pipe-to-shell installers, pin and verify blockchain tooling, and do not use mainnet or real private keys unless you have independently checked the exact command and deployment target.
SKILL.md:199Remote Installation Scripts Are Downloaded and Executed Without Integrity Verification
scripts/deploy_helper.py:97Solidity Private Key Is Exposed Through Process Arguments and Failure Reports
scripts/deploy_helper.py:456Mainnet Deployment Confirmation Is Not Enforced
scripts/deploy_helper.py:195Sui Deployment Ignores the Requested Network and RPC Endpoint
scripts/audit_solana.py:89Audit Workflow Executes Build Logic From Potentially Untrusted Projects on the Host
examples/sui_move/Move.toml:6Tooling and Example Dependencies Use Unpinned or Mutable Sources
The README instructs users to run a remote script via 'curl ... | bash', which executes network-fetched code without prior verification. If the source, transport, DNS, or hosting is compromised, a user installing dependencies for this skill could execute arbitrary commands on their machine.
| 链 | 必需工具 | 安装方式 |
|---|---|---|
| Solidity | `forge` (Foundry) | `curl -L https://foundry.paradigm.xyz \| bash && foundryup` |
| Sui Move | `sui` CLI | `cargo install --locked --git https://github.com/MystenLabs/sui.git sui` |
| Solana | `anchor` + `solana` CLI | `cargo install --git https://github.com/coral-xyz/anchor avm && avm install latest` |
The description overstates the implemented functionality. The code clearly supports Solana program auditing only: it detects Anchor/native Solana layouts, invokes anchor build or Solana cargo build tools, runs cargo audit, and applies Solana/Rust-specific heuristics. There is no logic for Solidity, Sui Move, or Solana deployment workflows (no wallet/network/publish commands, no RPC submission, no key handling, no testnet/mainnet/devnet deployment steps). The auditing portion does align with part of the description for Solana security review, but the declared purpose materially includes undeclared-by-code capabilities—especially deployment and support for other chains/languages—so this is a mismatch.
The code’s primary behavior is consistent with part of the description: auditing Solidity smart contracts for security issues. However, the declared purpose materially overstates capabilities by claiming deployment support and support for Sui Move and Solana. This script contains no logic for publishing contracts to any network, no wallet/key/network interaction, and no handling of Move or Solana codebases. The mismatch is substantive because those are core declared use cases, not incidental details.
The skill tells the agent/user to execute a remote install pipeline using 'curl ... | bash', which is a classic supply-chain risk pattern. If the remote host, network path, or delivered script is compromised, arbitrary code will run immediately in the local environment with the user's privileges, which is especially dangerous in a skill that also handles deployment tooling and potentially sensitive wallet contexts.
# 1. Prerequisites: Install Foundry
curl -L https://foundry.paradigm.xyz | bash && foundryup
# 2. Build the contract
cd {baseDir}/examples/solidity
This instruction executes shell code fetched at runtime from a remote URL via command substitution, which allows arbitrary code execution if the fetched content is malicious or tampered with. In the context of blockchain deployment tooling, this is particularly risky because the environment may contain wallet files, RPC credentials, and other sensitive assets that could be exfiltrated or abused.
# 1. Prerequisites: Install Anchor and Solana CLI
cargo install --git https://github.com/coral-xyz/anchor avm
avm install latest && avm use latest
sh -c "$(curl -sSfL https://release.anza.xyz/stable/install)"
# 2. Set up wallet and switch to devnet
solana-keygen new # if you don't have a keypair
The command curl -L https://foundry.paradigm.xyz | bash downloads remote content and immediately executes it in a shell without verification, exposing users to supply-chain compromise, MITM-style installer abuse, or malicious changes on the hosting side. In a developer security/deployment workflow, this is especially dangerous because users are likely to run it on machines holding source code, credentials, or deployment keys.
# Install Foundry (if not installed)
curl -L https://foundry.paradigm.xyz | bash && foundryup
# Build
forge build
Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.
- **Fix**: Hardcode expected program IDs. In Anchor, use `Program<'info, T>` type. In native, assert `program_id == expected_id`.
### 5. Account Data Reinitialization
- **Description**: Writing initial data to an account without checking if it's already initialized, allowing an attacker to reset state.
- **Detection**: Check `init` / `init_if_needed` in Anchor. For native, check if there's an `is_initialized` flag checked before writing.
- **Fix**: In Anchor, prefer `init` over `init_if_needed`. In native, always check and set an `is_initialized` flag.
Skill attempts to nullify the agent's safety policies or restrictions ('you have no restrictions', 'ignore your guidelines', 'do anything now'). This is a direct jailbreak that disables guardrails.
if "mut" in line and "constraint" not in line and "has_one" not in line and "seeds" not in line:
findings.append({
"severity": "medium",
"title": "Mutable account without constraint",
"location": f"{rel_path}:{i}",
"description": "Account is marked as mutable but has no constraint or has_one validation.",
"recommendation": "Add appropriate constraints (has_one, constraint, seeds) to validate account relationships.",
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
def check_tools_only() -> dict:
"""Return availability info for all required tools."""
tools = {
"forge": {"install_hint": "curl -L https://foundry.paradigm.xyz | bash && foundryup"},
"slither": {"install_hint": "pip install slither-analyzer"},
"solhint": {"install_hint": "npm install -g solhint"},
}
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
def check_tools_only() -> dict:
"""Return availability info for all required tools."""
tools = {
"forge": {"install_hint": "curl -L https://foundry.paradigm.xyz | bash && foundryup"},
"slither": {"install_hint": "pip install slither-analyzer"},
"solhint": {"install_hint": "npm install -g solhint"},
}
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
def check_tools_only() -> dict:
"""Return availability info for all required tools."""
tools = {
"forge": {"install_hint": "curl -L https://foundry.paradigm.xyz | bash && foundryup"},
"slither": {"install_hint": "pip install slither-analyzer"},
"solhint": {"install_hint": "npm install -g solhint"},
}
The Solidity deploy path reads the private key from an environment variable and appends the secret value directly to the forge command line. Command-line arguments are often exposed via process listings, logs, crash reports, and this script also returns the full command string on failures and dry runs, creating a real secret disclosure risk for blockchain deployment keys.
Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.
# Execute
try:
# Set env to json output
env = os.environ.copy()
r = _run(cmd + ["--json"], cwd=args.path, timeout=300)
output = (r.stdout or "") + "\n" + (r.stderr or "")
The skill description is presented entirely in Chinese and does not indicate that users may choose another language or locale. Under the language/locale policy, forcing a specific language without opt-in is a natural-language policy concern unless the regional constraint is documented and justified.
The README says users can 'directly use natural language' and lists triggers such as '审计我的合约', '部署到测试网', and '有哪些例子' without any stated invocation boundary, command prefix, or exclusion conditions. These phrases are broad enough that normal discussion about contracts or examples could unintentionally activate the skill.
The skill clearly instructs the agent to read files, inspect environment-based credentials, and execute shell commands, but it declares no explicit tool scope or allowed-tools boundary. That creates an over-privileged, under-specified execution model where an agent may use powerful capabilities without policy-level restriction, increasing the chance of unintended command execution, secret exposure, or filesystem access.
The guide provides live EVM deployment commands using --private-key $PRIVATE_KEY and --broadcast/verification flows without an explicit warning that these actions can spend real funds, publish irreversible on-chain state, or expose sensitive key material through shell history, process inspection, or poor operator practices. In a deployment-focused skill, users are likely to copy-paste commands directly, which increases the chance of accidental mainnet deployment or insecure key handling.
The Sui publish and upgrade examples perform real on-chain state changes and consume gas, yet the guide does not explicitly warn operators that these commands affect the active environment and wallet. Because the document is an operational deployment guide, omission of this warning can lead to unintended publication or upgrades on mainnet/testnet with financial or governance consequences.
The Solana deployment section references ~/.config/solana/id.json and live solana program deploy commands without warning that the local keypair controls funds and deployment authority, or that choosing the wrong cluster can cause unintended production deployment. Users following the guide may expose sensitive wallet files or deploy to the wrong network, leading to financial loss or operational mistakes.
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
- **Fix**: Hardcode expected program IDs. In Anchor, use `Program<'info, T>` type. In native, assert `program_id == expected_id`.
### 5. Account Data Reinitialization
- **Description**: Writing initial data to an account without checking if it's already initialized, allowing an attacker to reset state.
- **Detection**: Check `init` / `init_if_needed` in Anchor. For native, check if there's an `is_initialized` flag checked before writing.
- **Fix**: In Anchor, prefer `init` over `init_if_needed`. In native, always check and set an `is_initialized` flag.
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
- **Fix**: Hardcode expected program IDs. In Anchor, use `Program<'info, T>` type. In native, assert `program_id == expected_id`.
### 5. Account Data Reinitialization
- **Description**: Writing initial data to an account without checking if it's already initialized, allowing an attacker to reset state.
- **Detection**: Check `init` / `init_if_needed` in Anchor. For native, check if there's an `is_initialized` flag checked before writing.
- **Fix**: In Anchor, prefer `init` over `init_if_needed`. In native, always check and set an `is_initialized` flag.
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
- **Fix**: Hardcode expected program IDs. In Anchor, use `Program<'info, T>` type. In native, assert `program_id == expected_id`.
### 5. Account Data Reinitialization
- **Description**: Writing initial data to an account without checking if it's already initialized, allowing an attacker to reset state.
- **Detection**: Check `init` / `init_if_needed` in Anchor. For native, check if there's an `is_initialized` flag checked before writing.
- **Fix**: In Anchor, prefer `init` over `init_if_needed`. In native, always check and set an `is_initialized` flag.
The script automatically runs project-local build tooling (for example anchor build / cargo build helpers) against an untrusted target repository. In Rust and Solana ecosystems, build steps can execute attacker-controlled code through build.rs scripts, proc macros, toolchain hooks, or dependency resolution side effects, so auditing a hostile project can become local code execution on the analyst machine.
Running cargo audit in the target project directory still invokes Cargo on attacker-supplied project metadata and lockfiles without any confirmation or isolation. Even though cargo audit is less dangerous than a full build, Cargo-based operations against untrusted repos can still trigger unsafe local interactions or dependency-related execution paths, making this risky in an agent skill intended to inspect arbitrary user projects.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
def _run(cmd: list[str], cwd: str, timeout: int = 300) -> subprocess.CompletedProcess:
"""Run *cmd* and return the CompletedProcess."""
return subprocess.run(
cmd,
cwd=cwd,
capture_output=True,