Back to skill

Security audit

BSpro Stock Quantization

Security checks for vulnerabilities and agentic risk

Overview

This stock-analysis skill is coherent in purpose, but it needs Review because its remote data-update path sends tokens over HTTP and imports remotely supplied files in unsafe ways that could expose credentials or run code if compromised.

Install only if you trust the BitSoul service and are comfortable giving it a token. Before use, the publisher should switch all token-bearing endpoints to HTTPS, remove pickle support for remote patches, add signed/digest-verified manifests, safely extract archives, remove the hard-coded token, disable or redact detailed logs by default, and make retraining/cache-clearing actions explicit and reversible.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
Findings (6)

T03 · Remote Payload Retrieval and Execution

Error
Location
scripts/data_fetcher.py:1694
Finding

Remote patch processing permits arbitrary code execution through untrusted pickle deserialization

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
assets/config.json:3
Finding

Authentication tokens and decryption credentials are transmitted over plaintext HTTP

Content
View full analysis
List[PatchItem]: ret: List[PatchItem] = [] token = config.get_token() response = requests.get( f"{define.BASE_URL}/api/patch_list/all", params={"token": token} ) ``` ```python def request_decrypt_key(file_name:str, token_key:str) -> str: url = f"{define.BASE_URL}/api/get_decryption_key" params = { "file_name": file_name, "token_key": token_key } response = requests.get(url, params=params) ``` ```python def request_check_token(token:str) -> TokenCheckResult: url = f"{define.BASE_URL}/api/check_token" params = { "token": token } response = requests.post(url, json=params) ``` ### Technical Analysis The configured API base URL uses HTTP rather than HTTPS. Consequently, authentication tokens, decryption credentials, API responses, patch metadata, and download URLs lack transport confidentiality and integrity. Several requests additionally place tokens in URL query parameters. Query strings are commonly retained in reverse-proxy logs, web-server logs, monitoring systems, and diagnostic output. Sending a credential in a POST body does not address the underlying problem when the connection itself is plaintext. Token-based authentication is consistent with the declared functionality, but sending the token without secure transport is not a minimum-safe implementation. ### Attack Path 1. A user runs initialization, update, token validation, history-data retrieval, or another serv ...[truncated 766 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/utils.py:46
Finding

Remote archives are extracted without path traversal validation

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/remote_api.py:182
Finding

Credential-like API token is hard-coded in executable source code

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/stock_api.py:222
Finding

Persistent default logging records sensitive portfolio and trading parameters

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
assets/requirements.txt:1
Finding

Dependency specifications permit installation of future unaudited releases

Content
View full analysis
=1.3.5 requests>=2.31.0 SQLAlchemy>=2.0.48 numpy>=1.21.0 ``` ### Technical Analysis Every dependency uses an open-ended minimum version and no integrity hash. A future installation may therefore select versions that were never tested or audited with this Skill. Builds are not reproducible, and compromise of an upstream release could affect new installations. No evidence of typosquatting, dependency confusion, or an explicitly malicious package was found. This finding concerns supply-chain hardening rather than proof that the named dependencies are malicious. ### Attack Path 1. A future dependency version is compromised, maliciously published, or introduces a severe vulnerability. 2. A user installs the Skill in a fresh environment. 3. The package resolver selects that later version because it satisfies the `>=` constraint. 4. Dependency code executes during installation, import, or normal Skill operation. 5. The compromised dependency gains the privileges of the Agent process. ### Impact Assessment Potential impact depends on the affected dependency and may range from application malfunction to arbitrary code execution and access to Agent-readable data. The current repository alone does not establish that such compromise has occurred. ]]>
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (92)

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The reported behavior includes patch-list retrieval, version checking, requests for decryption keys and download URLs, token validation, and submission of收益/持仓排行榜 data to a server—capabilities materially different from a simple stock-analysis skill. This is dangerous because it introduces remote update and outbound data submission pathways that can expose user data, enable opaque content delivery, and exceed user expectations for the granted token and network access.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The reported behavior includes patch-list retrieval, version checking, requests for decryption keys and download URLs, token validation, and submission of收益/持仓排行榜 data to a server—capabilities materially different from a simple stock-analysis skill. This is dangerous because it introduces remote update and outbound data submission pathways that can expose user data, enable opaque content delivery, and exceed user expectations for the granted token and network access.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

