Back to skill

Security audit

A股市场全面复盘,整合指数表现、板块热力图、涨跌停、风格轮动、市场温度分析。触发词:市场复盘、今天市场怎么样、市场分析、每日复盘、市场概览。适用场景:对当日A股市场进行全面复盘、生成综合市场分析报告。不适用场景:个股深度分析、单一指标分析、债券/基金分析。

Security checks for vulnerabilities and agentic risk

Overview

This A-share market review skill is coherent, but it should be reviewed because it repeatedly tells users to run an unpinned npm CLI while configuring an API token.

Review this skill before installing if you are not comfortable with an agent downloading and running the latest npm version of daxiapi-cli during use. Prefer a pinned, reviewed CLI version and avoid pasting real API tokens directly into shell commands; use a safer secret store or a hidden-input setup if available.

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

Unpinned npm Package Is Downloaded and Executed at Runtime

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 49–71, with repeated invocations at lines 86–91, 208, 215, 224, 235, 243, 250, and 398
Vulnerability Type: T08: Insecure Dependencies
Risk Level: Medium

Vulnerable Code Snippet:

bash
npx daxiapi-cli@latest config get token
bash
# Method 1: Configure through the CLI
npx daxiapi-cli@latest config set token YOUR_TOKEN_FROM_DAXIAPI

# Method 2: Set an environment variable
export DAXIAPI_TOKEN=YOUR_TOKEN_FROM_DAXIAPI
bash
npx daxiapi-cli@latest market

The same unpinned execution pattern is prescribed for market analysis:

bash
npx daxiapi-cli@latest market index
npx daxiapi-cli@latest market temp
npx daxiapi-cli@latest sector heatmap
npx daxiapi-cli@latest stock limit
npx daxiapi-cli@latest market style
npx daxiapi-cli@latest stock top

Technical Analysis

The Skill repeatedly instructs the agent or user to invoke daxiapi-cli@latest through npx. If the package is unavailable locally, npx can retrieve it from the configured npm registry and immediately execute its code.

The @latest version selector is mutable. Consequently, the code executed during a future Skill invocation may differ from the code that existed when this Skill was audited. The project does not provide an exact package version, integrity hash, lockfile, vendored copy, or other mechanism that makes the executable dependency reproducible.

This creates a supply-chain trust boundary in which a compromised package publisher, npm account, registry, or future package release could introduce arbitrary executable behavior. No evidence establishes that the current package is malicious; the vulnerability is the unsafe, mutable dependency execution model.

Attack Path

  1. An attacker compromises the npm package publisher account, registry distribution channel, or another component capable of modifyin ...[truncated 1131 chars]
Remediation
View remediation

Remediation Suggestions

  1. Replace @latest with an exact, reviewed package version, for example:

    bash
    npx --yes daxiapi-cli@X.Y.Z market index
    
  2. Verify the selected package version, publisher identity, expected registry, and package provenance before documenting it.

  3. Record and validate the expected package integrity hash where the deployment mechanism supports integrity verification.

  4. Prefer installing dependencies through a project manifest and lockfile rather than downloading executable code during every invocation.

  5. Consider vendoring or wrapping the minimum reviewed functionality so that the executable implementation cannot change independently of the Skill.

  6. Run the CLI with least privilege and restrict its access to unrelated files, credentials, and network destinations where practical.

  7. Establish a controlled dependency-update process that requires review and security testing before changing the pinned version.

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:60
Finding

API Token May Be Exposed Through Command Arguments and Shell History

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 60–66
Vulnerability Type: T09: Insecure Skill Coding Practices
Risk Level: Medium

Vulnerable Code Snippet:

bash
# Method 1: Configure through the CLI
npx daxiapi-cli@latest config set token YOUR_TOKEN_FROM_DAXIAPI

# Method 2: Set an environment variable
export DAXIAPI_TOKEN=YOUR_TOKEN_FROM_DAXIAPI

Technical Analysis

The first configuration method places the API token directly in the process command-line arguments. Depending on the operating system and local controls, command arguments may be visible through process-inspection utilities, monitoring agents, audit logs, terminal capture, or diagnostic telemetry. The completed command may also remain in the user's shell history.

The second method avoids placing the token in a child process's argument list, but interactively typing the complete export command can still retain the secret in shell history. Once exported, the token is also inherited by subsequently launched child processes unless it is explicitly removed.

The Skill does not prescribe hidden input, standard-input transfer, protected credential storage, restrictive file permissions, history-safe setup, redaction, expiration, or token rotation. No hardcoded real credential was found; the issue concerns the unsafe handling method recommended for a user-supplied secret.

Attack Path

A command-argument exposure scenario is:

  1. The user replaces YOUR_TOKEN_FROM_DAXIAPI with a valid token.
  2. The user runs the documented config set token command.
  3. The full command is retained in shell history, captured by terminal or audit telemetry, or temporarily exposed through process inspection.
  4. Another local user, process, support operator, or log reader obtains the token.
  5. The exposed token is reused to access the associated API until it expires or is revoked.

