Back to skill

Security audit

sn-search-finance

Security checks for vulnerabilities and agentic risk

Overview

This finance-search skill is coherent and disclosed, with ordinary dependency and local-download cautions but no evidence of hidden or malicious behavior.

Install in a virtual environment or container, consider pinning dependency versions before use, and run the download command only in a workspace where saving remote financial data files under the chosen --downdir path is acceptable. Do not place real API keys, tokens, or cookies in committed files or logs.

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
requirements.txt:1
Finding

Unpinned Third-Party Dependencies Allow Non-Reproducible and Potentially Unsafe Package Resolution

Content
View full analysis

Vulnerability Details

File Location: requirements.txt:1-2; installation guidance at SKILL.md:26-30
Vulnerability Type: Unpinned third-party dependencies and expanded optional dependency set
Risk Level: Medium

Vulnerable code in requirements.txt:

text
yfinance
mootdx[all]

Related installation command in SKILL.md:

bash
python3 -m pip install -r requirements.txt

Technical Analysis

Neither dependency has an exact version constraint or an integrity hash. The mootdx[all] declaration additionally installs an expanded set of optional and transitive dependencies. Package resolution therefore depends on the versions available from the configured package index at installation time, meaning that two installations of the same reviewed project may execute different third-party code.

This creates a supply-chain exposure: a compromised, malicious, unexpectedly replaced, or incompatible future package release could be selected without any change to this repository. Hash verification is also absent, so the installation process does not verify artifacts against a repository-approved set of cryptographic digests.

The project does not automatically install these packages from its Python script, and no evidence shows that the currently published dependencies are malicious. The risk arises when a user follows the documented installation command and resolves externally controlled package versions that were not fixed and reviewed with the project.

Attack Path

  1. An attacker compromises a dependency account, release process, distribution artifact, or relevant transitive dependency and publishes a malicious version.
  2. A user follows the documented command: python3 -m pip install -r requirements.txt.
  3. Because no exact versions or hashes are specified, pip may resolve and download the attacker-controlled release.
  4. Malicious package code may execute during installation, import, o ...[truncated 818 chars]
Remediation
View remediation

