Back to skill

Security audit

LongPort Quant Trader

Security checks for vulnerabilities and agentic risk

Overview

The skill is a real automated trading package, but it includes high-impact broker trading authority plus exposed credentials and a hard-coded Feishu notification recipient that users should review before installing.

Do not use this with a real brokerage account until the bundled credentials are removed and rotated, Feishu recipients are fully user-configured, dependency versions are pinned, and live order execution is gated by explicit paper-trading tests, position limits, and a kill switch. Treat the existing package as requiring manual security review before installation.

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

T09 · Insecure Skill Coding Practices

Error
Location
config.json:10
Finding

Plaintext Longport Broker Credentials Stored in a Tracked Configuration File

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
qqq_monitor_push.py:23
Finding

Hard-Coded Feishu Application Secret and Fixed Message Recipient

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:32
Finding

Unpinned Third-Party Python Dependency Installation

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • 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 (218)

Tainted flow: 'payload' from os.getenv (line 21, credential/environment) → httpx.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · get_openid_and_send.py (reported line 22)May include surrounding context.

python
"""获取应用身份访问令牌"""
    url = f"{BASE_URL}/auth/v3/tenant_access_token/internal"
    payload = {"app_id": APP_ID, "app_secret": APP_SECRET}
    response = httpx.post(url, json=payload, timeout=10)
    result = response.json()
    if result.get("code") == 0:
        return result.get("tenant_access_token")

Tainted flow: 'payload' from os.getenv (line 21, credential/environment) → httpx.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · get_openid_and_send.py (reported line 48)May include surrounding context.

python
"msg_type": "interactive",
        "content": content
    }
    response = httpx.post(url, headers=headers, json=payload, timeout=10)
    result = response.json()
    return result

Tainted flow: 'payload' from os.getenv (line 93, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · lianghui_monitor.py (reported line 97)May include surrounding context.

python
"app_id": FEISHU_APP_ID,
        "app_secret": FEISHU_APP_SECRET
    }
    response = requests.post(url, json=payload)
    data = response.json()
    if data.get("code") == 0:
        return data.get("tenant_access_token")

Tainted flow: 'payload' from os.getenv (line 122, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · lianghui_monitor.py (reported line 128)May include surrounding context.

python
"content": json.dumps(message_content)  # content 字段需要是 JSON 字符串
        }
        
        response = requests.post(url, headers=headers, json=payload)
        result = response.json()
        
        if result.get("code") == 0:

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The README markets fully automated stock trading, stop-loss/take-profit, and 5-minute monitoring without any visible warning about financial risk, market volatility, execution failure, or the possibility of losing user funds. In the context of a retail-investor trading skill, this omission can mislead users into overtrusting the automation and deploying it on live assets without understanding the risks.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SETUP_GUIDE.md (reported line 20)May include surrounding context.

md
5. 创建后获得三个密钥:
   - `App Key`
   - `App Secret`
   - `Access Token`

### 1.3 配置环境变量

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · qqq_monitor_push.py (reported line 45)May include surrounding context.

python
5. 创建后获得三个密钥:
   - `App Key`
   - `App Secret`
   - `Access Token`

### 1.3 配置环境变量

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

source ~/.zshrc

text

**方法 3: 使用 .env 文件**
在项目目录创建 `.env` 文件:

LONGPORT_APP_KEY=your_app_key_here

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SETUP_GUIDE.md (reported line 86)May include surrounding context.

source ~/.zshrc

text

**方法 3: 使用 .env 文件**
在项目目录创建 `.env` 文件:

