Back to skill

Security audit

市场盘前概览简报

Security checks for vulnerabilities and agentic risk

Overview

The skill’s market-briefing purpose is coherent, but it repeatedly asks users to run an unpinned remote CLI with an API token and gives weak token-storage guidance.

Review before installing. Use this only with a vetted, pinned version of daxiapi-cli rather than @latest, and keep the DaxiAPI token least-privilege and securely stored. Avoid commands that print the token into terminal or agent logs, and rotate the token if it has been exposed.

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

Error
Location
SKILL.md:34
Finding

Mutable Third-Party CLI Is Downloaded and Executed Through npx

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 34-68
Additional Locations: SKILL.md, lines 225-228; references/cli-commands.md, lines 10-155; references/token-setup.md, lines 31-37 and 154-185
Vulnerability Type: Unpinned third-party dependency execution
Risk Level: High

Vulnerable Code:

bash
npx daxiapi-cli@latest config get token
# If not configured:
npx daxiapi-cli@latest config set token YOUR_TOKEN
bash
# 1. Market structure
npx daxiapi-cli@latest market compass

# 2. Turnover
npx daxiapi-cli@latest turnover

# 3. Market-cap style
npx daxiapi-cli@latest market style

# 4. Sector heatmap
npx daxiapi-cli@latest sector heatmap

# 5. Price-limit pool
npx daxiapi-cli@latest zdt

# 6. Concept rankings
npx daxiapi-cli@latest hotrank concept

# 7. Industry rankings
npx daxiapi-cli@latest hotrank board

Technical Analysis

The mandatory workflow invokes daxiapi-cli@latest through npx. The latest tag is mutable, so the code executed by the Skill can change after the Skill itself has been reviewed. If the package is absent locally, npx can download it from the npm registry and execute its package code, including applicable lifecycle behavior.

No exact package version, lockfile, integrity hash, provenance requirement, or sandbox restriction is specified. Consequently, compromise of the npm package, its publisher account, or its transitive dependencies could turn an otherwise legitimate Skill invocation into arbitrary code execution.

The risk is elevated because the same CLI is given access to the DaxiAPI token and is expected to perform network operations. The audit did not establish that the current package is malicious; the vulnerability is the unsafe trust and execution model.

Attack Path

  1. An attacker compromises the daxiapi-cli npm package, its publisher account, or a dependency used by a future release.
  2. The attacker pu ...[truncated 975 chars]
Remediation
View remediation

Remediation Suggestions

  1. Replace every daxiapi-cli@latest reference with a reviewed, exact version such as daxiapi-cli@X.Y.Z.
  2. Install the dependency through a committed lockfile and use a reproducible installation mechanism such as npm ci.
  3. Verify package provenance, publisher identity, registry source, and integrity hashes before execution.
  4. Review direct and transitive dependencies whenever the pinned version is updated.
  5. Avoid automatic package installation during Skill execution. Provision the approved CLI separately and verify its version before use.
  6. Disable package lifecycle scripts where compatible with the CLI.
  7. Run the CLI in a restricted environment with minimum filesystem access, a network allowlist, and a narrowly scoped token.
  8. Ensure failures in dependency verification stop execution rather than falling back to the newest available release.

T09 · Insecure Skill Coding Practices

Warning
Location
references/token-setup.md:47
Finding

API Token May Be Printed and Persisted in Plaintext

Content
View full analysis

Vulnerability Details

File Location: references/token-setup.md, lines 47-55
Additional Locations: references/token-setup.md, lines 69-75, 123-132, and 192-199; SKILL.md, lines 34-38 and 225
Vulnerability Type: Plaintext secret storage and disclosure through command output
Risk Level: Medium

Vulnerable Code:

bash
# Temporary setting for the current terminal session
export DAXIAPI_TOKEN=YOUR_TOKEN_FROM_DAXIAPI

# Permanent setting in a shell startup file
echo 'export DAXIAPI_TOKEN=YOUR_TOKEN_FROM_DAXIAPI' >> ~/.zshrc
source ~/.zshrc

The document also directs users to store the token in a plaintext JSON file:

json
{
  "token": "YOUR_TOKEN_HERE"
}

Troubleshooting guidance can print the token directly:

bash
# Check the environment variable
echo $DAXIAPI_TOKEN

# If empty, set it again
export DAXIAPI_TOKEN=YOUR_TOKEN

# Or add it to the shell configuration
echo 'export DAXIAPI_TOKEN=YOUR_TOKEN' >> ~/.zshrc
source ~/.zshrc

The workflow also repeatedly uses:

bash
npx daxiapi-cli@latest config get token

Technical Analysis

The setup instructions encourage storing an authentication token directly in shell startup files or ~/.daxiapi/config.json. They do not prescribe restrictive file permissions or use of an operating-system credential store. The troubleshooting steps additionally use echo $DAXIAPI_TOKEN and a token retrieval command that may expose the secret in terminal output.

Plaintext tokens can be captured through Agent transcripts, terminal logging, screen sharing, shell configuration backups, diagnostic collection, or other processes running under the same account. Embedding a literal token in a shell command may also leave it in shell history. The documentation advises users not to share tokens, but that warning does not mitigate these concrete disclosure channels.

Attack Path

  1. A user follows the setup inst ...[truncated 1042 chars]
Remediation
View remediation

