Back to skill

Security audit

openInvest

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marks this skill suspicious because scanners report missing privacy disclosures before financial information may be sent to an external model, alongside other installation and scope concerns; the evidence is partial and does not establish malicious intent.

Treat the suspicious verdict as a reason to review carefully before installing. Consider whether you are comfortable with investment information being sent to an external model, and check the provider and data handling before using those workflows. The scan was partial: it covered 9 of 11 components, partially inspected 2, and reported degraded tool-misuse analysis, so it does not establish that the skill is safe or unsafe in every respect.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
Findings (22)

Self-Modification

High
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Content

Scanner excerpt · README.md (reported line 44)May include surrounding context.

bash
cd $INVEST_HOME
# 1. Edit SKILL.md / scripts/run.sh / references/*.md
vim skills/invest/SKILL.md
# 2. Test (the symlink is already live; no reinstall needed)
<skill-dir>/scripts/run.sh status

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 · SKILL.md (reported line 49)May include surrounding context.

text
1. Run `run.sh doctor` (no shell access? call the MCP `doctor` tool — same output)   ← mandatory first step
   ├─ status: "ready"        → go to step 2 (keep using this skill). A missing LLM key / mail
   │                          credentials / .env shows up only as `optional_*` checks and never
   │                          flips the status: Coordinator needs no key (only Direct does — see
   │                          `direct_ready`), so do NOT re-onboard for those
   └─ status: "needs_setup"  → memory not initialized (or portfolio.md still the v1 format) →

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 · SKILL.md (reported line 216)May include surrounding context.

md
| Command | Remote-mode behavior |
|------|--------------|
| `doctor` | Returns **hub-perspective** checks + an extra `remote` section (api_base / auth mode / connectivity) |
| `init` | **Disabled** (data lives on the hub; connecting to the hub only needs the two .env lines above). Error includes a hint |
| `live_prices` / `correlate` | Still run **locally** (pure yfinance, touches no data) |
| `run_committee` | Runs on the **hub** (DeepSeek key is on the hub); the CLI polls automatically until done; same-day cache uses the hub's date semantics |
| `prepare/save_committee` | Via hub RPC — the Coordinator protocol (spawn 4 subagents) is **completely unchanged** |

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/tools.md (reported line 120)May include surrounding context.

md
| `POST /api/events/check` | Manually run event_watch once (fetch news + normalize + store + trigger the committee on hits). Synchronous, 30-90s | — |
| `GET /api/config` | View the current effective values of the API-configurable whitelist parameters (+ whether overridden + metadata) | — |
| `PUT /api/config` | Set one whitelist override (persisted to disk, shared across processes, takes precedence over env; ADR-017) | `{key, value}`, e.g. `{"key":"verdict.concentration_lens_enabled","value":false}` |
| `DELETE /api/config/{key}` | Delete an override, reverting to the default | — |

**Typical flow**: the user says "I plan to..." (我打算...) / "just bought X" (刚买了 X) / "my
position in Y grew" (我的持仓多了 Y) → use `POST /api/trades/record` (with intended_date to

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 · scripts/run.sh (reported line 7)May include surrounding context.

sh
# 2026-07 起后端从 PyPI 分发(pypi.org/project/openinvest),本脚本不再
# git clone / uv sync / 自愈更新——那 180 行 bash 全部退役:
#   - 后端代码:uvx 按需拉 openinvest 包(缓存于 uv cache,首跑需网络)
#   - 数据目录:$INVEST_HOME(默认 ~/openInvest),只放 memory/ db/ .env static/
#   - 更新:后端版本固定在下方 SPEC,随插件发版更新;`run.sh update`(= uvx --refresh)只重下这个固定版本,用于修坏掉的缓存
#   - GUI dist 拉取 / 远端模式提示等业务逻辑收进 openinvest-web(Python)
#

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

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

bash
cd $INVEST_HOME
# 1. Edit SKILL.md / scripts/run.sh / references/*.md
vim skills/invest/SKILL.md
# 2. Test (the symlink is already live; no reinstall needed)
<skill-dir>/scripts/run.sh status
# 3. commit + push

