Back to skill

Security audit

Skill

Security checks for vulnerabilities and agentic risk

Overview

InvestorClaw is a coherent local portfolio-analysis skill, but it exposes sensitive unauthenticated management surfaces and has install/runtime weaknesses users should review before installing.

Install only on a personal machine unless you add your own authentication and network controls. Prefer the bundled compose.yml over any curl-from-main install path, keep ports bound to loopback, do not expose the dashboard/MCP ports remotely without an auth proxy, and avoid leaving the service running while browsing untrusted sites. Treat provider keys and uploaded portfolio files as sensitive, and rotate keys if you suspect any local endpoint was reachable by another user, browser page, or container.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
Findings (5)

T09 · Insecure Skill Coding Practices

Error
Location
bridge/investorclaw_bridge/serve.py:120
Finding

Unauthenticated sensitive management interfaces lack CSRF and remote-access safeguards

Content
View full analysis
RedirectResponse: form = await request.form() name = (form.get("key_name") or "").strip() value = (form.get("key_value") or "").strip() if not name or not value: return RedirectResponse( url="/dashboard/settings?message=Missing+name+or+value", status_code=303, ) import inspect as _inspect result = set_key(name, value) if _inspect.iscoroutine(result): result = await result ``` ```python @app.post("/dashboard/upload", include_in_schema=False) async def upload_portfolio(request: Request) -> RedirectResponse: """Multipart upload — write to /data/portfolios/, then trigger setup.""" from urllib.parse import quote try: form = await request.form() except Exception as e: return RedirectResponse( url=f"/dashboard/settings?message={quote('Upload parse failed: ' + str(e))}", status_code=303, ) ``` ```python ...[truncated 2964 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
bridge/investorclaw_bridge/setup_api.py:129
Finding

Multiline API-key values can inject arbitrary entries into the persisted environment file

Content
View full analysis
None: """Merge updates into /data/keys.env. Empty values delete the key. Sets file mode 0600 after write.""" PORTFOLIO_DIR.parent.mkdir(parents=True, exist_ok=True) existing = _read_existing_keys() for name, value in updates.items(): if not _VALID_KEY_NAME.match(name): continue if value: existing[name] = value else: existing.pop(name, None) lines = ["# InvestorClaw v4.0 keys.env — managed by /setup", ""] for name in sorted(existing.keys()): lines.append(f"{name}={existing[name]}") lines.append("") old_umask = os.umask(0o077) try: KEYS_FILE.write_text("\n".join(lines)) finally: os.umask(old_umask) KEYS_FILE.chmod(0o600) ``` ```python for lineno, raw in enumerate(keys_env.read_text().splitlines(), start=1): line = raw.strip() if not line or line.startswith("#"): continue m = _ENV_LINE.match(line) if not m: logger.warning( "keys.load.skip_unmatched_line", path=str(keys_env), lineno=lineno ) continue key, value = m.group(1), m.group(2) if (value.startswith('"') and value.endswith('"')) or ( value.startswith("'") and value.endswith("'") ): value = value[1:-1] keys[key] = value ...[truncated 3195 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
bridge/investorclaw_bridge/setup_api.py:326
Finding

Portfolio upload endpoints allow unbounded in-memory and persistent-storage consumption

Content
View full analysis
RedirectResponse: form = await request.form() upload = form.get("portfolio_file") if upload is None or not getattr(upload, "filename", ""): return RedirectResponse( url="/dashboard/settings?message=No+file+selected", status_code=303, ) raw_name = os.path.basename(upload.filename) safe_name = "".join(c for c in raw_name if c.isalnum() or c in "._-") or "portfolio.upload" if len(safe_name) > 200: safe_name = safe_name[-200:] pdir = pathlib.Path(os.environ.get("IC_PORTFOLIO_DIR", "/data/portfolios")) pdir.mkdir(parents=True, exist_ok=True) dest = pdir / safe_name content = await upload.read() dest.write_bytes(content) try: dest.chmod(0o644) except OSError: pass ``` ### Technical Analysis Both endpoints call `await upload.read()` without specifying a maximum size or streami ...[truncated 1890 chars]
Remediation
View remediation

T03 · Remote Payload Retrieval and Execution

Warning
Location
agent-skills/claude-code/INSTALL.md:42
Finding

Installation instructions retrieve a mutable remote deployment specification and execute its selected containers

Content
View full analysis
~/.investorclaw/compose.yml cd ~/.investorclaw docker compose up -d ``` The plugin manifest repeats the same workflow: ```json "postInstall": { "// TODO: confirm postInstall field name and message-rendering convention": null, "message": "InvestorClaw plugin installed. To finish setup, run:\n\n mkdir -p ~/.investorclaw\n curl -sSL https://raw.githubusercontent.com/ncz-os/mnemos-ic-runtime/main/compose.yml > ~/.investorclaw/compose.yml\n cd ~/.investorclaw && docker compose up -d\n\nThen open http://localhost:18092 to upload a portfolio. See INSTALL.md for full details." } ``` ### Technical Analysis The instructions retrieve `compose.yml` from the mutable `main` branch and immediately use it as a Docker deployment specification. Although this is not a literal `curl | bash` pipeline, a Compose file is executable deployment configuration: it controls image selection, entrypoints, commands, host mounts, ports, environment variables, capabilities, and privilege settings. The remote repository namespace also differs from the primary project homepage and current image organization, which makes provenance harder for users to verify. No commit pin, checksum, signature, or manual review step is required. Consequently, the effective code and privileges used during installation may change after this Skill package has been audited. ### Attack Path 1. An attacker compromises the remote repository, its `main` branch, or an account authorized to modify it. 2. The attacker changes `compose.yml` to select a malicious image, add dangerous host mounts, change comma ...[truncated 1133 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
bridge/pyproject.toml:14
Finding

Python dependencies and container images are not immutably pinned

Content
View full analysis
=0.115", "uvicorn[standard]>=0.32", "python-multipart>=0.0.9", "mcp>=1.4", "httpx>=0.28", "sqlalchemy>=2.0", "aiosqlite>=0.20", "pydantic>=2.10", "structlog>=24.4", ] ``` ```yaml services: ic-engine: image: ghcr.io/argonautsystems/ic-engine:4.7.2-cpu container_name: ic-engine restart: unless-stopped ``` ### Technical Analysis All Python dependencies use open-ended lower bounds. No lockfile or hash-locked requirements file is present in the audited project. A future installation may therefore resolve to package versions that were not represented during review or testing. The container image is pinned to a version-like tag but not to an immutable digest. Registry tags can be replaced, whether accidentally or after registry or maintainer compromise. Project metadata also contains inconsistent component versions across the root Skill, Compose file, runtime-specific Skills, and manifests. This makes it difficult to establish which artifact is intended and tested. No dependency-confusion or typosquatting package was confirmed during the audit. The issue is the absence of reproducible, integrity-verified dependency resolution. ### Attack Path 1. A dependency maintainer account, package registry, container registry, or project publishing account is compromised, or a future incompatible release is published. 2. The user rebuilds the bridge or pulls the tagged container image. 3. The package manager resolves an unreviewed version, or the registry serves changed content under the same image tag. 4. The new component executes inside the InvestorClaw environment. 5. It gains access to the bridge process data, network, mounted portfolio directory, configured API keys ...[truncated 662 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
Findings (194)

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

InvestorClaw checks your home directory next.

bash
~/.investorclaw/.env
FINNHUB_KEY=pk_live_xxx
NEWSAPI_KEY=xxx
FRED_API_KEY=xxx

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · CHANGELOG.md (reported line 142)May include surrounding context.

md
names, bond metadata extraction from description strings, guided
    mapping flow)
  - `contract-output.md` — full output spec (directory layout, envelope
    format, compact vs full output rules)
  - `schema-holdings-fields.md` — per-position field reference
    (security_type, is_etf, financial_type, proxy_symbol)
  - `runtime-gemma4-consult.md` — gemma4-consult Ollama setup for the

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · docs/MCP_TOOLS_REFERENCE.md (reported line 502)May include surrounding context.

md
names, bond metadata extraction from description strings, guided
    mapping flow)
  - `contract-output.md` — full output spec (directory layout, envelope
    format, compact vs full output rules)
  - `schema-holdings-fields.md` — per-position field reference
    (security_type, is_etf, financial_type, proxy_symbol)
  - `runtime-gemma4-consult.md` — gemma4-consult Ollama setup for the

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The RFC explicitly proposes one-click writing of agent configuration files, which is a sensitive persistence and tool-registration action outside normal portfolio analysis. If abused or implemented loosely, it could silently add or modify MCP servers across agents, creating durable access paths and expanding the trusted tool surface without sufficiently informed consent.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Secret/API key parsing, env-var resolution, permission checks, and reverse secret mapping are highly sensitive capabilities. Reverse lookup or export-oriented handling of raw secrets increases the chance of accidental disclosure, misuse by agents, or crossing trust boundaries that users did not expect from an analytics skill.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Secret/API key parsing, env-var resolution, permission checks, and reverse secret mapping are highly sensitive capabilities. Reverse lookup or export-oriented handling of raw secrets increases the chance of accidental disclosure, misuse by agents, or crossing trust boundaries that users did not expect from an analytics skill.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Secret/API key parsing, env-var resolution, permission checks, and reverse secret mapping are highly sensitive capabilities. Reverse lookup or export-oriented handling of raw secrets increases the chance of accidental disclosure, misuse by agents, or crossing trust boundaries that users did not expect from an analytics skill.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

