Back to skill

Security audit

HK IPO Orchestrator

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent HK IPO research workflow skill, with the main caution that it stores local financial decision history in plaintext files that rely on normal filesystem permissions.

Install only if you are comfortable with a local HK IPO research tool that contacts public market-data sites and stores your watchlist, risk preferences, scoring parameters, decisions, notes, and outcomes under ~/.hkipo-next. On shared or managed machines, restrict permissions on that directory and treat exported review files as sensitive financial history.

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
runtime/hkipo-next/src/hkipo_next/storage/review_store.py:438
Finding

Sensitive Financial History Is Stored Without Enforced Filesystem Permissions

Content
View full analysis
sqlite3.Connection: self.path.parent.mkdir(parents=True, exist_ok=True) connection = sqlite3.connect(self.path) connection.row_factory = sqlite3.Row return connection ``` The database can contain sensitive investment outcomes and user-supplied notes: ```python class ReviewActualResult(BaseModel): model_config = ConfigDict(extra="forbid") allocated_lots: int | None = Field(default=None, ge=0) listing_return_pct: float | None = None exit_return_pct: float | None = None realized_pnl_hkd: float | None = None exited_at: datetime | None = None notes: str | None = None ``` Profile persistence similarly uses default permissions: ```python def save(self, profile: StoredProfile) -> None: self.path.parent.mkdir(parents=True, exist_ok=True) self.path.write_text( json.dumps(profile.model_dump(mode="json"), ensure_ascii=False, indent=2), encoding="utf-8", ) ``` ### Technical Analysis The application stores review records in a plaintext SQLite database under `~/.hkipo-next/data/hkipo.db`. These records may include stock symbols, investment decisions, risk profiles, allocated lots, realized profit or loss, exit dates, prediction payloads, and free-form notes. The parent directory is created without an explicit mode, and SQLite creates the database according to the process umask. The code neither sets the database to mode `0600` nor verifies permissions on an existin ...[truncated 1904 chars]
Remediation
View remediation
Vulnerability Patterns
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (139)

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The declared description emphasizes an orchestrator that coordinates the full HK IPO process and decides what step should happen next. The supplied code, however, only defines the package interface by importing and re-exporting many underlying data-fetching, prediction, statistics, and cache functions. While these exports are related to Hong Kong IPO research, the chunk itself does not contain control flow, decision logic, sequencing, trigger handling, or optimization behavior matching the declared orchestration purpose. Its primary purpose is to expose a toolkit/library surface, not to manage an end-to-end workflow.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The description presents this as a high-level orchestrator skill whose main job is to choose the next step across an end-to-end HK IPO research loop. The supplied code does not primarily implement such orchestration logic. Instead, it is a CLI entrypoint that routes commands to many concrete modules and directly performs data fetching, formatting, and analysis for specific commands. While the domain is consistent (Hong Kong IPO research), the behavior is materially broader and different in nature: it acts as a multi-tool CLI for querying and analyzing IPO data, not a workflow coordinator deciding next actions. It also reads a local YAML user profile and relies on various external/data modules despite no declared permissions. Therefore, the declared description does not accurately represent the actual code behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description presents this as a high-level HK IPO workflow coordinator spanning multiple phases such as discovery, snapshot extraction, personalization, scoring, and review optimization. The supplied code does not implement orchestration or decision-making across steps. Instead, it is a focused scraper/adapter for a single external source (AAStocks), using HTTP requests and HTML parsing to collect IPO-related data and return structured dictionaries. While the code is relevant to HK IPO research, its actual role is narrow data acquisition, not end-to-end workflow control. Therefore the description materially overstates and mischaracterizes the implemented behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description says this skill coordinates the end-to-end HK IPO research loop and selects the next step across multiple stages. The supplied code does not implement workflow orchestration, step selection, discovery, snapshot extraction, personalization, scoring, or review optimization. Instead, it is a focused financial data helper for A/H share comparison: it searches for an A-share code, fetches its current price, converts HKD to CNY, and returns a discount percentage. This is a materially different primary purpose and includes undeclared external data-access behavior to Sina and Tencent APIs.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The description presents this as a high-level HK IPO workflow coordinator that can select the next action across multiple stages of a research loop, including discovery, snapshot extraction, personalization, scoring, and review optimization. The supplied code does something much narrower and materially different: it implements an HTTP client and many fetch functions for a specific external data source (aipo.myiqdii.com), plus CLI commands to print/query those datasets. The module gathers raw IPO-related datasets such as margin, ratings, grey market, allotment, IPO brief, cornerstone investors, rankings, and statistics. It does not coordinate other skills, choose next steps, maintain workflow state, personalize outputs, optimize reviews, or perform scoring logic beyond exposing source-provided rating numbers. In fact, the module docstring explicitly states it returns pure data dictionaries and does not do scoring or judgment. Therefore the declared description does not accurately represent the actual code behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description presents an orchestrator for the full HK IPO research loop, responsible for routing across several stages such as discovery, extraction, personalization, scoring, and review optimization. The supplied code does none of that. It is narrowly focused on one function: estimating Hong Kong IPO allotment probabilities using a mathematical model, plus formatting results and exposing a command-line interface. There is no workflow coordination, no stage selection logic, no integration with discovery/snapshot/review components, and no evidence of broader orchestration behavior. This is a material purpose mismatch, not just an implementation detail difference.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description presents a high-level orchestration skill for the full HK IPO research lifecycle. The supplied code does not coordinate multiple workflow stages or make routing decisions; instead, it provides low-level cache utilities and source-specific cache wrappers for IPO data. It interacts with local cache files under ~/.hkipo-cache, supports expiration policies, atomic writes, listing/stats, and clearing caches, and fetches data from etnet/hkex/jisilu for caching purposes. While the domain (HK IPO) is related, the primary purpose is materially different: storage/caching infrastructure rather than end-to-end workflow coordination. The cache deletion and filesystem management behavior is also undeclared.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description presents a high-level orchestration skill spanning multiple stages of an HK IPO research loop: discovery, snapshot extraction, personalization, scoring, and review optimization. The supplied code does not do orchestration or workflow selection at all. Instead, it is a narrowly scoped ET Net data-source module that requests a specific sponsor-performance webpage, parses table rows into SponsorStats records, and exposes helper functions for querying those results. While 'snapshot extraction' could loosely relate to scraping, the code covers only one small data-ingestion component and none of the claimed end-to-end coordination, personalization, scoring, or review optimization behavior. Therefore the description materially overstates and mischaracterizes the actual behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description presents this skill as a high-level orchestrator for the entire HK IPO research loop. The supplied code instead implements a single-source scraper/parser for Futu IPO webpage data and a CLI to print listed IPOs and recent performance. Its primary purpose is data retrieval and formatting for one website, not workflow coordination or step selection. This is a material description-behavior mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description presents a high-level orchestration skill spanning multiple stages of an HK IPO research loop. The supplied code instead implements a specific HKEX API client/parser: it fetches active and listed IPO data from fixed HKEX JSON endpoints, parses records into dataclasses, sorts them, and exposes helper functions for locating prospectus and other documents. While this could support a broader IPO workflow, the code itself does not contain logic for discovery coordination, next-step selection, personalization, scoring, or review optimization. The primary purpose is therefore materially narrower and different from the declared purpose.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description presents an orchestration skill covering the full HK IPO research loop, including discovery, snapshot extraction, personalization, scoring, and review optimization. The supplied code does not perform orchestration or step selection. Instead, it simply retrieves IPO lists and brief details, groups IPOs by deadline, sorts them, and outputs a calendar structure. This is a materially narrower and different primary purpose than the declared end-to-end coordinator, so the description does not accurately represent the code.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description presents a high-level end-to-end HK IPO workflow coordinator that decides what to do next across multiple research stages. The supplied code does not do that. It is a concrete data adapter for one source (Jisilu), performing HTTP fetches, field cleaning/parsing, record normalization, simple lookup/filtering, and CLI output. The module explicitly states it returns raw dictionaries/lists and does not perform scoring or judgment. Therefore the primary purpose is materially different from the declared orchestrator behavior, and it also accesses a specific external resource not implied by the empty declared permissions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The description claims this skill is an orchestration layer for the full HK IPO research loop, responsible for selecting the next step across multiple stages. The supplied code does not do orchestration, routing, step selection, discovery, snapshot extraction, personalization, scoring, or review optimization. Instead, it is a focused data retrieval module for market sentiment: it fetches HSI quote data from Yahoo Finance, scrapes sponsor data from AASTOCKS, optionally falls back to etnet, parses and summarizes sponsor performance, and exposes CLI commands (vhsi, sponsor, sponsor-search). This is a materially different primary purpose. Additionally, the code clearly accesses external network resources, which is inconsistent with the empty declared permissions, though the main mismatch is functional rather than permission-related.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description presents this skill as an orchestration layer for the entire HK IPO research loop. The supplied code does something much narrower and materially different: it calls a single external API endpoint (https://lowrisktradesmart.org/api/ipos), normalizes returned IPO records, provides fuzzy company-name lookup, retrieves entry amounts by share count, and exposes these functions via a CLI. There is no evidence of multi-step workflow coordination, next-step selection, personalization, scoring, review optimization, or broad discovery/snapshot logic. The primary purpose is therefore mismatched, and the code also uses an external network resource not implied by the declared permissions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The declared description promises a substantive orchestration capability for the full HK IPO research loop. However, the supplied code chunk contains only a minimal __main__.py entrypoint that delegates execution to another module's main function. Based on this chunk alone, there is no evidence of discovery, snapshot extraction, personalization, scoring, review optimization, or step-selection logic. This is a materially different primary purpose from the declared behavior, so it should be flagged as a mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description presents a high-level orchestrator for the entire HK IPO process. However, the supplied code chunk is only an init.py file with a brief docstring about external data adapters and no actual logic. Based on this code alone, the implemented behavior does not substantiate the declared orchestration purpose. This is therefore a mismatch between the claimed capability and the provided implementation.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The declared description presents a broad end-to-end HK IPO orchestration skill that chooses the next step across multiple phases of a research loop. The supplied code only implements a thin adapter around legacy discovery functions, specifically fetching a margin list and an IPO brief. This is materially narrower than the declared purpose and lacks the coordination/orchestration behavior and other listed capabilities.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The declared description says this skill orchestrates the full Hong Kong IPO workflow and selects the next step across multiple research stages. The supplied code does not implement workflow coordination, discovery, snapshot extraction, personalization, scoring, or review optimization. Instead, it is a low-level helper for locating a legacy module directory, modifying sys.path, and importing legacy modules lazily with caching. Those behaviors are materially different from the declared primary purpose, so this is a mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The declared description presents a broad end-to-end coordinator for the full HK IPO research loop. The supplied code only implements a thin adapter over legacy snapshot loaders, exposing three data retrieval methods for IPO brief/details and upcoming IPOs. It does not choose next steps, orchestrate a workflow, or implement personalization, scoring, or review optimization. This is a materially different primary purpose, so the description does not accurately represent the code.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description promises a comprehensive orchestration skill for the Hong Kong IPO research loop. However, the provided code chunk is only an init.py docstring for a CLI package and does not implement or demonstrate any of those capabilities. Based on this code alone, the actual behavior is merely module identification for a CLI layer, which is materially different from the declared primary purpose.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The description claims a comprehensive orchestration skill for the HK IPO research loop. However, the provided code chunk is just an init.py file with a docstring and no functional logic. Based on the supplied code alone, there is no evidence of the declared orchestration behavior, resource access, or trigger logic. This is therefore a material description-to-code mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description presents a high-level workflow coordinator spanning multiple HK IPO research stages. The supplied code chunk does not implement that orchestration role. Instead, it is a narrowly scoped command handler for applying review suggestions: it loads runtime paths, instantiates review storage/services, then shows, accepts, or rejects a suggestion by ID, optionally recording a decision note and timestamp. Its outputs are rendered responses and error handling for this review operation. This is a materially different primary purpose from end-to-end workflow coordination, so the description does not accurately represent the code.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The code is focused on executing a specific batch decision-card command, not coordinating the full HK IPO research loop. It loads a profile, parameter version, and symbols/watchlist; invokes batch scoring/decision services backed by snapshot retrieval; renders results; and writes review records to persistent storage. While it touches snapshot extraction, scoring, and review recording, it does not show discovery orchestration, personalization beyond simple profile overrides, or any logic to choose the next step across multiple workflow phases. The persistence of review history is also a concrete capability not reflected in the declared description. Therefore the description materially overstates and mischaracterizes the code’s primary purpose.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The declared description promises a broad workflow coordinator spanning multiple HK IPO research phases and selecting the next step across the full loop. The supplied code only implements a discovery/calendar command: it calls DiscoveryService.discover(), packages the result, renders it in various formats, exports the rendered output, and handles exceptions. There is no evidence of orchestration across other stages like snapshot extraction, personalization, scoring, or review optimization. This is a materially narrower and different primary purpose than declared, so it is a mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

The declared description presents an orchestrator skill for the entire HK IPO research loop, spanning discovery, snapshot extraction, personalization, scoring, and review optimization. The supplied code chunk is much narrower: it handles a decision-card CLI command, loads profile overrides, resolves a parameter version, builds a decision card via scoring/snapshot services for a symbol, saves the response as a review record, and renders output. While the code does touch personalization/profile loading, snapshot/scoring, and review recording, it does not act as a general workflow coordinator or step selector across the full end-to-end loop. Its primary purpose is specific decision-card generation and output handling. Additionally, the code uses SQLite-backed repositories/stores and persists records, whereas the declared permissions are empty, indicating undeclared resource access/write behavior.

Content

No source excerpt is available for this finding.