The trigger "analyze X" is not restricted to investment-related requests.

Medium
Category
Trigger Abuse
Confidence
90% confidence
Finding

The trigger table explicitly lists "analyze X" without requiring X to be a financial asset or the request to concern investing. This overlaps with ordinary requests to analyze documents, code, or other unrelated subjects and could activate the investment skill unintentionally.

Content

No source excerpt is available for this finding.

MCP server referenced without pinned version: 'uvx openinvest'.

Medium
Category
MCP Rug Pull
Confidence
65% confidence
Finding

uvx/uv tool run commands without ==version create a rug-pull risk.

Content

No source excerpt is available for this finding.

The Direct workflow lacks a privacy warning about sending financial context to an external model provider.

Medium
Category
Output Handling
Confidence
88% confidence
Finding

The Direct path uses an external model API with prepared investment context, but the workflow does not require explaining what financial information leaves the system. Choosing a provider or configuring credentials is not necessarily informed consent to transmit portfolio context, which can reveal sensitive holdings and strategy.

Content

No source excerpt is available for this finding.

MCP server referenced without pinned version: 'uvx openinvest'.

Medium
Category
MCP Rug Pull
Confidence
65% confidence
Finding

uvx/uv tool run commands without ==version create a rug-pull risk.

Content

No source excerpt is available for this finding.

Behavior Manipulation

Medium
Category
Prompt Injection
Confidence
75% confidence
Finding

Subtle instructions detected that may alter agent decision-making or introduce hidden biases.

Content

Scanner excerpt · SKILL.md (reported line 368)May include surrounding context.

md
**always** portfolio cash — this never changes
- **`max_single_invest_cny` ("单次上限") is a per-order cap on the suggested amount — not a daily or
  total allowance, and orders can be split.** When the memo says "金额已按单次上限 … 钳制", the CIO's
  amount was cut to that cap per order. Never tell the user "today's allowance is used up" because of it
- **Dividends / interest / fees / taxes / splits are ledger activities, not trades or deposits**: `record_dividend`
  (cash + gross − tax withheld; `--reinvest` = DRIP), `record_fee` (`--kind tax` for tax), `record_split`
  (`--ratio` = new/old: 10-for-1 → 10, 1-for-10 → 0.1; pass the real ex-date — if later trades were already booked in post-split units it is refused, and `--ledger-only` writes the ledger row without touching units),

The daily-use skill performs first-time onboarding even though its manifest explicitly delegates setup to invest-setup.

Medium
Category
Excessive Agency
Confidence
97% confidence
Finding

The manifest requires switching to the separate invest-setup skill when doctor returns needs_setup. Instead, this document instructs both execution paths to collect onboarding answers and invoke run.sh init --from-stdin, with an executable payload at L064–L078, implementing first-time setup within the daily-use skill.

Content

No source excerpt is available for this finding.

Onboarding sends sensitive financial holdings to an external LLM without requiring a user-facing privacy disclosure.

Medium
Category
Output Handling
Confidence
96% confidence
Finding

The document explicitly says that supplying holdings_description automatically sends it to DeepSeek for parsing when a key is available. It solicits detailed holdings and cash balances without requiring a prior user-facing disclosure or consent for this additional external transmission.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · references/onboarding.md (reported line 109)May include surrounding context.

md
## Q4 details: keys go in `.env`, never in the chat

**Never ask the user to paste an API key or password into the chat, and never put one into a
command you run** — it would land in the transcript and in the model provider's logs. Tell the user
to add the lines they need to `$INVEST_HOME/.env` (default `~/openInvest/.env`; `run.sh doctor`
prints the data directory) with their own editor, or to run `run.sh init` in their own terminal,

Session Persistence

Medium
Category
Rogue Agent
Confidence
80% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/tools.md (reported line 59)May include surrounding context.

