Back to skill

Security audit

Receipt

Security checks for vulnerabilities and agentic risk

Overview

This skill is a local receipt-note logger, but it overstates finance-analysis abilities and stores sensitive financial text in plaintext files and exports without strong safeguards.

Review this carefully before installing. Use it only as a manual local expense journal, not as a receipt scanner, OCR tool, budget calculator, or financial analysis tool. Do not enter sensitive tax, account, or purchase details unless you are comfortable with plaintext files under ~/.local/share/receipt and export files that may be readable or shareable depending on local permissions.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/script.sh:6
Finding

Financial Records Are Created Without Enforced Restrictive Permissions

Content
View full analysis
> "$DATA_DIR/history.log"; } ``` Representative financial-record write: ```bash local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/record.log" local total=$(wc -l < "$DATA_DIR/record.log") echo " [Receipt] record: $input" echo " Saved. Total record entries: $total" ``` ### Technical Analysis The script stores receipt, balance, budget, expense, and tax-related information beneath `~/.local/share/receipt`, but it does not establish a restrictive `umask` or explicitly set secure modes on the directory and generated files. The resulting permissions therefore depend on the invoking process's environment. Under a common `umask` of `022`, `mkdir` can create the data directory with mode `0755`, while shell redirection can create log and export files with mode `0644`. On a multi-user host, these modes may allow other local users to traverse the directory and read the financial records. The issue affects `history.log`, command-specific `.log` files, and generated export files. The script also does not correct permissions on an existing data directory or existing files. ### Attack Path 1. A user runs commands such as `receipt record`, `receipt balance`, or `receipt tax-note`. 2. The script creates the data directory and log files using permissions derived from the current `umask`. 3. If the effective permissions allow access by group members or other users, another local account enumerates `~/.local/share/receipt`. 4. That account reads the logs or exports and obtains the stored financial and tax-related informat ...[truncated 614 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/script.sh:59
Finding

Unescaped Export Values Permit CSV Formula Injection and Invalid JSON Generation

Content
View full analysis
"$out" local first=1 for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) while IFS='|' read -r ts val; do [ $first -eq 1 ] && first=0 || echo "," >> "$out" printf ' {"type":"%s","time":"%s","value":"%s"}' "$name" "$ts" "$val" >> "$out" done < "$f" done echo "" >> "$out" echo "]" >> "$out" ;; csv) echo "type,time,value" > "$out" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) while IFS='|' read -r ts val; do echo "$name,$ts,$val" >> "$out" done < "$f" done ;; ``` ### Technical Analysis Receipt descriptions and other command inputs are attacker-controlled or otherwise untrusted values. The export implementation inserts these values directly into JSON string literals and CSV records without format-specific encoding. For JSON exports, characters such as double quotes, backslashes, control characters, and embedded newlines are not escaped. A crafted value can invalidate the JSON document or alter its apparent structure when consumed by a downstream parser. For CSV exports, commas, quotes, and line breaks are not encoded according to CSV rules. More importantly, values beginning with spreadsheet formula markers such as `=`, `+`, `-`, or `@` may be interpreted as formulas when the export is opened in spreadsheet software. Depending ...[truncated 1841 chars]
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (9)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill markets itself as a receipt scanning, categorization, totaling, balancing, and forecasting toolkit, but the documented behavior is only timestamped note logging plus search/export utilities. This mismatch can cause users or invoking agents to trust the skill with finance workflows it does not actually perform, leading to silent integrity failures, incorrect financial decisions, and unintended exposure of sensitive data through persistent local logs and exports.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill presents itself as a receipt-scanning and expense-processing tool, but the exposed commands and implementation are a generic local logging system. This mismatch is dangerous because users may enter sensitive financial information under false assumptions about processing, minimization, and purpose, while the tool instead stores arbitrary notes locally and expands its effective data collection scope.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

Commands labeled as record, categorize, balance, trend, forecast, and similar finance operations do not perform those actions; they simply append raw user input to log files. This is risky because users may provide confidential receipt or budget data believing it is being analyzed, while the tool silently retains plaintext records instead.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The 'use when' language is broad enough to make an agent select this skill for general budgeting, receipt processing, or financial analysis tasks that it cannot truly perform. In an agentic environment, overbroad routing increases the chance of inappropriate invocation, causing users' financial inputs to be logged persistently without delivering the expected analysis or safeguards.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill persistently stores sensitive financial information in local plaintext logs and generates export files, but the documentation does not prominently warn about privacy, retention, or file-access implications. Users may enter merchant names, prices, tax notes, or other sensitive financial details assuming ephemeral processing, creating confidentiality risk on shared or compromised systems.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The help text and labels imply substantive financial processing features, but the code only persists text entries and reports simple file statistics. In the context of expense management, deceptive capability signaling can cause users to entrust sensitive financial data to a tool that does not provide the expected safeguards or functionality.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script exposes unrelated capabilities such as history, compare, alert, tax-note, and broad export of accumulated logs, which materially exceed what is expected from a receipt expense helper. In a finance context, unjustified extra capabilities increase the chance of collecting and disclosing sensitive personal or financial data beyond user intent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The export feature aggregates all stored logs into a single json/csv/txt output file without an explicit warning that a new shareable artifact containing sensitive financial history is being created. This materially increases disclosure risk because users may unintentionally email, sync, or otherwise expose consolidated financial records.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script writes user-supplied financial data to plaintext log files under the user’s home directory without a prominent disclosure or consent step. Because receipt and expense inputs can contain merchant names, amounts, dates, and tax-relevant notes, silent persistence increases privacy and data exposure risk on shared or backed-up systems.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.