An environment-variable exposur ...[truncated 1063 chars]

Remediation
View remediation

Remediation Suggestions

  1. Provide an interactive configuration command that reads the token through a hidden prompt rather than a command-line argument.
  2. Where supported, pass the token through standard input or an operating-system credential manager.
  3. Store persistent credentials in a protected secret store rather than a plaintext configuration file.
  4. If file-based storage is unavoidable, require restrictive owner-only permissions and document the storage location.
  5. Avoid instructing users to type real secret values directly into shell commands that may be retained in history.
  6. Ensure logs, error messages, reports, and command traces redact token values.
  7. Unset temporary environment variables immediately after use and prevent unnecessary inheritance by child processes.
  8. Document token expiration, revocation, and rotation procedures for suspected exposure.
  9. Recommend least-privilege tokens with only the permissions required for market-data retrieval.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (19)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

描述中的触发词包含“今天市场怎么样”“市场分析”等宽泛表述,这些短语在一般对话中也可能自然出现,且未提供负面示例来界定何时不应触发。虽然文件后文说明了适用/不适用场景,但这些触发词本身仍然容易与普通咨询重叠。

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

“市场复盘”“今天市场怎么样”“市场分析”“市场概览”“市场总结”等词组中,多项缺少A股、当日、复盘报告等限定条件,容易覆盖普通市场类问答。该处虽列出触发词,但未给出排除条件或更细的触发范围约束。

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
97% confidence
Finding

The skill instructs use of npx daxiapi-cli@latest, which fetches and executes the newest package version at runtime rather than a reviewed, fixed release. If the upstream package is compromised or a breaking/malicious update is published, users could execute attacker-controlled code on their machine while handling API tokens and market data workflows.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
97% confidence
Finding

This command again relies on @latest, causing unreviewed code to be downloaded and executed dynamically. Because this step is part of token setup, compromise of the package could expose credentials or alter configuration in addition to arbitrary code execution.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
97% confidence
Finding

The verification step uses npx ...@latest market, which still executes remote code from the newest published package. Even seemingly read-only validation commands can run arbitrary install scripts or malicious CLI logic if the package supply chain is compromised.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

The skill repeatedly recommends running an unpinned package via npx, creating a supply-chain execution risk each time a user follows the workflow. In an agent skill, repetition increases the chance that this unsafe pattern becomes standard operational behavior.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

This unpinned npx invocation allows the executed code to change over time without review. In a financial-analysis skill that may be used frequently, attackers could leverage a compromised release to steal tokens, modify outputs, or run arbitrary commands under the user's account.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

The command references @latest, so the actual executable content is uncontrolled and can vary between runs. This is dangerous because the skill encourages operational trust in the CLI while also handling authenticated API access.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

Unpinned package execution via npx introduces a classic supply-chain risk: the command may execute different, potentially malicious code at any future time. The surrounding skill context makes this more dangerous because it trains users to run the package for core analysis tasks repeatedly.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

This market-analysis command downloads and runs the latest package version on demand, which can be abused if the npm package or publisher account is compromised. Because the skill is intended for repeated market workflows, exploitation could persistently affect many invocations and expose environment data.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

Using npx daxiapi-cli@latest stock top executes code from the mutable latest release with no reproducibility or review guarantees. Even though the function is data retrieval, the installation/execution boundary gives a compromised package full code execution capability in the user environment.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

The report template embeds an unpinned CLI command as a data source reference, normalizing unsafe execution as part of standard reporting practice. This increases the likelihood that downstream users or copied workflows will execute an unreviewed package version.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

The skill treats a mutable @latest command as an authoritative data source for market temperature analysis. If the package is tampered with, both system compromise and integrity loss of financial outputs become possible, which is especially risky in a skill providing investment-oriented analysis.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

This template command again references unpinned transient execution through npx. The context makes it more dangerous because users may copy-paste these commands directly from the skill, executing whatever package version is current at that moment.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

The skill continues to propagate @latest usage in reporting instructions, exposing users to supply-chain risk whenever they follow the documented workflow. Because the commands can run in environments containing API tokens, compromise can lead to credential theft or broader host impact.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

This optional analysis dimension still relies on a mutable package release, so the risk persists even in non-mandatory parts of the skill. Any copied command can result in execution of malicious install hooks or altered CLI logic if the npm supply chain is compromised.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

The unpinned command for hot-stock analysis has the same supply-chain execution weakness and also affects the integrity of generated financial insights. In the context of an investment-related skill, tampered outputs could mislead users in addition to compromising the host environment.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding

This second finding on the same line reflects another unsafe @latest invocation in credential-related remediation instructions. The combination of supply-chain execution and token management raises the severity beyond a generic documentation issue because users are likely to run these commands during incident handling.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

技能描述完全以中文表达,并默认面向“A股市场”语境输出,但没有说明是否支持其他语言或允许用户选择语言。按规则,强制特定语言而无用户选择可能构成语言/locale 策略问题。

Content

No source excerpt is available for this finding.