Back to skill

Security audit

虾皮财务分析大师

Security checks for vulnerabilities and agentic risk

Overview

This financial-analysis skill is coherent, but needs Review because it repeatedly runs an unpinned third-party npm CLI while handling an API token.

Install only if you are comfortable running the DaxiAPI npm CLI in your environment. Prefer a pinned, reviewed CLI version, use a least-privilege and revocable token, avoid exposing unrelated files or secrets to the command process, and do not allow the agent to print or retain full token values in logs or responses.

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:39
Finding
Execution of an Unpinned Mutable npm Package<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 39–54 **Additional Locations**: `SKILL.md`, lines 66, 81, 242, and 289; `references/cli-commands.md`, lines 8, 75, 78, and 81 **Vulnerability Type**: Supply-chain risk caused by downloading and executing a mutable dependency **Risk Level**: High ### Vulnerable Code Snippet ```markdown **Step 0.1: Check Token Configuration Status** ```bash npx daxiapi-cli@latest config get token ``` **Step 0.2: If Not Configured, Ask the User to Obtain a Token** 1. Visit [daxiapi.com](https://daxiapi.com) personal homepage 2. Enable the API Token feature 3. Copy the generated Token **Step 0.3: Configure the Token** ```bash npx daxiapi-cli@latest config set token YOUR_TOKEN_FROM_DAXIAPI ``` ``` The same mutable package reference is also used for financial-report retrieval: ```bash npx daxiapi-cli@latest report finance <code> ``` ### Technical Analysis The Skill repeatedly instructs the agent to invoke `npx daxiapi-cli@latest`. Unless the package is already available locally, `npx` can retrieve the named package from the configured npm registry and execute it immediately. The `@latest` tag is mutable, so the effective executable code can change after this Skill has been reviewed. The project does not provide an exact package version, lockfile, integrity hash, verified publisher information, or a locally audited implementation. Consequently, review of the files in this project cannot establish the safety of the code that will execute at runtime. This creates a third-party supply-chain boundary. Compromise of the npm package, its publisher account, its release workflow, or the registry resolution path could cause arbitrary package lifecycle or CLI code to execute under the privileges of the user or agent running the Skill. ### Attack Path 1. An attacker compromises the `daxiapi-cli` npm publisher account, release pipeline, or another relevant package-distribution component. 2. The attacker publis ...[truncated 1372 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Replace `@latest` with an exact, reviewed version, for example: ```bash npx --yes daxiapi-cli@1.2.3 report finance <code> ``` 2. Maintain a package lockfile and verify the package's integrity hash before execution. 3. Document the expected npm registry, official package name, and verified publisher identity. 4. Prefer installing the reviewed version as a declared project dependency and invoking its local binary rather than downloading code on every run: ```bash npm ci ./node_modules/.bin/daxiapi report finance <code> ``` 5. Run the CLI with least privilege in a restricted environment that exposes only required files, environment variables, and network destinations. 6. Disable unnecessary npm lifecycle scripts where compatible with the package and deployment process. 7. Establish a controlled upgrade process in which new versions are reviewed and tested before the pinned version is changed. 8. Avoid supplying unrelated credentials or sensitive directories to the process executing the CLI. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:39
Finding
API Token May Be Disclosed by the Token Retrieval Command<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 39–42 **Additional Location**: `SKILL.md`, lines 287–290 **Vulnerability Type**: Plaintext credential exposure through command output and agent logs **Risk Level**: Medium ### Vulnerable Code Snippet ```markdown **Step 0.1: Check Token Configuration Status** ```bash npx daxiapi-cli@latest config get token ``` ``` The error-handling section reiterates the same behavior: ```markdown ### 2. Token/Authentication Failure - First run `npx daxiapi-cli@latest config get token` - If no Token exists, guide the user through configuration and retry ``` ### Technical Analysis The Skill uses `config get token` to determine whether authentication is configured. Based on the command name and the absence of any documented masking option, this operation may return the stored token value rather than only a boolean configuration status. Command output can be captured by terminal history, CI logs, agent tool transcripts, observability systems, debugging output, or model context. The Skill contains no requirement to suppress, mask, or redact the token. It also does not instruct the agent to avoid reproducing command output in a response. The exposure is amplified because the command is executed through the unpinned third-party package described in the separate dependency finding. That package receives access to the token configuration and may be able to read or emit the credential. ### Attack Path 1. A user has previously configured a valid DaxiAPI token. 2. The Skill is invoked for the first time or after an authentication error. 3. Following the documented procedure, the agent runs `npx daxiapi-cli@latest config get token`. 4. The CLI prints the token or otherwise includes it in command output. 5. The execution environment records that output in an agent transcript, terminal log, CI log, or monitoring system. 6. A party with access to the recorded output obtains the token and uses it against the D ...[truncated 795 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Replace the token retrieval operation with a status or validation command that never returns the secret, such as a supported `config has token`, `auth status`, or authenticated health-check operation. 2. If no safe status command exists, check only whether the `DAXIAPI_TOKEN` variable is present without printing its value. 3. Require all command runners and agent tooling to redact token-shaped values from stdout, stderr, logs, traces, and responses. 4. Never reproduce the complete token in user-visible output. At most, display a short masked identifier such as `****abcd`. 5. Prefer a secret manager or protected environment-variable injection over plaintext command-line arguments and general configuration output. 6. Ensure token configuration files have restrictive filesystem permissions. 7. Use a narrowly scoped, revocable token and rotate it immediately if it appears in any transcript or log. 8. Add explicit Skill instructions stating that authentication diagnostics must not print, store, or transmit the token. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (15)

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% 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, immutable version. This creates a supply-chain risk: if the package is compromised or a breaking/malicious release is published, users may execute attacker-controlled code while handling tokens and financial data.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding
This line again relies on `npx ...@latest`, causing runtime installation/execution of whatever package version is current at invocation time. In a skill workflow, repeating this pattern increases the chance that users run unreviewed code multiple times, including during sensitive token setup.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding
The verification step uses `npx daxiapi-cli@latest report finance 300014`, which means even the trust-establishing 'validation' path executes mutable third-party code. If the package or dependency chain is compromised, the validation command could exfiltrate tokens or run arbitrary commands under the user's account.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding
The primary data acquisition command also uses `npx ...@latest`, exposing routine analysis runs to package substitution and dependency compromise. Because the workflow centers on repeated command execution, the attack surface is persistent rather than one-off.

