Back to skill

Security audit

pionex-market

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent read-only Pionex market-data helper, with the main caution being an unpinned global npm CLI install.

Install only if you trust the Pionex npm package source, avoid sudo, and consider pinning or reviewing the exact npm package version before global installation.

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:12
Finding

Unpinned npm Package Installed Globally

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 12–20 and 28–31
Vulnerability Type: T08: Insecure Dependencies
Risk Level: Medium

Vulnerable Code

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)"
markdown
1. Install `pionex-trade-cli` CLI (from `@pionex/pionex-ai-kit`):
   ```bash
   npm install -g @pionex/pionex-ai-kit
text

### Technical Analysis

The skill instructs users or agents to install `@pionex/pionex-ai-kit` globally without specifying an exact package version or integrity digest. Consequently, installation resolves to whichever package release the npm registry serves at that time rather than to a fixed, audited artifact.

An npm installation can execute package lifecycle scripts, including `preinstall`, `install`, and `postinstall`, with the privileges of the installing user. A global installation also places package-provided executables in a system-wide or user-wide binary location. The audited project contains neither the package source nor a lockfile or checksum that would allow the installed implementation to be verified from this repository.

The audit found no evidence that the referenced package is currently malicious. The vulnerability is the unsafe and non-reproducible dependency installation mechanism, which creates a supply-chain attack opportunity if the package, maintainer account, registry resolution, or a future release is compromised.

### Attack Path

1. An attacker compromises the npm publisher account, package publication workflow, or another relevant supply-chain component.
2. The attacker publishes a malicious release of `@pionex/pionex-ai-kit`.
3. A user or agent follows `SKILL.md` and runs the unpinned global
...[truncated 1101 chars]
Remediation
View remediation

Remediation Suggestions

  1. Pin the dependency to an exact reviewed version, for example:

    bash
    npm install -g @pionex/pionex-ai-kit@X.Y.Z
    

    Do not use version ranges or implicit latest resolution.

  2. Publish and verify the expected npm integrity digest and package provenance before installation.

  3. Prefer a project-local installation with a committed lockfile over a global installation:

    bash
    npm install --save-exact @pionex/pionex-ai-kit@X.Y.Z
    npx pionex-trade-cli market tickers --symbol BTC_USDT
    
  4. Review the selected release's source, dependency tree, bundled executables, and npm lifecycle scripts before approving it.

  5. Where compatible with the package, disable lifecycle scripts during installation:

    bash
    npm install --ignore-scripts --save-exact @pionex/pionex-ai-kit@X.Y.Z
    
  6. Run the CLI as an unprivileged user in a restricted environment with minimal filesystem and network access. Do not use sudo for global installation.

  7. Add an update-review process so version and integrity changes require explicit security approval rather than silently tracking newly published releases.

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.