Back to skill

Security audit

Trading Quant

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a legitimate market-data analysis skill, but its local temp/cache handling and broad execution surface need review before installation.

Install only if you are comfortable with a finance-analysis skill that calls multiple public market/news APIs and stores local caches. Avoid running it as a privileged account or on shared multi-user systems until the /tmp cache and batch-output handling are hardened. Treat its trading scores and signal labels as informational analysis, not investment recommendations.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/lib/analysis/industry_classifier.py:10
Finding

Predictable Shared Cache File Permits Local Data Poisoning and Symlink-Based File Overwrite

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/batch_fetch.sh:7
Finding

Predictable Batch Directory Enables Local Symlink-Based Output Overwrite

Content
View full analysis
"$OUT/stock.json" 2>/dev/null & $PYTHON "$QUANT" northbound_flow > "$OUT/northbound.json" 2>/dev/null & $PYTHON "$QUANT" market_anomaly > "$OUT/anomaly.json" 2>/dev/null & $PYTHON "$QUANT" news_sentiment > "$OUT/news.json" 2>/dev/null & $PYTHON "$QUANT" gold_analysis > "$OUT/gold.json" 2>/dev/null & $PYTHON "$QUANT" margin_data > "$OUT/margin.json" 2>/dev/null & $PYTHON "$QUANT" lhb > "$OUT/lhb.json" 2>/dev/null & $PYTHON "$QUANT" top_amount > "$OUT/top_amount.json" 2>/dev/null & $PYTHON "$QUANT" save_daily > "$OUT/save.json" 2>/dev/null & ;; esac wait echo "{" first=1 for f in "$OUT"/*.json; do name=$(basename "$f" .json) [ $first -eq 0 ] && echo "," echo "\"$name\": $(cat "$f")" first=0 done echo "}" rm -rf "$OUT" ``` ### Technical Analysis The script derives its temporary directory from the process ID: ```bash OUT=/tmp/quant_batch_$$ ``` Process IDs are predictable and come from a limited namespace. The script then invokes `mkdir -p`, which succeeds when an attacker-created directory already exists. It does not verify that the directory was newly created, belongs to the current user, or has restrictive permissions. The output redirections subsequently open fixed filenames inside this directory. Shell redirection follows existing symbolic links. A local attacker who prepares the predicted directory and places symlinks such as `stock.json` or `save.json` inside it can cause the victim process to truncate and overwrite files writable by the victim. The same pre-created directory can also contain attacker-controlled `.json` files. ...[truncated 1430 chars]
Remediation
View remediation
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (71)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

Claiming sophisticated real-time, multi-market, multi-factor analytics while only computing simple daily percent change via yfinance is a severe capability mismatch. This can materially mislead users into relying on outputs for trading or automation decisions and obscures the true set of external dependencies.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Claiming sophisticated real-time, multi-market, multi-factor analytics while only computing simple daily percent change via yfinance is a severe capability mismatch. This can materially mislead users into relying on outputs for trading or automation decisions and obscures the true set of external dependencies.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Claiming sophisticated real-time, multi-market, multi-factor analytics while only computing simple daily percent change via yfinance is a severe capability mismatch. This can materially mislead users into relying on outputs for trading or automation decisions and obscures the true set of external dependencies.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

Claiming sophisticated real-time, multi-market, multi-factor analytics while only computing simple daily percent change via yfinance is a severe capability mismatch. This can materially mislead users into relying on outputs for trading or automation decisions and obscures the true set of external dependencies.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Claiming sophisticated real-time, multi-market, multi-factor analytics while only computing simple daily percent change via yfinance is a severe capability mismatch. This can materially mislead users into relying on outputs for trading or automation decisions and obscures the true set of external dependencies.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Claiming sophisticated real-time, multi-market, multi-factor analytics while only computing simple daily percent change via yfinance is a severe capability mismatch. This can materially mislead users into relying on outputs for trading or automation decisions and obscures the true set of external dependencies.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

Claiming sophisticated real-time, multi-market, multi-factor analytics while only computing simple daily percent change via yfinance is a severe capability mismatch. This can materially mislead users into relying on outputs for trading or automation decisions and obscures the true set of external dependencies.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

Claiming sophisticated real-time, multi-market, multi-factor analytics while only computing simple daily percent change via yfinance is a severe capability mismatch. This can materially mislead users into relying on outputs for trading or automation decisions and obscures the true set of external dependencies.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Claiming sophisticated real-time, multi-market, multi-factor analytics while only computing simple daily percent change via yfinance is a severe capability mismatch. This can materially mislead users into relying on outputs for trading or automation decisions and obscures the true set of external dependencies.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

Claiming sophisticated real-time, multi-market, multi-factor analytics while only computing simple daily percent change via yfinance is a severe capability mismatch. This can materially mislead users into relying on outputs for trading or automation decisions and obscures the true set of external dependencies.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

Claiming sophisticated real-time, multi-market, multi-factor analytics while only computing simple daily percent change via yfinance is a severe capability mismatch. This can materially mislead users into relying on outputs for trading or automation decisions and obscures the true set of external dependencies.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

Claiming sophisticated real-time, multi-market, multi-factor analytics while only computing simple daily percent change via yfinance is a severe capability mismatch. This can materially mislead users into relying on outputs for trading or automation decisions and obscures the true set of external dependencies.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Claiming sophisticated real-time, multi-market, multi-factor analytics while only computing simple daily percent change via yfinance is a severe capability mismatch. This can materially mislead users into relying on outputs for trading or automation decisions and obscures the true set of external dependencies.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Claiming sophisticated real-time, multi-market, multi-factor analytics while only computing simple daily percent change via yfinance is a severe capability mismatch. This can materially mislead users into relying on outputs for trading or automation decisions and obscures the true set of external dependencies.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Claiming sophisticated real-time, multi-market, multi-factor analytics while only computing simple daily percent change via yfinance is a severe capability mismatch. This can materially mislead users into relying on outputs for trading or automation decisions and obscures the true set of external dependencies.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Claiming sophisticated real-time, multi-market, multi-factor analytics while only computing simple daily percent change via yfinance is a severe capability mismatch. This can materially mislead users into relying on outputs for trading or automation decisions and obscures the true set of external dependencies.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The manifest exposes a tool entrypoint that can invoke code and the surrounding analysis indicates capabilities for environment access, file I/O, and network use, yet the skill declares no explicit permission or allowed-tools scope. In an agent setting, missing scope boundaries increases the chance the skill is invoked with broader privileges than users expect, especially for a market-data skill that does not obviously need unrestricted local file writes.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

An overly broad activation phrase can cause the skill to trigger on common financial questions, increasing unnecessary exposure to its file, network, and persistence behaviors. In an agent environment, overbroad matching can bypass user intent and expand attack surface through accidental invocation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The natural-language description and operating rules are presented entirely in Chinese for user-facing behavior, while no opt-in or alternative locale is offered. This can violate language or locale policy when users have not chosen Chinese or when the agent is expected to adapt to user language preferences.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The batch script invokes capabilities that are not disclosed in the skill manifest, including additional data collection/reporting operations and a persistence-like save_daily action. Hidden or undocumented functionality increases the attack surface, defeats least-privilege expectations, and may cause the agent/operator to trigger behaviors they did not intend to authorize.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The function constructs many natural-language output messages and comments indicating end-user signals in Chinese, such as at L046-L055, L063-L069, and throughout the main-force analysis block. Because the file does not offer a language/locale option or document that the skill is intentionally China-market-only, this appears to force a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The module docstring states it 'completely relies on broker interfaces to obtain accurate data', which implies external data-source-only classification. In practice, the code also loads industry mappings from a local watchlist file and writes a persistent cache under /tmp, so behavior is not limited to broker/data-interface retrieval.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

The module docstring and many comments/docstrings are exclusively Chinese-language, which reflects a language-specific skill experience without any opt-in or explanation that the skill is intentionally locale-bound. Under the stated policy, forcing a specific language without user choice can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The classify_industry docstring says the function uses broker/data interfaces and returns 'unknown' if all interfaces fail, without guessing. However, _load_file_cache may prefill from watchlist.json before any API call, causing classify_industry to return a locally supplied sector classification even when no interface succeeds.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This file hard-codes user-facing confidence labels in Chinese (for example "中") and elsewhere returns many Chinese-language signals and alerts. Because the skill does not provide any opt-in, locale selection, or documented justification for forcing Chinese output, it violates the language/locale policy criteria.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.