Remediation Suggestions

  1. Pin every direct dependency to a reviewed exact version, for example:

    text
    yfinance==<reviewed-version>
    mootdx==<reviewed-version>
    
  2. Replace mootdx[all] with the base package or only the specific extras required by the implemented commands.

  3. Generate and commit a lock file containing resolved transitive versions.

  4. Record cryptographic hashes for every approved distribution and install with:

    bash
    python3 -m pip install --require-hashes -r requirements.txt
    
  5. Regenerate pins and hashes through a controlled dependency-update process that includes package provenance review, vulnerability scanning, and functional testing.

  6. Install dependencies in an isolated, non-privileged virtual environment or container rather than as root or into the system Python environment.

  7. Configure pip to use only trusted package indexes and prevent unintended fallback to unapproved public or supplemental indexes.

Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (27)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
2. 结构化数据用 `scripts/finance_search.py`:yfinance 查全球 ticker、行情、财务、新闻、SEC filings;mootdx 查通达信/A 股行情、K 线、财务包。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
2. 结构化数据用 `scripts/finance_search.py`:yfinance 查全球 ticker、行情、财务、新闻、SEC filings;mootdx 查通达信/A 股行情、K 线、财务包。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
2. 结构化数据用 `scripts/finance_search.py`:yfinance 查全球 ticker、行情、财务、新闻、SEC filings;mootdx 查通达信/A 股行情、K 线、财务包。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
2. 结构化数据用 `scripts/finance_search.py`:yfinance 查全球 ticker、行情、财务、新闻、SEC filings;mootdx 查通达信/A 股行情、K 线、财务包。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
2. 结构化数据用 `scripts/finance_search.py`:yfinance 查全球 ticker、行情、财务、新闻、SEC filings;mootdx 查通达信/A 股行情、K 线、财务包。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
2. 结构化数据用 `scripts/finance_search.py`:yfinance 查全球 ticker、行情、财务、新闻、SEC filings;mootdx 查通达信/A 股行情、K 线、财务包。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
2. 结构化数据用 `scripts/finance_search.py`:yfinance 查全球 ticker、行情、财务、新闻、SEC filings;mootdx 查通达信/A 股行情、K 线、财务包。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
2. 结构化数据用 `scripts/finance_search.py`:yfinance 查全球 ticker、行情、财务、新闻、SEC filings;mootdx 查通达信/A 股行情、K 线、财务包。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
2. 结构化数据用 `scripts/finance_search.py`:yfinance 查全球 ticker、行情、财务、新闻、SEC filings;mootdx 查通达信/A 股行情、K 线、财务包。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
2. 结构化数据用 `scripts/finance_search.py`:yfinance 查全球 ticker、行情、财务、新闻、SEC filings;mootdx 查通达信/A 股行情、K 线、财务包。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
2. 结构化数据用 `scripts/finance_search.py`:yfinance 查全球 ticker、行情、财务、新闻、SEC filings;mootdx 查通达信/A 股行情、K 线、财务包。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
2. 结构化数据用 `scripts/finance_search.py`:yfinance 查全球 ticker、行情、财务、新闻、SEC filings;mootdx 查通达信/A 股行情、K 线、财务包。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
2. 结构化数据用 `scripts/finance_search.py`:yfinance 查全球 ticker、行情、财务、新闻、SEC filings;mootdx 查通达信/A 股行情、K 线、财务包。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
2. 结构化数据用 `scripts/finance_search.py`:yfinance 查全球 ticker、行情、财务、新闻、SEC filings;mootdx 查通达信/A 股行情、K 线、财务包。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
2. 结构化数据用 `scripts/finance_search.py`:yfinance 查全球 ticker、行情、财务、新闻、SEC filings;mootdx 查通达信/A 股行情、K 线、财务包。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
2. 结构化数据用 `scripts/finance_search.py`:yfinance 查全球 ticker、行情、财务、新闻、SEC filings;mootdx 查通达信/A 股行情、K 线、财务包。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
2. 结构化数据用 `scripts/finance_search.py`:yfinance 查全球 ticker、行情、财务、新闻、SEC filings;mootdx 查通达信/A 股行情、K 线、财务包。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
2. 结构化数据用 `scripts/finance_search.py`:yfinance 查全球 ticker、行情、财务、新闻、SEC filings;mootdx 查通达信/A 股行情、K 线、财务包。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
2. 结构化数据用 `scripts/finance_search.py`:yfinance 查全球 ticker、行情、财务、新闻、SEC filings;mootdx 查通达信/A 股行情、K 线、财务包。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
2. 结构化数据用 `scripts/finance_search.py`:yfinance 查全球 ticker、行情、财务、新闻、SEC filings;mootdx 查通达信/A 股行情、K 线、财务包。

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill explicitly instructs use of network-capable tools and external data sources such as yfinance, mootdx, Yahoo Finance, exchange sites, and browser-use, but it does not declare any tool scope restrictions like allowed-tools or permissions. This creates a governance gap: an agent/runtime may grant broader network or browser capabilities than intended, increasing the chance of unintended external access, data exfiltration, or unsafe browsing behavior when handling user queries.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

Several error messages and CLI help strings are presented only in Chinese, such as the dependency installation errors and many subcommand descriptions. This creates a language-policy issue because the skill does not offer an opt-in or alternative locale for users who do not read Chinese.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill is presented as a finance search/query helper, but it also exposes a command that downloads remote files to local storage via tdx-affair-fetch. In an agent setting, unexpected file-write capability broadens the attack surface and can be abused to persist untrusted content, consume disk space, or violate least-privilege expectations for a read-only search tool.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The download command writes files to a local directory by default without any user-facing warning, confirmation, or prominent disclosure in this file. Silent persistence of remote content is risky in agent workflows because users may assume the tool only queries data, while it actually modifies local state and stores untrusted files.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

Local file-writing capability is not clearly justified by the stated purpose of searching finance data, creating a capability mismatch between the advertised behavior and actual privileges. In a tool/agent environment, this can mislead operators into granting filesystem access they would not otherwise allow, increasing risk from misuse or chained attacks.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.