Back to skill

Security audit

Trend

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a local content logger marketed as a trend-tracking skill, so users should review it before installing because it persistently stores and exports their drafts.

Install only if you want a local command-line content log, not a true trend, sentiment, popularity, or alerting tool. Avoid entering confidential drafts unless you are comfortable with them being saved under ~/.local/share/trend and included in exports; be careful opening CSV exports in spreadsheet software.

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:78
Finding
CSV Formula Injection in Exported Data## Vulnerability Details **File Location**: `scripts/script.sh`, lines 78–86 **Vulnerability Type**: CSV formula injection and improper CSV escaping **Risk Level**: Medium ### Vulnerable Code ```bash 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 The `val` variable contains user-controlled content read from local log files. It is written directly to a CSV file without CSV field quoting, escaping, or spreadsheet-formula neutralization. If a stored value begins with a spreadsheet formula prefix such as `=`, `+`, `-`, or `@`, spreadsheet applications may interpret it as a formula when `export.csv` is opened. Embedded commas, double quotes, carriage returns, or newlines can also corrupt the CSV structure and permit field or row manipulation. The shell does not execute the value; exploitation occurs in downstream spreadsheet software that interprets the generated file. ### Attack Path 1. An attacker persuades a user or automated workflow to store attacker-controlled content through a content command, for example: ```bash trend draft '=HYPERLINK("https://attacker.invalid","Open report")' ``` 2. The application stores the value in a command log under `~/.local/share/trend/`. 3. The user runs: ```bash trend export csv ``` 4. The exporter copies the value verbatim into `~/.local/share/trend/export.csv`. 5. The user opens the CSV in spreadsheet software. 6. If that software evaluates CSV fields as formulas, the injected expression may be activated or presented as an actionable formula. ### Impact Assessment This vulnerability does not directly grant shell privileges or execute commands within the audited script. Its scope is the account and spreadsheet environment of a user who opens the generated ...[truncated 618 chars]
Remediation
## Remediation Suggestions 1. Generate CSV through a dedicated serializer rather than string concatenation. 2. Enclose every field in double quotes and replace each embedded double quote with two double quotes. 3. Correctly preserve embedded commas, carriage returns, and newlines. 4. Before serialization, neutralize values whose first non-whitespace character is `=`, `+`, `-`, or `@`. A common defensive option is to prefix such values with a single quote, subject to compatibility requirements. 5. Apply the same escaping rules to every field, including `name`, `ts`, and `val`. 6. Add tests covering formula prefixes, commas, quotes, CRLF characters, and multiline values. 7. Document that exported files can contain untrusted user input and should not be opened with formula execution enabled. A safe implementation should use a trusted CSV-capable utility or language library. If Bash must be retained, implement and consistently apply a function that performs standards-compliant field quoting and formula neutralization.
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 (7)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The skill’s declared purpose is trending-topic tracking with popularity, sentiment, and alerts, but the documented behavior is actually a local content-authoring and logging toolkit. This mismatch is dangerous because users may invoke the skill with incorrect trust assumptions, causing unintended storage of sensitive drafting or publishing data and masking the absence of the advertised analytics functions.

Description-Behavior Mismatch

High
Confidence
98% confidence
Finding
The skill expands far beyond its stated scope into broad content-authoring, storage, search, and export operations. Scope creep increases attack surface and operational risk because a seemingly narrow analytics skill can unexpectedly retain, index, and export large amounts of user-provided content.

Intent-Code Divergence

High
Confidence
99% confidence
Finding
The header and positioning describe a trend-analysis skill, while the commands implement content drafting, editing, scheduling, and local logging. In a security context, deceptive or materially inaccurate capability descriptions can lead users or orchestrators to pass inappropriate data to the skill and rely on protections or analyses that do not exist.

Description-Behavior Mismatch

High
Confidence
98% confidence
Finding
The skill manifest claims trend tracking, popularity, sentiment, and alerts, but the implementation only exposes a local text logging toolkit for draft/edit/optimize-style content entries. This mismatch is dangerous because users or higher-level agents may grant the skill trust, permissions, or workflow placement based on capabilities it does not actually provide, causing silent misuse, data mishandling, and incorrect security assumptions.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The documentation states that all entries are timestamped and stored locally, but it does not prominently warn that user inputs may contain sensitive drafts, internal plans, or unpublished content. Silent persistence of all inputs creates confidentiality and retention risks, especially on shared systems or in environments where local home directories are backed up or accessible to other processes.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The export command can dump all stored activity and content into export files without an explicit warning about the sensitivity and breadth of the exported data. This increases the chance of accidental bulk disclosure through loose file permissions, syncing, attachment to reports, or transfer to less secure locations.

Description-Behavior Mismatch

Medium
Confidence
93% confidence
Finding
The export, search, and recent-history functions operate on locally stored logs containing user-provided content, not trend-monitoring telemetry as described by the skill. In skill ecosystems, this kind of semantic mismatch can expose sensitive prompts or drafts to other users or agents expecting harmless analytics output, increasing the risk of unintended data disclosure and unsafe automation decisions.

Static analysis

No suspicious patterns detected.