Back to skill

Security audit

taxclaw

Security checks for vulnerabilities and agentic risk

Overview

ClawScan rates this skill suspicious with medium confidence because scanners report risky tax calculations and review safeguards, an unconfirmed deletion gate, and an install example that runs a remote script; the scan was partial.

The suspicious verdict means scanners found real weaknesses or undeclared behavior; it does not mean the author is malicious. Before installing, consider whether you trust the reported export and deletion safeguards, and avoid running the remote install command unless you independently verify it. Coverage was incomplete: 94.9% of components were scanned, some analysis was partial, and obfuscated instruction text could not be fully evaluated.

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
src/mcp_server.py
Finding

Agent-accessible deletion relies on instructions rather than an enforced confirmation gate

Content
View full analysis

Impact

An unapproved invocation removes stored extraction results and manually corrected fields. The original source document remains available, but re-ingesting it does not restore manual corrections.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
Findings (37)

External Script Fetching

High
Category
Supply Chain
Confidence
96% confidence
Finding

The installation example pipes a mutable remote script directly into a shell without verifying or reviewing its contents. Compromise of the distribution endpoint could execute attacker-controlled code with the invoking user's permissions, exposing tax files and other accessible credentials; HTTPS alone does not protect against a compromised publisher.

Content

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

md
1. **Local, on this machine (private).** One of four states, each with the exact next step:
   - *Ollama not installed*: get it from <https://ollama.com/download> (macOS app or
     `brew install ollama`; Linux `curl -fsSL https://ollama.com/install.sh | sh`).
     Open a new terminal, or restart your agent, so PATH picks it up.
   - *Installed, server not reachable*: open the Ollama app or run `ollama serve`
     (`OLLAMA_HOST` is respected).

External Model or Provider Selection

High
Category
Excessive Agency
Confidence
90% confidence
Finding

Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

Content

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

would be sent (full page images) and the note that the provider's terms apply. Switching is explicit and recorded:

bash
taxclaw use-cloud anthropic --model claude-haiku-5-5 --accept-privacy

Without --accept-privacy it prints the privacy text and refuses. With it, config gets model_backend, the model, privacy_acknowledged: true,

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
90% confidence
Finding

Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.

Content

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

}

text