Remediation Suggestions

  1. Store the token in an operating-system credential store, managed secret service, or CI/CD secret manager rather than a shell startup file.
  2. Change token status commands so they report only whether a token is configured, or display a redacted fingerprint such as the final four characters.
  3. Remove all guidance that uses echo $DAXIAPI_TOKEN.
  4. If file-based storage is unavoidable, create the file with mode 0600, verify ownership, and document the required permissions.
  5. Avoid placing literal secrets in shell command lines that may be retained in history. Accept secrets through a hidden prompt or protected file descriptor.
  6. Ensure Agent and terminal logs redact values associated with DAXIAPI_TOKEN, Authorization, and token configuration output.
  7. Use separately issued, least-privilege tokens for each machine or environment.
  8. Document immediate revocation and rotation procedures and recommend periodic token rotation.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (45)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The manifest description lists trigger phrases such as “今日市场” and “今日热点”, which are broad terms commonly used in ordinary conversation about markets or news. Although the file includes suitable-use and unsuitable-use contexts, it does not provide negative examples or tighter constraints for these phrases, so activation scope remains too broad.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The trigger list includes broad phrases like “今日市场”, “市场主线”, and “今日热点”, which can overlap with normal user requests that are not specifically asking for this skill. The surrounding documentation describes use timing, but it does not clearly constrain activation to explicit pre-market A-share briefing requests or provide non-trigger examples.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

The skill instructs users to execute npx daxiapi-cli@latest, which fetches and runs whatever code is currently published under that package tag at execution time. Using a floating latest tag creates a supply-chain risk: a compromised maintainer account, malicious package update, or dependency hijack could lead to arbitrary code execution on the host running the skill.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

This command again relies on @latest, so the actual code executed is not fixed when the skill is authored or reviewed. Because it also handles token configuration, a malicious package version could exfiltrate credentials in addition to achieving code execution.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

Executing npx ...@latest market compass allows unreviewed remote package code to run every time the skill is used. In the context of an analyst workflow, that expands exposure from a one-time install risk to repeated arbitrary execution during routine data collection.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

This is another runtime invocation of a floating package version from the public npm ecosystem. Any malicious or compromised update could run with the user's permissions and tamper with local files, environment variables, or collected market data.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

The market style command is sourced through npx ...@latest, so the reviewed skill does not determine the actual code executed. This undermines reproducibility and opens the door to supply-chain compromise and arbitrary code execution.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

The skill repeatedly directs the operator to run a public package at the floating latest tag. Repetition increases the practical attack surface because multiple commands in the workflow depend on whatever code npm resolves at that moment.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

Invoking the hotrank concept command through an unpinned package is a real supply-chain weakness, not just an operational issue. If the package is hijacked, the user may unknowingly execute malicious code while expecting a harmless data query.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

This command also uses the mutable latest tag, creating the same arbitrary code execution and tampering risk as the earlier invocations. Because the skill is intended for regular premarket use, the likelihood of eventually hitting a bad update is materially higher than in a one-off script.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

The board hotrank command continues the pattern of executing unpinned registry content. This is dangerous because compromise of the package, a dependency, or registry resolution path could lead to code execution, credential theft, or falsified market outputs.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding

Even in troubleshooting guidance, recommending npx daxiapi-cli@latest preserves the same supply-chain execution risk. Users often follow troubleshooting steps with reduced skepticism, so embedding unsafe fetch-and-run patterns there remains dangerous.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding

The zdt examples still rely on a floating package tag, meaning even optional or debugging actions can trigger execution of unreviewed code. This broadens the unsafe pattern across the entire skill, not just its primary path.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The entire example output is written in Chinese and repeatedly labels the report as an A-share pre-market briefing, but the file does not state that Chinese is optional or that the skill is intentionally restricted to Chinese-language users. This can violate language/locale policy because it implicitly fixes the output language without user opt-in.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

L003 说明这是“盘前简报 Skill 使用的主要 CLI 命令”,但后文多个核心命令的数据更新时间分别是交易日收盘后或晚8点后更新(如 L023、L051、L078、L107)。对于 manifest 明确限定的开盘前 8:00-9:25 场景,这些命令更像基于前一交易日收盘数据的复盘输入,文档当前表述会让人误解为面向当日盘前实时全景简报。

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding

The command uses npx ...@latest, which fetches and executes the newest published package version at runtime rather than a reviewed, immutable version. This creates a supply-chain risk: a compromised maintainer account, malicious release, or breaking update could cause arbitrary code execution on the analyst or agent host when the documented command is followed.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding

This example again relies on @latest, causing runtime execution of whatever version is currently published to the registry. In a skill that may be copied into automation, this exposes users to remote unreviewed code changes and supply-chain compromise.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding

Using npx daxiapi-cli@latest price-limit allows execution of newly published package code without prior verification. Because npx can download and run code on demand, this materially increases supply-chain exposure for anyone using the documentation.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding

The documented npx ...@latest pattern executes mutable third-party code from the package registry. If the package or dependency chain is compromised, the host running this skill command could be affected immediately without any code change in the repository.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding

Even in the 'quick scan' examples, the use of @latest means every invocation may resolve to different code. This is dangerous because examples are often copied directly into scripts or runbooks, turning documentation into an execution path for unpinned remote code.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding

This command repeats the unpinned @latest execution pattern, enabling remote code changes outside repository review. Repeated occurrences increase the chance that users will normalize insecure invocation practices and embed them into tooling.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding

By resolving the package at runtime from the public registry, this command exposes consumers to malicious or broken upstream releases. In agent/CLI contexts, that can translate directly into arbitrary code execution under the user's privileges.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding

This example continues the unsafe pattern of executing mutable registry content via npx. Because the skill is intended to support trading-related workflows, users may trust and run these commands quickly, reducing scrutiny and increasing practical exploitability.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding

The 'deep analysis' example still fetches the current package release dynamically. That creates a straightforward supply-chain attack surface where an upstream compromise or typo-squatting-style confusion could impact anyone following the docs.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding

The command uses a mutable package reference, making behavior dependent on external publication state rather than repository-reviewed content. This undermines reproducibility and allows unauthorized upstream changes to become executable immediately.

Content

No source excerpt is available for this finding.