Back to skill

Security audit

Yaohx Expense Tracker

Security checks for vulnerabilities and agentic risk

Overview

This local expense-tracking skill is purpose-aligned overall, but it has review-worthy risks around deleting financial records without prior confirmation and installing an unpinned OCR dependency.

Review this before installing if you will rely on the local records as your source of truth. Use deletion only after the agent clearly identifies the exact record and asks for confirmation, and install the OCR dependency only in a controlled environment with pinned, trusted packages. Also verify the missing scripts are supplied by the installed package before expecting the skill to work.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:132
Finding

Unpinned Third-Party OCR Dependency Installation

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 132-141
Vulnerability Type: Unpinned third-party dependency installation
Risk Level: Medium

Vulnerable code:

text
"install_hint": "pip install rapidocr-onnxruntime",
markdown
**OCR dependency installation (required for non-multimodal models):**

To use image-based expense recording, run:
```bash
python -m pip install rapidocr-onnxruntime
text

### Technical Analysis

The skill instructs non-multimodal agents to install `rapidocr-onnxruntime` from the Python package index configured in the execution environment. It does not pin an audited version, verify package hashes, use a dependency lockfile, constrain transitive dependencies, or identify a trusted package source.

Python package installation can execute package-controlled build and installation logic. Because the requested package and its dependency graph are mutable, the code ultimately executed may differ from what was reviewed. Exploitation would require compromise of the named package, one of its dependencies, the configured package index, or package resolution through an attacker-controlled index.

The artifact contains only `SKILL.md`; therefore, no bundled implementation was available to provide an independently reviewed or vendored OCR alternative.

### Attack Path

1. A user submits a payment screenshot to an agent that cannot inspect images directly.
2. The agent follows the skill's mandatory OCR setup instruction.
3. The agent executes `python -m pip install rapidocr-onnxruntime`.
4. `pip` resolves the package and transitive dependencies from the environment's configured indexes without version or hash constraints.
5. If a resolved package, dependency, or index has been compromised, attacker-controlled installation or runtime code executes with the privileges of the agent process.
6. The malicious code can access resources available to that process, including t
...[truncated 602 chars]
Remediation
View remediation

Remediation Suggestions

  • Do not automatically install dependencies in response to user content. Require explicit administrator or user approval.
  • Pin rapidocr-onnxruntime and every transitive dependency to reviewed versions in a lockfile.
  • Require cryptographic hashes, such as with pip install --require-hashes -r requirements.txt.
  • Resolve packages only from a trusted, explicitly configured index; disable untrusted supplemental indexes.
  • Prefer a prebuilt, reviewed environment or vendor verified dependency artifacts rather than installing packages during skill execution.
  • Install and run OCR in an isolated, least-privilege environment with restricted filesystem and network access.
  • Add dependency vulnerability and provenance scanning to the release process, and periodically review pinned versions before controlled updates.
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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 (3)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The description says the skill should be used when the user mentions recording an expense, checking spending, or requesting a report, but it does not clearly distinguish explicit requests from casual mentions. Because this skill can create, query, and delete financial records, ambiguous activation increases the risk of unintended processing of private financial information and unintended local data modification.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The description says the skill should be used when the user mentions recording an expense, checking spending, or requesting a report, but it does not clearly distinguish explicit requests from casual mentions. Because this skill can create, query, and delete financial records, ambiguous activation increases the risk of unintended processing of private financial information and unintended local data modification.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill permits deletion of expense records with a direct script call and only says '删除后回复用户确认', which means confirmation happens after the destructive action rather than before it. In a financial-record skill, this creates a real risk of accidental or misinterpreted deletion of user data, and the local-only context does not reduce the integrity risk because local records may be the sole source of truth.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.