Back to skill

Security audit

trading-log

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed local trading journal that saves plaintext trade records and can fetch live quotes, with no hidden exfiltration or privilege behavior found.

Install only if you are comfortable storing trading history in a plaintext Desktop JSON file and sending stock symbols to Tencent for live quotes. Use explicit commands and review entries carefully, because malformed transactions or the clear-position command can permanently distort the local profit/loss record.

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 (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/trading_log.py:41
Finding

Insufficient transaction validation permits persistent financial-record corruption

Content
View full analysis
0 else 0 pos["direction"] = "买入" elif direction == "卖出": pnl = (float(price) - pos["avg_cost"]) * float(quantity) pos["realized_pnl"] += pnl pos["shares"] -= float(quantity) pos["sell_record"].append({ "date": today, "price": float(price), "quantity": float(quantity), "pnl": pnl }) if pos["shares"] <= 0: pos["shares"] = 0 pos["avg_cost"] = 0 pos["direction"] = "已清仓" else: pos["direction"] = "买入" ``` The command-line validation only checks whether the parsed values are numerically zero: ```python if cmd == '买入': code = args[1].zfill(6) if len(args) > 1 else '' price = float(args[2]) if len(args) > 2 else 0 quantity = float(args[3]) if len(args) > 3 else 0 reason = args ...[truncated 4672 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
Findings (7)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill documentation advertises capabilities that write persistent files and fetch live market data over the network, but it declares no explicit tool scope or permission boundaries. That creates an authorization gap where an agent may invoke file-write or network behavior without clear least-privilege constraints or user-visible consent, increasing the chance of unintended data retention or external requests.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger phrases are broad enough to match common conversational language like buying, selling, recording, positions, or losses, which can cause the skill to activate when the user did not intend to log a trade. In this skill's context, accidental activation is more dangerous because it can permanently write financial records and potentially initiate live quote retrieval based on ambiguous natural language.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill notes that records are permanently saved, but it does not present a clear up-front warning in the description or trigger flow that using the skill will write and retain sensitive trading history. In a financial context, silent persistence of transaction data can expose private investment behavior, account patterns, and timestamps, especially if the desktop file is shared, synced, or insufficiently protected.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The script stores sensitive trading history and position data in a predictable plaintext JSON file under a desktop path, with no access controls, encryption, or warning to the user. On a shared machine or compromised user account, this can expose portfolio holdings, trade timing, and strategy notes, which are financially sensitive.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The live-price feature sends portfolio stock codes to an external Tencent quote service without explicit disclosure or consent. Even though only identifiers are transmitted, the set of queried symbols can reveal a user's holdings or watchlist, which is sensitive in a trading-log skill where privacy expectations are higher.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The natural-language interface, usage instructions, and command vocabulary are all fixed in Chinese, and the skill provides no option to select another language or locale. This can violate language/locale policy when a skill forces a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The manifest describes recording buy/sell trades, checking positions, calculating profit/loss, and refreshing live quotes. The CLI additionally implements '清仓' and '修改名称', which are portfolio-maintenance operations not mentioned in the skill description or trigger context.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.