md
ding news / committee runs, whether the background scheduler is running. No network, does not mark queues as drained, hides holdings in advisory mode. Plugin hooks inject `--text` at session start so the agent knows a question about a held symbol belongs here | JSON (default) or one paragraph of text |
| `service install\|uninstall\|status` | Operator (optional) | Run the background scheduler (news queue / price sentinel / NAV snapshot / auto-backup) as a user-level service that starts at boot: systemd `--user` on Linux, launchd on macOS (macOS not field-tested). **Not required**: a stdio `openinvest-mcp` starts an embedded scheduler on its own while the host agent runs and stops with it; the service just makes it independent of the host. Only one scheduler runs per data dir (`db/.scheduler.lock`) — the service evicts the embedded one. Rerun `install` after a backend upgrade. Disabled in remote mode (the hub runs it) | JSON `unit_path` / `steps`; `status` → `installed` / `running` (mod

The screenshot-import workflow lacks a privacy warning before sending broker holdings to the backend LLM for parsing.

Medium
Category
Output Handling
Confidence
91% confidence
Finding

The workflow directs the agent to transcribe sensitive brokerage holdings and invoke an LLM-backed import without first disclosing the additional processing destination or obtaining informed approval. Preview mode prevents portfolio writes, but does not prevent disclosure to the configured model provider; financial holdings make this privacy omission consequential.

Content

No source excerpt is available for this finding.

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
60% confidence
Finding

Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.

Content

Scanner excerpt · scripts/run.sh (reported line 68)May include surrounding context.

sh
;;
  update)
    if [ "$DEV_MODE" = "1" ]; then
      echo "⬆️  OPENINVEST_DEV_MODE=1:本地源码模式不走 PyPI refresh;请改完代码后运行 uv sync。" >&2
      cd "$REPO_ROOT"
      export PYTHONPATH="$SRC_ROOT${PYTHONPATH:+:$PYTHONPATH}"
      exec uv run python -m openinvest.cli doctor

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
60% confidence
Finding

Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.

Content

Scanner excerpt · scripts/run.sh (reported line 98)May include surrounding context.

sh
update   更新后端到 PyPI 最新版

开发:
  export OPENINVEST_DEV_MODE=1
          走本地源码 `uv run python -m openinvest.cli ...`,用于验证未发布的改动

完整子命令表:uvx openinvest --help 或 skills/invest/references/tools.md

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
60% confidence
Finding

Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.

Content

Scanner excerpt · scripts/run.sh (reported line 109)May include surrounding context.

sh
if [ "$DEV_MODE" = "1" ]; then
      cd "$REPO_ROOT"
      export PYTHONPATH="$SRC_ROOT${PYTHONPATH:+:$PYTHONPATH}"
      run_with_hint "本地源码模式(OPENINVEST_DEV_MODE=1)没输出任何结果就退出了,原因见 stderr 的报错。常见:依赖没装(先运行 uv sync)。" \
          uv run python -m openinvest.cli "$@"
      exit $?
    fi

MCP server referenced without pinned version: 'uvx openinvest'.

Medium
Category
MCP Rug Pull
Confidence
65% confidence
Finding

uvx/uv tool run commands without ==version create a rug-pull risk.

Content

No source excerpt is available for this finding.

The trigger "analyze X / 分析一下X" does not restrict X to an investment asset.

Low
Category
Trigger Abuse
Confidence
90% confidence
Finding

This explicitly listed trigger also matches everyday requests to analyze documents, code, or other nonfinancial subjects. Although the surrounding description establishes an investment purpose, the trigger itself lacks an asset constraint or exclusions that prevent unintended activation.

Content

No source excerpt is available for this finding.

MCP server dependency without pinned version: 'pip install openbb-mcp-server'.

Low
Category
MCP Rug Pull
Confidence
92% confidence
Finding

The optional OpenBB installation command installs openbb-mcp-server and openbb without version constraints or artifact hashes. Following it can execute a newly compromised release with the agent user's permissions, potentially exposing financial data or credentials; this is a supply-chain exposure, not evidence that either package is malicious.

Content

No source excerpt is available for this finding.