Description-Behavior Mismatch

Medium
Confidence
93% confidence
Finding
Manifest 与总述多次强调该技能是“基于大虾皮财报命令”进行 ROE/杜邦分析,且适用场景也限定为基于该命令完成分析。L092-L096 明确加入了在失败时转向互联网检索公开数据的备选路径,这改变了技能的数据获取范围和行为边界,不再只是围绕声明的数据源执行。

Description-Behavior Mismatch

Medium
Confidence
89% confidence
Finding
技能描述核心是基于 daxiapi CLI 输出做单公司财务拆解,而 L107-L126 增加了访问 `www.cninfo.com.cn`、定位公告 PDF、提取字段并逐项对比的能力。这不是实现 CLI 分析的必然细节,而是新增了第二外部数据源与文档解析流程,超出了 manifest 当前表述的简洁范围。

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding
Although this occurrence is in a checklist/reference context, it still normalizes execution of an unpinned `npx` package. Documentation-level instructions can directly drive unsafe operator behavior, so the supply-chain risk remains real even outside imperative steps.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding
The error-handling path tells users to execute the same unpinned `npx ...@latest` command during authentication troubleshooting. Security-sensitive recovery flows are especially risky because they often involve credentials and are more likely to be followed verbatim by users under time pressure.

Rp1

Medium
Category
MCP Rug Pull
Confidence
97% confidence
Finding
The documentation instructs users to run `npx daxiapi-cli@latest`, which fetches and executes the newest published package version at runtime rather than a vetted, immutable release. If the npm package is compromised, typo-squatted, or a malicious update is published, users could execute attacker-controlled code on their systems.

Rp1

Medium
Category
MCP Rug Pull
Confidence
97% confidence
Finding
This example again uses `npx daxiapi-cli@latest`, causing implicit trust in whatever code is currently published under that package name. Because `npx` executes the downloaded package, a compromised or swapped release can lead directly to arbitrary code execution in the user's environment.

Rp1

Medium
Category
MCP Rug Pull
Confidence
97% confidence
Finding
The command example for stock data retrieval references `npx daxiapi-cli@latest`, which is a supply-chain risk because the exact executable is not fixed. In a financial-analysis skill, users may run this on analyst workstations or CI-like environments with API tokens configured, increasing the risk of credential theft or system compromise if the package is malicious.

Rp1

Medium
Category
MCP Rug Pull
Confidence
97% confidence
Finding
This line repeats the unsafe `npx ...@latest` pattern, exposing users to unreviewed future package contents at execution time. Since the workflow mentions token configuration elsewhere, exploitation could allow exfiltration of API credentials in addition to arbitrary local code execution.

Natural-Language Policy Violations

Medium
Confidence
91% confidence
Finding
The document title and all reporting instructions are written as a required Chinese report template, and there is no indication that users may choose another language or locale. This can violate a language/locale policy when a skill forces a specific language without user opt-in.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
This markdown skill file presents all instructions, headings, and required output guidance exclusively in Chinese, which can effectively force a specific language/locale on users. The policy allows locale constraints only when users are given a choice or when the restriction is clearly documented and justified, neither of which appears here.

Natural-Language Policy Violations

Low
Confidence
95% confidence
Finding
This markdown file contains user-facing natural-language instructions exclusively in Chinese, and nowhere indicates that Chinese is optional or that the skill is intended only for a Chinese-speaking or China-specific context. Under the policy rule for language/locale constraints, forcing a specific language without opt-in can be a natural-language policy violation.

Static analysis

No suspicious patterns detected.