Back to skill

Security audit

Tidyfiles

Security checks for vulnerabilities and agentic risk

Overview

This looks like a local activity logger packaged as a file-organizing tool, so users may save sensitive file details without realizing it does not actually organize files.

Review before installing. Use this only if you want a local logbook for file-organization notes, not an actual file organizer. Avoid entering secrets, tokens, confidential paths, or sensitive business details, and check ~/.local/share/tidyfiles for retained logs and exports. The publisher should align the description with the real logging behavior, add clear consent and retention controls, harden file permissions, and fix search/export handling.

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

Note
Location
scripts/script.sh:112
Finding

Option Injection Through the Search Term

Content
View full analysis
}" echo "Searching for: $term" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local m=$(grep -i "$term" "$f" 2>/dev/null || true) if [ -n "$m" ]; then echo " --- $(basename "$f" .log) ---" echo "$m" | sed 's/^/ /' fi done } ``` ### Technical Analysis The attacker-controlled `term` is passed to `grep` as a positional argument without an end-of-options marker such as `--`. If the value begins with a hyphen, GNU `grep` may interpret it as an option rather than as the intended search pattern. Quoting `"$term"` prevents shell word splitting and wildcard expansion, but it does not prevent the called program from interpreting the argument as an option. An option-shaped term can consequently modify `grep` behavior, request patterns from another file, produce unexpected output, or consume excessive resources. The impact is constrained because the selected search targets are the application log files and the script executes with the privileges of the invoking user. No privilege escalation or direct shell command injection is present. ### Attack Path 1. An attacker influences a value passed to `tidyfiles search`. 2. The attacker supplies an option-shaped value instead of a normal search expression. 3. `_search` invokes `grep -i "$term" "$f"` without `--`. 4. `grep` parses the attacker-controlled value as an option. 5. Search behavior changes, potentially causing unexpected file reads for pattern input, misleading output, errors, or local resource consumption. ### Impact Assessment The vulnerability can affect the availability and integrity of search results. Depending on the installed `grep` implementation and supplied options, it ma ...[truncated 212 chars]
Remediation
View remediation
/dev/null || true) ``` Additional hardening measures include: - Validate the maximum search-term length to limit resource consumption. - Use `grep -e "$term" -- "$f"` if regular-expression support is intentional. - Document whether search terms are interpreted as literal strings or regular expressions. - Avoid storing command output in one large shell variable if log files can become large; stream matching results instead. ]]>

T09 · Insecure Skill Coding Practices

Note
Location
scripts/script.sh:7
Finding

Potentially Sensitive Records Stored in Plaintext Without Explicit Permissions

Content
View full analysis
> "$DATA_DIR/history.log"; } ``` A representative command stores arbitrary input in both a command-specific log and the unified history: ```bash run) shift if [ $# -eq 0 ]; then echo "Recent run entries:" tail -20 "$DATA_DIR/run.log" 2>/dev/null || echo " No entries yet. Use: tidyfiles run " else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/run.log" local total=$(wc -l < "$DATA_DIR/run.log") echo " [Tidyfiles] run: $input" echo " Saved. Total run entries: $total" _log "run" "$input" fi ;; ``` ### Technical Analysis The application accepts unrestricted descriptive text and writes it to plaintext files under the user's home directory. The data directory and files are created without explicit permission modes, so their effective permissions depend on the invoking process's `umask` and any pre-existing filesystem objects. On systems with a permissive `umask`, the directory may be traversable and log files may be readable by other local users. The documentation encourages recording information about backups, directory structures, disk usage, and project activity. Such entries may reveal sensitive paths, operational details, filenames, or other confidential context. The same input is duplicated in a command-specific log and `history.log`, increasing the number of locations from which it must be removed or protected. ### Attack Path 1. A user records a task description containing sensitive paths or operational information. 2. The script creates ...[truncated 726 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/script.sh:59
Finding

Unescaped User Data in JSON and CSV Exports

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" ;; 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 ;; txt) echo "=== Tidyfiles Export ===" > "$out" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue echo "--- $(basename "$f" .log) ---" >> "$out" cat "$f" >> "$out" done ;; *) echo "Formats: json, csv, txt"; return 1 ;; esac echo "Exported to $out ($(wc -c < "$out") bytes)" } ``` ### Technical Analysis Values originating from application log entries are inserted directly into JSON and CSV output without format-specific escaping. For JSON output, quotation marks, backslashes, control characters, and embedded line breaks are not encoded. A crafted value can terminate the intended JSON string and inject additional properties or objects, or simply make the generated file invalid. For CSV output, fields are not quoted and ...[truncated 1999 chars]
Remediation
View remediation
Vulnerability Patterns
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (9)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill is presented as a file-organizing utility, but the documentation describes a different behavior: persistent logging of user-supplied inputs to local files and exports. This mismatch can cause users or an agent to invoke the skill for sensitive file-management tasks while unknowingly disclosing directory names, filenames, cleanup activity, or other operational details into durable logs.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest advertises file sorting and cleanup capabilities, but the body documents a local activity logger. In an agent ecosystem, this kind of semantic deception increases the chance of unsafe routing and misuse, because the skill may be selected for broad file-management prompts while performing undisclosed data collection instead of the expected task.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The script's stated purpose is organizing files, but its implementation is a generic input logger that stores arbitrary user-supplied text under a hidden local data directory. This mismatch is dangerous because users or agents may provide sensitive filenames, paths, prompts, or operational data believing the tool performs decluttering, while it instead accumulates persistent records unrelated to the declared skill.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The broad description is likely to match many common file-management requests, increasing the chance that an agent invokes this skill in contexts involving sensitive filesystem information. Because the skill actually logs user inputs rather than organizing files, overbroad routing language materially raises the risk of unintended disclosure and misuse.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documentation highlights offline/local behavior but omits a clear warning that user-provided file activity details are persisted to local logs and can later be exported or searched. That omission is dangerous because users may share sensitive filenames, paths, project names, or cleanup notes believing they are transient inputs rather than stored records.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The command verbs imply operational actions such as convert, analyze, generate, compare, or export on user data, but the documentation says these commands mostly just record inputs or display recent logs. This can mislead users into entering sensitive operational details under the assumption that real processing is occurring, when the actual effect is retention of those details in command-specific logs and history.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The help text presents operational commands that imply file-management actions, but the backend handlers only append raw input strings to logs. In an agent skill context, this deceptive interface increases the chance that automation passes sensitive task context or file information into persistent storage under false assumptions about what the command does.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The export function aggregates all historical log contents into new files on disk, increasing the spread and lifetime of previously captured data. In this skill context, that compounds the privacy risk because the tool already stores arbitrary inputs, and export creates additional copies in multiple formats that may be easier to share, ingest, or leak.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

At this location, user input is written verbatim to persistent log files without any privacy notice, redaction, consent flow, or retention control. This is risky because users may enter sensitive paths, filenames, tokens, or business data, which then remain on disk in a predictable location and may later be exposed to other local processes or exported.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.