Back to skill

Security audit

Dividend

Security checks for vulnerabilities and agentic risk

Overview

This is a local finance note tracker with disclosed local storage; it has privacy and export-safety hardening gaps but no evidence of deception, exfiltration, or unsafe persistence.

Reasonable to install if you want a simple offline finance logger, but avoid storing highly sensitive financial or tax details on shared or unencrypted machines. Treat CSV/JSON exports as untrusted if they contain copied or shared input, and prefer a version that sets owner-only file permissions and escapes exported data correctly.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/script.sh:6
Finding

Sensitive financial records rely on ambient filesystem permissions

Content
View full analysis
> "$DATA_DIR/history.log"; } ``` A representative record-writing path is: ```bash local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/record.log" ``` Equivalent file-writing logic is repeated for the other record types. ### Technical Analysis The application stores financial records, balances, tax notes, budgets, and history in `~/.local/share/dividend`, but it does not explicitly establish restrictive permissions for either the directory or the files. `mkdir -p` and shell redirection apply permissions according to the process's current `umask`. In an environment with a permissive `umask`, the directory, log files, and generated exports may be accessible to other local users. The fact that the directory is under the user's home directory does not independently guarantee confidentiality because parent-directory permissions vary between systems. The records are also stored as unencrypted plaintext. Encryption is not necessarily required for a local command-line application, but restrictive filesystem permissions are essential because the data is explicitly financial and potentially sensitive. ### Attack Path 1. A user runs the application in an environment with a permissive `umask`. 2. The script creates `~/.local/share/dividend` and its log files without explicit restrictive modes. 3. The user records sensitive balances, tax notes, budgets, or transaction information. 4. Another local account with filesystem traversal and read access opens the generated log or export files. 5. The attacker obtains the user's stored financial information. ### Impact Assessment This issue can expose all locally stor ...[truncated 461 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/script.sh:73
Finding

CSV export permits spreadsheet formula injection

Content
View full analysis
"$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 The `val` field ultimately contains user-controlled command arguments. It is written directly into a CSV document without standards-compliant quoting, escaping, or neutralization of spreadsheet formula prefixes. Values beginning with characters such as `=`, `+`, `-`, or `@` can be interpreted as formulas when the resulting CSV is opened in spreadsheet software. Commas, quotes, and line breaks in values can also alter the intended CSV structure. This is not shell command injection because the value remains quoted during shell output. The risk arises in a downstream spreadsheet application that interprets CSV cells as active formulas. ### Attack Path 1. An attacker supplies, imports, or persuades the user to record a value beginning with a spreadsheet formula prefix. 2. The application stores the crafted value in one of its log files. 3. The user executes `dividend export csv`. 4. The script inserts the crafted value into `export.csv` without quoting or formula neutralization. 5. The user opens the export in spreadsheet software. 6. The spreadsheet interprets the crafted cell as a formula rather than inert financial text. 7. Depending on spreadsheet behavior and security settings, the formula may display deceptive content, initiate links or external data requests, or perform other formula-supported actions. ### Impact Assessment Successful exploitation affects users who open a crafted export in formula-capable spreadsheet software. The potential scope is limited by the spreads ...[truncated 361 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/script.sh:59
Finding

JSON export fails to escape user-controlled values

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 "\n]" >> "$out" ;; ``` ### Technical Analysis The script constructs JSON through string interpolation. The `val` field is derived from stored user input and is inserted into a quoted JSON string without escaping double quotes, backslashes, or control characters. A crafted value can therefore terminate the intended JSON string, inject additional properties or structures, or make the export syntactically invalid. Even benign values containing quotes, backslashes, tabs, or line breaks can corrupt the generated document. The final `echo "\n]"` is also implementation-dependent because some `echo` implementations interpret backslash escapes while others emit them literally. JSON should be generated by a serializer rather than assembled manually. ### Attack Path 1. A user or attacker records a value containing JSON metacharacters, such as an unescaped double quote followed by additional JSON syntax. 2. The value is stored in a Dividend log file. 3. The user runs `dividend export json`. 4. The export function interpolates the value directly into the JSON document. 5. The resulting file becomes malformed or contains attacker-influenced JSON structure. 6. A downstream service, script, or parser consumes the export and may process injected fields or fail unexpectedly. ### Impact Assessment The primary impact is loss of export integrity and availability. Exported data may become unparsable, and d ...[truncated 355 chars]
Remediation
View remediation
Vulnerability Patterns
  • 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
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (4)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill’s declared purpose is a lightweight dividend tracker, but the documented behavior expands into a broader finance/activity logging tool with persistent storage and history retention under ~/.local/share/dividend. This mismatch is risky because users and hosting agents may grant trust based on the narrow description while the skill stores more data and exposes more operational surface than expected, undermining informed consent and review.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The file header frames the script as a dividend-focused finance tool, yet the command handlers simply store arbitrary free-form input into separate log files for many generic categories. This contradicts the stated intent of a dividend-specific tool because there is no dividend-aware validation, modeling, or tracking logic in the implementation.

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 user-supplied finance data under ~/.local/share/dividend and appends activity to history.log without prominently informing the user before collection. Because the data may include sensitive financial notes, balances, forecasts, or tax-related content, silent local retention increases privacy risk and can expose information to other local processes, backups, or users with filesystem access.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest says this skill is a lightweight dividend tracker for adding entries, viewing stats, searching history, and exporting data. However, the help text and command set expose many additional finance-oriented capabilities such as categorize, balance, trend, forecast, budget-check, compare, alert, and tax-note, which materially expand the scope beyond dividend tracking.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.