Back to skill

Security audit

VN Stock Scanner

Security checks for vulnerabilities and agentic risk

Overview

This Vietnam stock skill is purpose-aligned, but it uses unsafe command execution patterns and disables TLS checks for financial data sources.

Review before installing. The skill does not appear malicious, but it should be fixed to run the scanner with structured arguments, validate ticker and keyword inputs, use package-relative paths, and remove verify=False before relying on its financial data. Treat its returned news and metrics as untrusted until TLS verification is restored.

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

Error
Location
SKILL.md:12
Finding

Shell Command Injection Through User-Controlled Command Arguments

Content
View full analysis
``` - Dùng thông tin trả về (P/E, P/B, EPS, Tỷ suất cổ tức...) để trả lời user và đưa ra nhận định ngắn gọn. ## 2. Quét tin tức và tin đồn (News & Rumor Scanner) Khi user hỏi "Có tin tức chứng khoán gì hot không?", "Tìm tin đồn", "Chủ tịch đăng ký mua bán": - Nhận diện từ khóa user quan tâm (`keywords`). Nếu user muốn tin chung chung thì bỏ trống. Nếu user muốn tin về mua/bán nội bộ, thì truyền `keywords="mua,bán,chủ tịch,đăng ký"`. - Sử dụng tool `exec` gọi lệnh: ```bash python3 /home/hoang/.openclaw/workspace/vn-stock-scanner/scripts/scanner.py news --keywords "" ``` ``` ### Technical Analysis The Skill directs the Agent to extract ticker symbols or keywords from user input and interpolate them into shell command templates executed through `exec`. The ticker placeholder is entirely unquoted. Consequently, shell operators, command separators, substitutions, redirections, and additional arguments may be interpreted by the shell rather than passed literally to `scanner.py`. The keyword placeholder is enclosed in double quotes, but this does not provide a security boundary. An attacker can include a double quote to terminate the quoted argument and then append shell syntax. The instructions do not require allowlist validation, escaping, or invocation through a non-shell argument array. Although `argparse` safely processes arguments after Python starts, it cannot protect against commands interpreted by the shell before `scanner.py` is launched. ### Attack Path 1. An attacker submits a stock-analysis or news reque ...[truncated 1482 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/scanner.py:6
Finding

TLS Certificate Verification Disabled for External Data Sources

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (6)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill instructs the agent to use an exec tool to run a local Python script that fetches stock/news data, which implies code execution and likely network access, but the manifest does not declare any explicit tool scope or allowed tools. This creates an authorization and review gap: the skill appears less privileged than it actually is, making it easier to deploy or invoke with capabilities that were not clearly documented or constrained.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

All user-facing natural-language instructions are written as if the skill operates only in Vietnamese, and the description frames it as a Vietnam-stock expert without stating whether language choice is optional. Under the policy, forcing a specific language or locale without user opt-in is a natural-language policy concern unless the constraint is explicitly documented and justified.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The trigger phrases for launching the news scan are very broad, such as generic requests for hot stock news, and the skill also allows empty keywords for general news. In a shared agent environment, this can cause the skill to activate on ordinary market conversation and automatically invoke external data collection or code execution when the user may only want discussion, increasing unintended tool use and data exposure.

Content

No source excerpt is available for this finding.

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
99% confidence
Finding

The request to CafeF explicitly disables TLS certificate verification with verify=False and globally suppresses the resulting warnings. This allows a man-in-the-middle attacker on the network path to intercept or modify the RSS feed, causing the skill to return spoofed stock news and links that could mislead users or support phishing/social-engineering outcomes.

Content

Scanner excerpt · scripts/scanner.py (reported line 14)May include surrounding context.

python
url = "https://cafef.vn/tin-tuc-su-kien.rss"
    try:
        headers = {"User-Agent": "Mozilla/5.0"}
        resp = requests.get(url, headers=headers, timeout=10, verify=False)
        root = ET.fromstring(resp.content)
        
        results = []

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
99% confidence
Finding

The TCBS API call also disables TLS certificate verification, making the returned ticker overview data vulnerable to interception or tampering by an attacker on the network path. In this skill's stock-analysis context, manipulated financial metrics such as P/E, P/B, EPS, or market cap could directly influence user investment decisions, increasing the practical risk of integrity attacks.

Content

Scanner excerpt · scripts/scanner.py (reported line 42)May include surrounding context.

python
url = f"https://apipubaws.tcbs.com.vn/tcanalysis/v1/ticker/{ticker.upper()}/overview"
    try:
        headers = {"User-Agent": "Mozilla/5.0"}
        resp = requests.get(url, headers=headers, timeout=5, verify=False)
        if resp.status_code == 200:
            data = resp.json()

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

Natural-language strings throughout the file, including docstrings, CLI descriptions, help text, and error messages, are exclusively in Vietnamese. This can violate language/locale policy when a skill forces a specific language without user opt-in or clear justification.

Content

No source excerpt is available for this finding.