Back to skill

Security audit

Budget Tracker

Security checks for vulnerabilities and agentic risk

Overview

This is a local budget tracker, but it overstates its finance features and stores sensitive ledger data in the user's home directory without clear disclosure or permission hardening.

Review before installing. Use this only as a simple local ledger, not as a reliable multi-currency, budgeting, monthly-reporting, or export tool. If installed, restrict permissions on $HOME/.budget-tracker and avoid entering sensitive notes unless you are comfortable with plaintext local storage.

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
scripts/script.sh:5
Finding

Financial Ledger Created Without Restrictive Access Permissions

Content
View full analysis

Vulnerability Details

File Location: scripts/script.sh, lines 5-8
Vulnerability Type: Insecure permissions on sensitive local data
Risk Level: Medium

bash
DB_DIR="$HOME/.budget-tracker"
DB_FILE="$DB_DIR/ledger.json"
mkdir -p "$DB_DIR"
[ -f "$DB_FILE" ] || echo '[]' > "$DB_FILE"

Technical Analysis

The script stores personal financial records in $HOME/.budget-tracker/ledger.json, but it does not establish a restrictive umask or explicitly assign secure permissions to the directory and file.

The effective permissions therefore depend on the invoking user's environment. With a common umask of 022, the directory can be created with mode 755 and the ledger with mode 644. If the user's home directory is traversable, other local users may consequently read transaction timestamps, amounts, categories, and notes.

The initialization also does not correct unsafe permissions on an existing directory or ledger. Thus, previously created data can remain exposed even after secure creation logic is later introduced.

Attack Path

  1. A victim invokes the budget-tracker script, causing it to create $HOME/.budget-tracker and ledger.json.
  2. The victim's umask permits group or world read access, such as 022, and the home directory permits traversal by another local account.
  3. The victim records transactions containing financial amounts, categories, timestamps, and potentially sensitive notes.
  4. An unprivileged local attacker identifies the victim's home directory and reads .budget-tracker/ledger.json.
  5. The attacker extracts the victim's stored financial history without authorization.

This path requires access to another local account or process and filesystem traversal rights. It does not provide privilege escalation or remote code execution.

Impact Assessment

A successful exploit results in unauthorized disclosure of locally stored personal financial information. Exposed records can include income and expense amounts, ...[truncated 276 chars]

Remediation
View remediation

Remediation Suggestions

Set restrictive permissions before creating or accessing financial data:

bash
umask 077

DB_DIR="$HOME/.budget-tracker"
DB_FILE="$DB_DIR/ledger.json"

mkdir -p -m 700 "$DB_DIR"
chmod 700 "$DB_DIR"

if [ ! -f "$DB_FILE" ]; then
    printf '%s\n' '[]' > "$DB_FILE"
fi
chmod 600 "$DB_FILE"

Additional hardening should include:

  1. Verify that $DB_DIR is owned by the current user before using it.
  2. Reject unexpected symbolic links for the database directory or ledger file.
  3. Correct permissions on existing installations, not only newly created files.
  4. Write ledger updates atomically through a securely created temporary file in the protected directory, then replace the original file.
  5. Document that the ledger contains sensitive personal information and should not be placed in a shared home directory.
Vulnerability Patterns
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (6)

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The skill advertises multi-currency support, budget-setting, and monthly reporting, but the detected behavior does not implement those features correctly. This mismatch can mislead users into trusting incomplete or inaccurate financial outputs, which is especially risky in a personal finance context where users may make spending, reporting, or accounting decisions based on false assumptions.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
85% confidence
Finding

The skill invokes local scripts and appears to require environment access plus file read/write behavior, but it does not declare any tool scope or permissions boundaries. Missing scope declarations can cause an agent platform to grant broader-than-expected capabilities, reducing transparency and increasing the risk of unintended file access or modification on the host.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script persistently stores sensitive personal finance data under $HOME/.budget-tracker/ledger.json without any explicit disclosure, consent flow, or permission hardening. In the context of a personal finance tool, silent retention of income, expense, and note data increases privacy risk, especially on shared systems, backed-up home directories, or environments with permissive file permissions.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest explicitly claims '支持多币种记账、预算设置及收支报表生成', but the implementation has no currency field, no conversion or per-currency handling, and no budget data or budget-management commands. The report hardcodes a yen symbol and only computes aggregate totals, so the implemented behavior is materially narrower than the stated capability.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The manifest description and usage examples include both English and Chinese text, but the skill does not state that language selection is optional or user-controlled. This can conflict with a language/locale policy that requires explicit user opt-in before forcing or assuming a language.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The report hardcodes the yen symbol (¥) for all financial summaries, which imposes a locale-specific format regardless of the user's preferences or region. This is a natural-language policy issue because the skill does not offer opt-in, configuration, or any explanation that it is intended only for a yen-based context.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.