Back to skill

Security audit

pionex-earn-dual

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed Pionex Dual Investment helper, with a notable supply-chain caution around its unpinned global CLI install.

Install only if you trust the Pionex npm package source. Use a dedicated API key with the minimum required View or Earn permission, do not grant withdrawal permission, review dry-run output carefully, and confirm every real invest, revoke, or collect action yourself.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:14
Finding
Unpinned Globally Installed Dependency Handles Financial Credentials and Operations## Vulnerability Details **File Location**: `SKILL.md`, lines 14-19 and 42-45 **Vulnerability Type**: Unpinned third-party executable dependency **Risk Level**: Medium ### Vulnerable Code Snippet ```yaml metadata: author: pionex version: "0.1.0" homepage: "https://www.pionex.com" agent: requires: bins: ["pionex-trade-cli"] install: - id: npm kind: node package: "@pionex/pionex-ai-kit" bins: ["pionex-trade-cli", "pionex-ai-kit"] label: "Install pionex CLI (npm)" ``` ```bash npm install -g @pionex/pionex-ai-kit ``` ### Technical Analysis The Skill directs users to install `@pionex/pionex-ai-kit` without an exact version or integrity hash. Consequently, npm resolves whichever release is associated with the package's current distribution tag at installation time. The global installation also exposes `pionex-trade-cli` and `pionex-ai-kit` as system-wide commands. The reviewed project contains only `SKILL.md`; it does not include the dependency's source code, a lockfile, an integrity value, or another mechanism that makes the installed implementation reproducible and reviewable. This is particularly sensitive because the CLI is subsequently used to configure API credentials and perform financial operations requiring Pionex View or Earn permissions. This finding does not establish that the current npm package is malicious. The vulnerability is the unpinned, mutable supply-chain trust boundary around a credential-bearing financial CLI. ### Attack Path 1. An attacker compromises the npm package, a maintainer account, the publication pipeline, or a future package release. 2. The attacker publishes a modified release under the legitimate package name and causes it to become the version resolved by the default npm distribution tag. 3. A user follows the Skill instructions and runs `npm install -g @pionex/pionex-ai-kit`. 4. npm installs the attac ...[truncated 1047 chars]
Remediation
## Remediation Suggestions 1. Pin the npm dependency to an exact reviewed version, for example `@pionex/pionex-ai-kit@X.Y.Z`, rather than resolving the latest distribution tag. 2. Publish and verify the expected npm package integrity digest or signed provenance before installation. 3. Prefer a project-local installation with a committed lockfile over global installation, then invoke the pinned binary through a controlled package script or equivalent mechanism. 4. Review the dependency's installation hooks, credential-storage implementation, network destinations, and transaction-construction logic before approving a release. 5. Use API keys with only the minimum required permissions. Maintain separate View-only and Earn-enabled credentials where practical, and do not grant withdrawal permissions. 6. Document credential storage, file permissions, rotation, and revocation procedures. Rotate credentials immediately if dependency compromise is suspected. 7. Add automated dependency monitoring and require security review before updating the pinned version. 8. Where supported, validate transaction details independently against Pionex's trusted interface before authorizing financially consequential operations.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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

Static analysis

No suspicious patterns detected.