Back to skill

Security audit

Fubon Cli

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent Fubon trading CLI helper, but it handles brokerage credentials and live trading with under-scoped safety controls.

Review before installing. Use this only in an isolated, non-admin environment, pin and verify the exact `fubon-cli` version, avoid putting brokerage passwords or API keys directly in chat or command-line arguments, and require explicit confirmation of account, symbol, quantity, price, and action before any live order is submitted.

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

T08 · Insecure Dependencies

Error
Location
SKILL.md:27
Finding
Unpinned Third-Party Trading Package Installation## Vulnerability Details **File Location**: `SKILL.md`, lines 27-34 **Vulnerability Type**: Unpinned and unverified third-party dependency **Risk Level**: High ### Vulnerable Code ```bash ## Preconditions 1. Install platform wheel for `fubon_neo`. 2. Install `fubon-cli`. 3. Ensure certificate files and account credentials are available. Example: ```bash pip install ./wheels/fubon_neo-2.2.8-cp37-abi3-win_amd64.whl pip install fubon-cli ``` ``` ### Technical Analysis The instructions install `fubon-cli` from the configured Python package index without specifying an exact version, package hash, trusted repository, or signature-verification procedure. Consequently, the code installed at different times may not be the same code that was reviewed. This conflicts with the document's later claim that the Skill is version-bound to the CLI package because the installation command does not technically enforce that binding. The package is especially sensitive because it is expected to receive brokerage credentials, access account information, and execute real-money trades. This finding does not establish that the current `fubon-cli` package is malicious. The vulnerability is the absence of controls that ensure an agent installs a specifically reviewed and authentic release. ### Attack Path 1. An attacker compromises the relevant package-distribution account, repository, release pipeline, or configured Python package index. 2. The attacker publishes a malicious or backdoored release under the package name expected by the Skill. 3. A user or agent follows the documented `pip install fubon-cli` instruction. 4. `pip` resolves and installs the attacker-controlled release because no version or hash is required. 5. The malicious dependency executes during installation or later CLI invocation. 6. It can attempt to capture credentials, read accessible certificate material and account data, alter displayed trading results ...[truncated 796 chars]
Remediation
## Remediation Suggestions 1. Pin `fubon-cli` to a specifically reviewed version, such as `fubon-cli==X.Y.Z`. 2. Distribute a hash-locked requirements file and install with hash enforcement: ```bash python -m pip install --require-hashes -r requirements.txt ``` 3. Specify and authenticate the trusted package repository rather than relying on an ambient `pip` configuration. 4. Verify package signatures or provenance attestations where supported. 5. Generate and retain a software bill of materials for every released Skill bundle. 6. Validate that the installed package version matches the Skill manifest before permitting login or trading commands. 7. Run installation and trading automation without administrator or root privileges and in an isolated environment. 8. Review and lock transitive dependencies, not only the direct `fubon-cli` dependency.

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:42
Finding
Brokerage Credentials Exposed Through Command-Line Arguments## Vulnerability Details **File Location**: `SKILL.md`, lines 42-43; repeated at line 56 **Vulnerability Type**: Plaintext sensitive data in process arguments **Risk Level**: High ### Vulnerable Code ```bash fubon login --id <ID> --password <PW> --cert-path <PATH> --cert-password <CERT_PW> fubon login --id <ID> --api-key <API_KEY> --cert-path <PATH> --cert-password <CERT_PW> ``` The password-based form is repeated in the authentication command map: ```bash fubon login --id <ID> --password <PW> --cert-path <PATH> [--cert-password <PW>] ``` ### Technical Analysis The documented login workflow passes the brokerage password, API key, and certificate password as command-line arguments. Process arguments are not an appropriate secret-transport mechanism because they may be recorded or exposed through: - Shell history and terminal session recording. - Process inspection facilities while the command is running. - Agent tool-call traces, debugging output, telemetry, or audit logs. - Job schedulers, shell wrappers, and command-execution error reports. - Process accounting or monitoring software. The Skill states that raw credentials must not be exposed in logs or chat output, but its primary login examples encourage a mechanism that can place those credentials directly into execution traces and operating-system process metadata. Exploitability through process inspection depends on the host operating system and its process-access controls. Shell-history and automation-log exposure can occur independently of cross-user process inspection. ### Attack Path 1. A user supplies genuine brokerage credentials to an agent following the documented workflow. 2. The agent constructs a login command containing the password, API key, or certificate password as literal command-line arguments. 3. The command is stored in shell history, an agent transcript, ...[truncated 1349 chars]
Remediation
## Remediation Suggestions 1. Remove password, API-key, and certificate-password values from command-line arguments. 2. Make the CLI read secrets through a non-echoing interactive prompt or a protected operating-system credential store. 3. For automation, use a dedicated secret manager and pass secrets through a protected channel such as a restricted file descriptor or standard input, provided the CLI prevents accidental logging. 4. If environment variables must be supported, document their process-inheritance and diagnostic-dump risks and clear them immediately after use. Do not treat them as universally confidential. 5. Ensure the CLI redacts credentials from exceptions, debug logs, telemetry, command previews, and agent tool-call output. 6. Disable shell-history persistence for sensitive migration workflows and remove any previously recorded commands containing secrets. 7. Apply restrictive permissions to certificate files and avoid printing their contents or passwords. 8. Rotate any credential that has already been used in the documented command-line form when command history or execution logs may have been retained. 9. Add automated tests that verify secret values never appear in process output, logs, traces, or structured error responses.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (3)

Ae1

High
Category
analysis-evasion
Content
a successful package release so the skill metadata (`skill.manifest.json`) and `SKILL.md` match the released package.
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Vague Triggers

Medium
Confidence
95% confidence
Finding
The trigger text is broad enough to capture generic trading, automation, JSON workflow, and natural-language finance requests, which can cause the agent to invoke a live-trading skill in situations where the user did not clearly request Fubon-specific execution. In this context, over-triggering is especially dangerous because the skill exposes authentication, account access, and order-placement operations, so mistaken activation could lead to credential collection prompts or unintended trading actions.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The skill documents commands that accept passwords, API keys, certificate paths, and can place live orders, but it does not prominently warn users about the sensitivity of credentials or the financial risk of executing real trades. In a trading skill, that omission materially increases the chance that users expose secrets in chat or that an agent proceeds with live order flows without sufficiently explicit, risk-aware confirmation.

Static analysis

No suspicious patterns detected.