The reported behavior includes patch-list retrieval, version checking, requests for decryption keys and download URLs, token validation, and submission of收益/持仓排行榜 data to a server—capabilities materially different from a simple stock-analysis skill. This is dangerous because it introduces remote update and outbound data submission pathways that can expose user data, enable opaque content delivery, and exceed user expectations for the granted token and network access.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The reported behavior includes patch-list retrieval, version checking, requests for decryption keys and download URLs, token validation, and submission of收益/持仓排行榜 data to a server—capabilities materially different from a simple stock-analysis skill. This is dangerous because it introduces remote update and outbound data submission pathways that can expose user data, enable opaque content delivery, and exceed user expectations for the granted token and network access.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The reported behavior includes patch-list retrieval, version checking, requests for decryption keys and download URLs, token validation, and submission of收益/持仓排行榜 data to a server—capabilities materially different from a simple stock-analysis skill. This is dangerous because it introduces remote update and outbound data submission pathways that can expose user data, enable opaque content delivery, and exceed user expectations for the granted token and network access.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The reported behavior includes patch-list retrieval, version checking, requests for decryption keys and download URLs, token validation, and submission of收益/持仓排行榜 data to a server—capabilities materially different from a simple stock-analysis skill. This is dangerous because it introduces remote update and outbound data submission pathways that can expose user data, enable opaque content delivery, and exceed user expectations for the granted token and network access.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The reported behavior includes patch-list retrieval, version checking, requests for decryption keys and download URLs, token validation, and submission of收益/持仓排行榜 data to a server—capabilities materially different from a simple stock-analysis skill. This is dangerous because it introduces remote update and outbound data submission pathways that can expose user data, enable opaque content delivery, and exceed user expectations for the granted token and network access.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The reported behavior includes patch-list retrieval, version checking, requests for decryption keys and download URLs, token validation, and submission of收益/持仓排行榜 data to a server—capabilities materially different from a simple stock-analysis skill. This is dangerous because it introduces remote update and outbound data submission pathways that can expose user data, enable opaque content delivery, and exceed user expectations for the granted token and network access.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

The reported behavior includes patch-list retrieval, version checking, requests for decryption keys and download URLs, token validation, and submission of收益/持仓排行榜 data to a server—capabilities materially different from a simple stock-analysis skill. This is dangerous because it introduces remote update and outbound data submission pathways that can expose user data, enable opaque content delivery, and exceed user expectations for the granted token and network access.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The reported behavior includes patch-list retrieval, version checking, requests for decryption keys and download URLs, token validation, and submission of收益/持仓排行榜 data to a server—capabilities materially different from a simple stock-analysis skill. This is dangerous because it introduces remote update and outbound data submission pathways that can expose user data, enable opaque content delivery, and exceed user expectations for the granted token and network access.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The reported behavior includes patch-list retrieval, version checking, requests for decryption keys and download URLs, token validation, and submission of收益/持仓排行榜 data to a server—capabilities materially different from a simple stock-analysis skill. This is dangerous because it introduces remote update and outbound data submission pathways that can expose user data, enable opaque content delivery, and exceed user expectations for the granted token and network access.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