Secret/API key parsing, env-var resolution, permission checks, and reverse secret mapping are highly sensitive capabilities. Reverse lookup or export-oriented handling of raw secrets increases the chance of accidental disclosure, misuse by agents, or crossing trust boundaries that users did not expect from an analytics skill.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Secret/API key parsing, env-var resolution, permission checks, and reverse secret mapping are highly sensitive capabilities. Reverse lookup or export-oriented handling of raw secrets increases the chance of accidental disclosure, misuse by agents, or crossing trust boundaries that users did not expect from an analytics skill.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Secret/API key parsing, env-var resolution, permission checks, and reverse secret mapping are highly sensitive capabilities. Reverse lookup or export-oriented handling of raw secrets increases the chance of accidental disclosure, misuse by agents, or crossing trust boundaries that users did not expect from an analytics skill.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Secret/API key parsing, env-var resolution, permission checks, and reverse secret mapping are highly sensitive capabilities. Reverse lookup or export-oriented handling of raw secrets increases the chance of accidental disclosure, misuse by agents, or crossing trust boundaries that users did not expect from an analytics skill.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

Secret/API key parsing, env-var resolution, permission checks, and reverse secret mapping are highly sensitive capabilities. Reverse lookup or export-oriented handling of raw secrets increases the chance of accidental disclosure, misuse by agents, or crossing trust boundaries that users did not expect from an analytics skill.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Secret/API key parsing, env-var resolution, permission checks, and reverse secret mapping are highly sensitive capabilities. Reverse lookup or export-oriented handling of raw secrets increases the chance of accidental disclosure, misuse by agents, or crossing trust boundaries that users did not expect from an analytics skill.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