LONGPORT_APP_KEY=your_app_key_here

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The documentation advertises an automated Longbridge quant trading system with live HK/US trading, 5-minute monitoring, stop-loss/take-profit handling, Feishu notifications, and performance tracking, while the analyzed behavior is reported as materially different or incomplete. In a financial automation context, this mismatch is dangerous because users may trust the skill to place, limit, or exit trades safely when those controls may not exist, causing financial loss, unintended orders, or unsafe deployment with real credentials.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The documentation advertises an automated Longbridge quant trading system with live HK/US trading, 5-minute monitoring, stop-loss/take-profit handling, Feishu notifications, and performance tracking, while the analyzed behavior is reported as materially different or incomplete. In a financial automation context, this mismatch is dangerous because users may trust the skill to place, limit, or exit trades safely when those controls may not exist, causing financial loss, unintended orders, or unsafe deployment with real credentials.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The documentation advertises an automated Longbridge quant trading system with live HK/US trading, 5-minute monitoring, stop-loss/take-profit handling, Feishu notifications, and performance tracking, while the analyzed behavior is reported as materially different or incomplete. In a financial automation context, this mismatch is dangerous because users may trust the skill to place, limit, or exit trades safely when those controls may not exist, causing financial loss, unintended orders, or unsafe deployment with real credentials.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The documentation advertises an automated Longbridge quant trading system with live HK/US trading, 5-minute monitoring, stop-loss/take-profit handling, Feishu notifications, and performance tracking, while the analyzed behavior is reported as materially different or incomplete. In a financial automation context, this mismatch is dangerous because users may trust the skill to place, limit, or exit trades safely when those controls may not exist, causing financial loss, unintended orders, or unsafe deployment with real credentials.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The documentation advertises an automated Longbridge quant trading system with live HK/US trading, 5-minute monitoring, stop-loss/take-profit handling, Feishu notifications, and performance tracking, while the analyzed behavior is reported as materially different or incomplete. In a financial automation context, this mismatch is dangerous because users may trust the skill to place, limit, or exit trades safely when those controls may not exist, causing financial loss, unintended orders, or unsafe deployment with real credentials.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The documentation advertises an automated Longbridge quant trading system with live HK/US trading, 5-minute monitoring, stop-loss/take-profit handling, Feishu notifications, and performance tracking, while the analyzed behavior is reported as materially different or incomplete. In a financial automation context, this mismatch is dangerous because users may trust the skill to place, limit, or exit trades safely when those controls may not exist, causing financial loss, unintended orders, or unsafe deployment with real credentials.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The documentation advertises an automated Longbridge quant trading system with live HK/US trading, 5-minute monitoring, stop-loss/take-profit handling, Feishu notifications, and performance tracking, while the analyzed behavior is reported as materially different or incomplete. In a financial automation context, this mismatch is dangerous because users may trust the skill to place, limit, or exit trades safely when those controls may not exist, causing financial loss, unintended orders, or unsafe deployment with real credentials.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The documentation advertises an automated Longbridge quant trading system with live HK/US trading, 5-minute monitoring, stop-loss/take-profit handling, Feishu notifications, and performance tracking, while the analyzed behavior is reported as materially different or incomplete. In a financial automation context, this mismatch is dangerous because users may trust the skill to place, limit, or exit trades safely when those controls may not exist, causing financial loss, unintended orders, or unsafe deployment with real credentials.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The documentation advertises an automated Longbridge quant trading system with live HK/US trading, 5-minute monitoring, stop-loss/take-profit handling, Feishu notifications, and performance tracking, while the analyzed behavior is reported as materially different or incomplete. In a financial automation context, this mismatch is dangerous because users may trust the skill to place, limit, or exit trades safely when those controls may not exist, causing financial loss, unintended orders, or unsafe deployment with real credentials.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The documentation advertises an automated Longbridge quant trading system with live HK/US trading, 5-minute monitoring, stop-loss/take-profit handling, Feishu notifications, and performance tracking, while the analyzed behavior is reported as materially different or incomplete. In a financial automation context, this mismatch is dangerous because users may trust the skill to place, limit, or exit trades safely when those controls may not exist, causing financial loss, unintended orders, or unsafe deployment with real credentials.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The documentation advertises an automated Longbridge quant trading system with live HK/US trading, 5-minute monitoring, stop-loss/take-profit handling, Feishu notifications, and performance tracking, while the analyzed behavior is reported as materially different or incomplete. In a financial automation context, this mismatch is dangerous because users may trust the skill to place, limit, or exit trades safely when those controls may not exist, causing financial loss, unintended orders, or unsafe deployment with real credentials.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The documentation advertises an automated Longbridge quant trading system with live HK/US trading, 5-minute monitoring, stop-loss/take-profit handling, Feishu notifications, and performance tracking, while the analyzed behavior is reported as materially different or incomplete. In a financial automation context, this mismatch is dangerous because users may trust the skill to place, limit, or exit trades safely when those controls may not exist, causing financial loss, unintended orders, or unsafe deployment with real credentials.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The documentation advertises an automated Longbridge quant trading system with live HK/US trading, 5-minute monitoring, stop-loss/take-profit handling, Feishu notifications, and performance tracking, while the analyzed behavior is reported as materially different or incomplete. In a financial automation context, this mismatch is dangerous because users may trust the skill to place, limit, or exit trades safely when those controls may not exist, causing financial loss, unintended orders, or unsafe deployment with real credentials.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The documentation advertises an automated Longbridge quant trading system with live HK/US trading, 5-minute monitoring, stop-loss/take-profit handling, Feishu notifications, and performance tracking, while the analyzed behavior is reported as materially different or incomplete. In a financial automation context, this mismatch is dangerous because users may trust the skill to place, limit, or exit trades safely when those controls may not exist, causing financial loss, unintended orders, or unsafe deployment with real credentials.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The documentation advertises an automated Longbridge quant trading system with live HK/US trading, 5-minute monitoring, stop-loss/take-profit handling, Feishu notifications, and performance tracking, while the analyzed behavior is reported as materially different or incomplete. In a financial automation context, this mismatch is dangerous because users may trust the skill to place, limit, or exit trades safely when those controls may not exist, causing financial loss, unintended orders, or unsafe deployment with real credentials.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The documentation advertises an automated Longbridge quant trading system with live HK/US trading, 5-minute monitoring, stop-loss/take-profit handling, Feishu notifications, and performance tracking, while the analyzed behavior is reported as materially different or incomplete. In a financial automation context, this mismatch is dangerous because users may trust the skill to place, limit, or exit trades safely when those controls may not exist, causing financial loss, unintended orders, or unsafe deployment with real credentials.

Content

No source excerpt is available for this finding.