A hardcoded token appears directly in the source, which risks credential leakage through source distribution, logs, screenshots, or repository history. If the token is valid, anyone obtaining the code may be able to access protected APIs or impersonate the application/user.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill advertises environment access, file access, and network use in metadata but does not declare explicit tool scoping such as permissions or allowed-tools. That increases the attack surface because an agent may grant broader capabilities than users expect, especially given the skill also references local env-file reading, caching, initialization scripts, and remote API access.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This markdown file defines activation phrases such as “挖矿”, “碰碰运气”, and “随机推荐”, which are common conversational expressions and not specific to this stock-analysis skill. Such broad phrasing could cause unintended invocation because the boundaries of when the skill should activate versus not activate are not clearly constrained.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The instruction “默认使用简体中文” imposes a language/locale choice in the skill behavior without indicating user choice or opt-in. This is a natural-language policy concern because it fixes the interaction language rather than offering or detecting the user's preferred language.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill defines mandatory invocation of a random factor mining/backtest function based on broad natural-language triggers such as '随机推荐' and '碰碰运气'. This can cause unintended tool execution and strategy generation from casual user phrasing, reducing user control and potentially producing financial-analysis actions the user did not explicitly authorize.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The MoE weight training trigger is described with vague phrases like '优化权重' or '适配最新行情', which may match broad requests that do not clearly consent to retraining. Because training is computationally significant and changes future model behavior, ambiguous triggering can lead to unintended execution and state-changing side effects.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The documentation states that training automatically writes optimized weights to 'moe_weights.json' for future use, but does not require warning or confirmation before persistent local modification. Silent state persistence is dangerous because it changes subsequent outputs across sessions and can be abused to poison or unexpectedly alter model behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The cache-clearing functions can delete local indicator cache data, including all cached data, without any documented warning, confirmation, or safety guard. In an agent setting, destructive maintenance operations exposed without friction can lead to accidental data loss, degraded performance, or disruption of later analyses.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The module-level documentation states '纯函数,无副作用' on L011, which means pure functions with no side effects. However, update_position mutates the Position object in place (L152), and buy/sell explicitly mutate the positions dictionary in place as documented and implemented (L340, L409, L373-L381, L447-L455), directly contradicting the stated design principle.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The manifest describes market-data, stock screening, indicators, backtesting, and related analytics features, but it does not mention authentication or account-bound access. This file implements secret retrieval from both process environment and a caller-specified file path, which is a broader capability than the stated all-in-one stock analysis functionality itself justifies.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The top-level docstring is entirely in Chinese and presents the module description only in that language, with no indication that users can choose another language or that the locale is intentionally restricted. Under the stated policy, imposing a specific language without opt-in is a natural-language locale policy concern.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/data_fetcher.py (reported line 27)May include surrounding context.

python
from sqlalchemy import create_engine, text, Engine

from typing import List, Optional
from define import BASE_URL, HTTP_TIMEOUT, DB_PATH, StockBasic, DailyKline, HourKline, WeeklyKline, MonthlyKline, DailyBasic, Income, StockLimit, DailyLimitList, DailyBombList, SectorStockMap, TopList, TopInst, SectorFlowDaily, IndexBasic, IndexDaily, IndexWeekly, IndexMonthly
import utils
from logger import log
import config

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/data_fetcher.py (reported line 1127)May include surrounding context.

python
from sqlalchemy import create_engine, text, Engine

from typing import List, Optional
from define import BASE_URL, HTTP_TIMEOUT, DB_PATH, StockBasic, DailyKline, HourKline, WeeklyKline, MonthlyKline, DailyBasic, Income, StockLimit, DailyLimitList, DailyBombList, SectorStockMap, TopList, TopInst, SectorFlowDaily, IndexBasic, IndexDaily, IndexWeekly, IndexMonthly
import utils
from logger import log
import config

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/data_fetcher.py (reported line 1129)May include surrounding context.

python
from sqlalchemy import create_engine, text, Engine

from typing import List, Optional
from define import BASE_URL, HTTP_TIMEOUT, DB_PATH, StockBasic, DailyKline, HourKline, WeeklyKline, MonthlyKline, DailyBasic, Income, StockLimit, DailyLimitList, DailyBombList, SectorStockMap, TopList, TopInst, SectorFlowDaily, IndexBasic, IndexDaily, IndexWeekly, IndexMonthly
import utils
from logger import log
import config

Static analysis

No suspicious patterns detected.