Secret/API key parsing, env-var resolution, permission checks, and reverse secret mapping are highly sensitive capabilities. Reverse lookup or export-oriented handling of raw secrets increases the chance of accidental disclosure, misuse by agents, or crossing trust boundaries that users did not expect from an analytics skill.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Secret/API key parsing, env-var resolution, permission checks, and reverse secret mapping are highly sensitive capabilities. Reverse lookup or export-oriented handling of raw secrets increases the chance of accidental disclosure, misuse by agents, or crossing trust boundaries that users did not expect from an analytics skill.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Secret/API key parsing, env-var resolution, permission checks, and reverse secret mapping are highly sensitive capabilities. Reverse lookup or export-oriented handling of raw secrets increases the chance of accidental disclosure, misuse by agents, or crossing trust boundaries that users did not expect from an analytics skill.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Secret/API key parsing, env-var resolution, permission checks, and reverse secret mapping are highly sensitive capabilities. Reverse lookup or export-oriented handling of raw secrets increases the chance of accidental disclosure, misuse by agents, or crossing trust boundaries that users did not expect from an analytics skill.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Secret/API key parsing, env-var resolution, permission checks, and reverse secret mapping are highly sensitive capabilities. Reverse lookup or export-oriented handling of raw secrets increases the chance of accidental disclosure, misuse by agents, or crossing trust boundaries that users did not expect from an analytics skill.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Secret/API key parsing, env-var resolution, permission checks, and reverse secret mapping are highly sensitive capabilities. Reverse lookup or export-oriented handling of raw secrets increases the chance of accidental disclosure, misuse by agents, or crossing trust boundaries that users did not expect from an analytics skill.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Secret/API key parsing, env-var resolution, permission checks, and reverse secret mapping are highly sensitive capabilities. Reverse lookup or export-oriented handling of raw secrets increases the chance of accidental disclosure, misuse by agents, or crossing trust boundaries that users did not expect from an analytics skill.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Secret/API key parsing, env-var resolution, permission checks, and reverse secret mapping are highly sensitive capabilities. Reverse lookup or export-oriented handling of raw secrets increases the chance of accidental disclosure, misuse by agents, or crossing trust boundaries that users did not expect from an analytics skill.

Content

No source excerpt is available for this finding.

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

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

bash
# What's configured?
curl -sS -X POST http://127.0.0.1:18090/api/portfolio/keys_status \
  -H 'Content-Type: application/json' -d '{}'
# → {"configured":["FINNHUB_KEY","NEWSAPI_KEY"], "settable":[...], "missing":[...]}

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- Distribution-edge artifacts (this `SKILL.md`, `compose.yml`, `install.yaml`, `agent-skills/**`): **MIT-0** (MIT No Attribution — `LICENSE-MIT-0`). Required fo

MCP Config Access

High
Category
Agent Snooping
Confidence
90% confidence
Finding

Skill accesses MCP server configuration files (mcp.json). MCP configs contain server URLs, authentication tokens, and tool definitions — reading them allows the skill to discover and potentially abuse other tool integrations.

Content

Scanner excerpt · agent-skills/claude-desktop/INSTALL.md (reported line 134)May include surrounding context.

md
## Step 5 — Fully quit and relaunch Claude Desktop

This step is critical. Closing the Claude Desktop window does **not**
reload the MCP config — the app keeps running in the background and
caches the old config.

- **macOS:** right-click the Claude Desktop icon in the Dock and choose

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · agent-skills/hermes/INSTALL.md (reported line 1)May include surrounding context.

md
<!--
SPDX-License-Identifier: MIT-0
Copyright 2026 InvestorClaw Contributors