Back to skill

Security audit

China Stock Market Shanghai Shenzhen Index

Security checks for vulnerabilities and agentic risk

Overview

The skill's stock-data purpose is coherent, but it asks users to install and run an unpinned npm gateway and includes credential-handling examples that could expose the API key.

Install only if you trust the @aiagenta2z/onekey-gateway package and the DeepNLP OneKey Gateway service. Pin or verify the package version where possible, avoid global installation if you can, do not run the verbose curl example with a real key, and rotate the key if it appears in logs or terminal output.

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)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:8
Finding

Unpinned Third-Party npm Dependency Is Installed and Executed

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 8-10 and 46-50
Vulnerability Type: Unpinned executable third-party dependency
Risk Level: Medium

Vulnerable Code

yaml
dependencies:
  npm:
    - "@aiagenta2z/onekey-gateway"
installation:
  npm: npm -g install @aiagenta2z/onekey-gateway
shell
## install onekey agent gateway
npm install @aiagenta2z/onekey-gateway

## CLI to Call API and Symbol List
npx onekey agent aiagenta2z/financeagent get_cn_stock_market_shanghai_shenzhen '{"symbol_list": ["SH600519", "SH600036"]}'

Technical Analysis

The Skill directs users to install and execute @aiagenta2z/onekey-gateway without specifying an exact audited version. The project contains no package lockfile, integrity hash, vendored implementation, or other mechanism that fixes the dependency to reviewed content.

The global installation instruction increases the installation scope. The documented npx invocation may also retrieve and execute package content dynamically when the required executable is not already available locally. Consequently, the code executed by users can differ from the code available when the Skill was audited.

This is a supply-chain weakness rather than evidence that the named package is currently malicious. Exploitation would require compromise of the package, its publisher, the package registry, or another dependency-resolution mechanism.

Attack Path

  1. An attacker compromises the npm package publisher, registry distribution path, or a transitive dependency.
  2. The attacker publishes a malicious version that still satisfies the unpinned package reference.
  3. A user follows the Skill instructions and runs npm install, the global installation command, or npx onekey.
  4. npm retrieves the attacker-controlled package version.
  5. Malicious lifecycle scripts or CLI code execute with the privileges of the invoking user.
  6. The payload can acces ...[truncated 516 chars]
Remediation
View remediation

Remediation Suggestions

  • Pin the dependency to an exact version that has undergone security review.
  • Include and enforce a lockfile with registry integrity metadata.
  • Install the package locally rather than globally to reduce its scope.
  • Invoke only the verified local executable, such as through an offline package-manager execution mode.
  • Prevent runtime package downloads in production or automated environments.
  • Use an approved npm registry and verify package provenance, signatures, publisher identity, and integrity hashes.
  • Review direct and transitive dependencies and enable automated dependency vulnerability monitoring.
  • Run the CLI as an unprivileged, isolated account with access only to the required credential and network destination.

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:58
Finding

Verbose curl Command Exposes the Gateway API Key in Diagnostic Output

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 58-63
Vulnerability Type: Sensitive credential disclosure through verbose request logging
Risk Level: Medium

Vulnerable Code

shell
export DEEPNLP_ONEKEY_ROUTER_ACCESS=your_access_key

curl -v -X POST "https://agent.deepnlp.org/agent_router" \
  -H "Content-Type: application/json" \
  -H "X-OneKey: $DEEPNLP_ONEKEY_ROUTER_ACCESS" \
  -d '{

Technical Analysis

The command enables curl's verbose mode with -v while placing the gateway credential in the X-OneKey request header. The shell expands $DEEPNLP_ONEKEY_ROUTER_ACCESS before curl processes the argument, and verbose curl output displays outgoing request headers on standard error.

As a result, the secret can appear in terminal recordings, CI/CD logs, agent execution logs, redirected diagnostic output, or support transcripts. TLS protects the request while it is transmitted over the network, but it does not prevent local verbose logging before transmission.

Attack Path

  1. A user exports a valid value in DEEPNLP_ONEKEY_ROUTER_ACCESS.
  2. The user runs the documented curl -v command.
  3. Curl writes the outgoing X-OneKey header, including the expanded secret, to standard error.
  4. A terminal recorder, CI platform, agent framework, logging system, or redirected output retains the diagnostic text.
  5. An attacker or unauthorized user obtains access to the retained output.
  6. The exposed key is replayed against the OneKey Gateway to make requests under the affected account until the credential expires or is revoked.

Impact Assessment

Exposure can allow unauthorized use of the gateway credential and any APIs or quotas available to it. The precise scope depends on the server-side permissions assigned to the key. Potential consequences include unauthorized API requests, consumption of paid service quotas, access to data available through the credential, and attribution ...[truncated 123 chars]

Remediation
View remediation

Remediation Suggestions

  • Remove -v from commands that transmit credentials.
  • Use --silent --show-error when concise operational diagnostics are required.
  • Do not record or echo authorization headers in application, CI/CD, terminal, or agent logs.
  • Configure log redaction for X-OneKey and DEEPNLP_ONEKEY_ROUTER_ACCESS.
  • Store the key in an approved secret manager and inject it only into the process that requires it.
  • Restrict the key to the minimum APIs, quotas, and lifetime needed for this Skill.
  • Rotate any credential that may previously have appeared in verbose output.
  • Add documentation warning users not to share terminal output containing request headers.
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 (3)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill documentation repeatedly demonstrates exporting and transmitting an API key but does not include any warning about secret handling, shell history, terminal logging, CI exposure, or avoiding hardcoding. In practice, users often copy-paste examples directly, so omission of credential-safety guidance increases the chance of accidental key disclosure and downstream unauthorized API use.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 65)May include surrounding context.

shell
export DEEPNLP_ONEKEY_ROUTER_ACCESS=your_access_key

curl -v -X POST "https://agent.deepnlp.org/agent_router" \
  -H "Content-Type: application/json" \
  -H "X-OneKey: $DEEPNLP_ONEKEY_ROUTER_ACCESS" \
  -d '{