**Codex** (`~/.codex/config.toml`; `codex mcp add taxclaw -- /ABS/PATH/taxclaw/bin/taxclaw mcp` writes the command/args, and `tool_timeout_sec` gives local vision models enough time to finish):
```toml
[mcp_servers.taxclaw]
command = "/ABS/PATH/taxclaw/bin/taxclaw"

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
90% confidence
Finding

Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.

Content

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

}

text

**Gemini CLI** (`~/.gemini/settings.json`, or `gemini mcp add -s user taxclaw /ABS/PATH/taxclaw/bin/taxclaw mcp`;
format per the gemini-cli MCP docs):
```json
{

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The core document-processing functionality matches the description, and storage, previews, editing, and accountant-oriented exports are supporting capabilities. However, contact_submit adds a distinct outbound communication capability not covered by the declared purpose. This transmission requires a user-submitted, CSRF-checked form; the supplied code does not show automatic transmission of stored tax documents through that endpoint. Optional cloud extraction is consistent with 'locally by default' and is not itself a mismatch.

Content

No source excerpt is available for this finding.

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 · src/ai.py (reported line 95)May include surrounding context.

python
def with_untrusted_note(prompt: str) -> str:
    if "UNTRUSTED user data" in prompt:
        return prompt
    return f"{UNTRUSTED_NOTE}\n\n{prompt}"

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 · src/doctor.py (reported line 178)May include surrounding context.

python
commands = ["brew install ollama"]
            next_step = (
                f"Install Ollama from {install.get('url', 'https://ollama.com/download')}: on macOS install the app or run "
                f"`brew install ollama`; on Linux run `{install.get('linux', 'curl -fsSL https://ollama.com/install.sh | sh')}`. "
                f"{install.get('path_note', 'Open a new terminal or restart your agent so PATH picks it up.')} "
                "(If Ollama is already installed, a new terminal or an agent restart is what makes PATH see it.)"
            )

External Script Fetching

High
Category
Supply Chain
Confidence
94% confidence
Finding

The recommended Linux installation command pipes a mutable remote script directly into a shell without verifying its contents or authenticity beyond HTTPS. Although the YAML does not execute it automatically, a user following the setup guidance could execute attacker-controlled code if the distribution endpoint is compromised; access to local tax documents makes that consequence particularly serious.

Content

Scanner excerpt · src/model_catalog.yaml (reported line 142)May include surrounding context.

yaml
install:
    url: "https://ollama.com/download"
    macos: ["Install the Ollama app from https://ollama.com/download", "or run: brew install ollama"]
    linux: "curl -fsSL https://ollama.com/install.sh | sh"
    path_note: "After installing, open a new terminal (or restart your agent) so PATH picks up `ollama`, then run `taxclaw doctor` again."
  # Approximate figures for the models the buckets above recommend. Download sizes are from
  # Ollama's library page (https://ollama.com/library/gemma3/tags, 2026-10-20) and are shown

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · tests/mcp_stdio_client.py (reported line 48)May include surrounding context.

python
async def run(server: str, ingest: str | None, expect: dict[str, str]) -> int:
    params = StdioServerParameters(command=server, args=["mcp"], env=dict(os.environ))
    log = lambda msg: print(f"[mcp-client] {msg}", flush=True)  # noqa: E731
    async with stdio_client(params) as (read, write):
        async with ClientSession(read, write) as session:

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
70% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · tests/test_doctor.py (reported line 44)May include surrounding context.

python
self.tmp = Path(tempfile.mkdtemp(prefix="taxclaw-doctor-test-"))
        self.cfg_path = self.tmp / "config" / "config.yaml"
        self.data_dir = self.tmp / "data"
        env = {k: v for k, v in os.environ.items() if k not in _KEY_ENVS}
        env["HOME"] = str(self.tmp)
        patches = [
            mock.patch.dict(os.environ, env, clear=True),

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 · tests/test_doctor.py (reported line 109)May include surrounding context.

python
step = loc["next_step"]
        self.assertIn("https://ollama.com/download", step)
        self.assertIn("brew install ollama", step)
        self.assertIn("curl -fsSL https://ollama.com/install.sh | sh", step)
        self.assertIn("new terminal", step)
        self.assertIn("restart your agent", step)
        self.assertEqual(loc["install"]["url"], "https://ollama.com/download")

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% 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 · CHANGELOG.md (reported line 85)May include surrounding context.

md
y, plus RAM and free-disk warnings. (2) Cloud with your own keys: providers detected by key presence (src/models.py tier 2), best to worst by the catalog's measured data, what would be sent, and the explicit switch `taxclaw use-cloud <backend> [--model M] --accept-privacy`. (3) TaxClaw Cloud (hosted): one "coming soon" line behind `hosted.enabled: false` in the catalog; the pricing text is kept in the catalog and shown only when the flag is on. `taxclaw use-local [--model M]` switches back with no consent. Consent is recorded as `privacy_acknowledged_at` and `cloud_provider` next to `privacy_acknowledged`; switching to local clears it.
- `processed_by` (`backend`, `model`, `provider`, `documents_left_machine`) on every extraction result: CLI `--json`, MCP, `get_document`/`list_documents`, and export metadata (JSON `_taxclaw_notice`, a `# Processed by:` line in CSV and Form 8949 notices, and the stderr/HTTP/MCP notices for 8949 and TXF). Recorded per document in a new `documents.process

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% 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 · README.md (reported line 92)May include surrounding context.

text
   Without `--accept-privacy` it prints the privacy text and refuses. With it, config
   gets `model_backend`, the model, `privacy_acknowledged: true`,
   `privacy_acknowledged_at` (UTC time) and `cloud_provider`. Go back any time, with no
   consent needed and the consent record cleared: `taxclaw use-local [--model gemma3:4b]`.
3. **TaxClaw Cloud (hosted, Public beta).** A remote MCP server at
   `https://mcp.taxclaw.net/mcp` that your agent connects to directly: 10 free pages per

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% 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 · SKILL.md (reported line 42)May include surrounding context.

md
directly; documents go to TaxClaw Cloud and its model providers, not through this skill. Give the URL and pricing from `taxclaw models` / `hosted` (`hosted.url`, `hosted.message`). Never connect or pay for them.
   - **Never choose cloud on the user's behalf.** Do not run `use-cloud`, and do not set `privacy_acknowledged` or edit config for them; that consent is theirs. The MCP server has no tool that does it.
   - **Never run install or pull commands** (`brew install`, the Ollama install script, `ollama pull`) without the user's OK. After they approve and the command finishes, run the doctor again.
   - Run `{baseDir}/bin/taxclaw use-local [--model NAME]` only to switch back to local (no consent needed), when the user asks.

2. **Choose a model (optional).** `{baseDir}/bin/taxclaw models` (add `--json`) lists installed local vision models, cloud models for keys that are present, and Cloudflare Clairic with its setup steps. Keep the local backend unless the user chose cloud in step 1.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% 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 · src/cli.py (reported line 397)May include surrounding context.

python
p_uc.add_argument("--json", action="store_true", help="print JSON")
    p_uc.set_defaults(func=cmd_use_cloud)

    p_ul = sp.add_parser("use-local", help="switch back to local Ollama (no consent needed)")
    p_ul.add_argument("--model", default=None, help="local vision model, e.g. gemma3:4b")
    p_ul.add_argument("--json", action="store_true", help="print JSON")
    p_ul.set_defaults(func=cmd_use_local)

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, file_read, file_write, network, shell.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

The export applies tax-treatment rules rather than only extracting and formatting document values.

Medium
Category
Excessive Agency
Confidence
95% confidence
Finding

The accrued-market-discount adjustment depends on a taxpayer election that the code does not obtain, yet it populates an adjustment and derived gain/loss using one treatment. The review warning reduces the risk, but an accountant-ready CSV can still carry an incorrect tax result into downstream software; routine formatting and wash-sale arithmetic are not themselves vulnerabilities.

Content

No source excerpt is available for this finding.

The generated CSV claims review-flagged rows have blank gain/loss, but the code can populate it.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The CSV notice says review-flagged rows have blank gain/loss, but calculation proceeds whenever numerical inputs are available, including rows with contradictory extracted values or other review reasons. This misrepresents an integrity safeguard and can cause downstream consumers to treat populated results as sufficiently validated for tax-software import.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · src/backends.py (reported line 331)May include surrounding context.

python
@property
    def url(self) -> str:
        return f"https://api.cloudflare.com/client/v4/accounts/{self.cfg.cloudflare_resolved_account_id()}/ai/run/{self.MODEL}"

    def fallback(self) -> Backend:
        fb = normalize_backend(self.cfg.clairic_fallback_backend)

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · tests/test_clairic.py (reported line 166)May include surrounding context.

python
res = be.extract_structured(doc_type="W-2", pages=[(PNG_1PX, "Form W-2 Wage and Tax Statement")])

        req = rec.requests[0]
        self.assertEqual(str(req.url), "https://api.cloudflare.com/client/v4/accounts/acct123/ai/run/@cf/cloudflare/clairic")
        self.assertEqual(req.headers["authorization"], "Bearer test-token-not-real")
        sent = json.loads(req.content)
        self.assertEqual(sent["model"], "clairic")

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · src/config.py (reported line 25)May include surrounding context.

python
OPENAI_COMPAT_PRESETS: dict[str, dict[str, Any]] = {
    "openai": {
        "label": "OpenAI",
        "base_url": "https://api.openai.com/v1",
        "key_envs": ["OPENAI_API_KEY"],
    },
    "openrouter": {

The module records cloud consent despite explicitly claiming that nothing in the module sets consent.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The module documentation at L006-L009 explicitly states that nothing in this module sets consent. However, switch_to_cloud changes the backend and calls record_cloud_consent(cfg) at L403-L404; although the caller must save the configuration, the function directly contradicts that module-level assurance.

Content

No source excerpt is available for this finding.

The doctor describes a configurable remote Ollama endpoint as on-machine processing with documents never leaving the machine.

Medium
Category
Excessive Agency
Confidence
98% confidence
Finding

The code supports non-loopback OLLAMA_HOST endpoints, but describes every non-cloud backend as on-machine processing and promises that documents never leave the machine. A remote Ollama configuration can therefore send tax documents containing SSNs and financial information off-device while the report incorrectly reassures users that processing is private and local.

Content

No source excerpt is available for this finding.

The contact endpoint sends user contact details and messages to an external feedback service, outside the declared tax-document processing purpose.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

In src/main.py, L1462–L1479 package the submitted name, email, subject and message and POST them to a hard-coded Formspree endpoint. Although this requires an explicit contact-form submission and does not automatically send stored tax documents, external feedback collection is unrelated to extracting, reviewing, exporting tax-form data or choosing an extraction model, and is not declared in the manifest.

Content

No source excerpt is available for this finding.

Contact submissions transmit personal information to Formspree without disclosing the third-party recipient.

Medium
Category
Output Handling
Confidence
86% confidence
Finding

The contact handler sends the user's name, email address, and message to formspree.io. Although sending a contact message is expected, this file contains no warning, confirmation, or explanatory comment identifying the external service that receives those details.

Content

No source excerpt is available for this finding.