Back to skill

Security audit

Dialog

Security checks for vulnerabilities and agentic risk

Overview

The skill is advertised as a dialog UI generator but actually installs guidance for a persistent local data-management shell tool with write, delete, export, and unsafe config behavior.

Review this carefully before installing. It should be treated as a local data-record tool, not a dialog UI generator. It writes persistent data under ~/.dialog, can delete records, can export stored data, and contains unsafe parsing/config code; avoid using it with sensitive input or untrusted arguments unless the package is corrected and accurately described.

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

Error
Location
scripts/script.sh:140
Finding

Arbitrary Command Execution Through GNU sed Program Injection

Content
View full analysis
)"; fi elif [ -z "$val" ]; then grep "^${key}=" "$cfg" 2>/dev/null | cut -d= -f2- || echo "(not set)" else if [ -f "$cfg" ] && grep -q "^${key}=" "$cfg" 2>/dev/null; then sed -i "s|^${key}=.*|${key}=${val}|" "$cfg" else echo "${key}=${val}" >> "$cfg" fi echo "Set: $key=$val" fi } ``` ### Technical Analysis The `key` and `val` arguments are inserted directly into regular expressions and a dynamically constructed `sed` substitution program. Shell double quoting prevents ordinary shell word splitting, but it does not escape characters that have special meaning to `sed`, including the `|` delimiter, newlines, regular-expression syntax, and command flags. On GNU `sed`, the `e` substitution flag executes the resulting replacement text as a shell command. A malicious value can terminate the replacement expression, append the `e` flag, and use an embedded newline and comment to neutralize the remainder of the generated program. This converts a configuration update into arbitrary command execution. The vulnerable branch is reached when the selected configuration key already exists. ### Attack Path 1. The attacker or an attacker-controlled automation process invokes the Skill with configuration arguments. 2. An initial call creates a known key: ```bash scripts/script.sh config foo safe ``` 3. A subsequent call supplies a crafted multiline value containing th ...[truncated 1244 chars]
Remediation
View remediation
&2 return 1 fi ``` 2. Reject newlines, carriage returns, NUL bytes, and other control characters in configuration values. 3. Replace the dynamic `sed` command with a safe configuration writer that treats keys and values exclusively as data. 4. Write the updated configuration to a securely created temporary file in the same directory and atomically rename it over the original file. 5. Set restrictive directory and file permissions, such as `0700` for the data directory and `0600` for configuration files. 6. Add regression tests using values containing `|`, backslashes, ampersands, newlines, regular-expression metacharacters, and strings resembling `sed` flags. 7. Avoid printing sensitive configuration values in the confirmation message. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/script.sh:10
Finding

JSONL Injection and Persistent Data Corruption Through Unescaped Entry Values

Content
View full analysis
> "$DATA_DIR/data.jsonl" } ``` ### Technical Analysis The code creates JSON text through string interpolation rather than using a JSON serializer. The attacker-controlled `val` field is inserted without escaping double quotes, backslashes, carriage returns, newlines, or other JSON control characters. Consequently, an entry can: - Terminate the intended JSON string. - Add attacker-controlled JSON properties. - Inject additional physical lines and forged records. - Produce malformed JSON that downstream tools cannot parse. - Manipulate the line-oriented semantics used by `list`, `search`, `remove`, and `stats`. This is a persistent injection issue because the malicious value is appended to `data.jsonl` and affects future commands. ### Attack Path 1. An attacker supplies a crafted value to the `add` command. 2. `cmd_add` passes the value to `_save_entry`. 3. `_save_entry` inserts it verbatim between JSON quotation marks. 4. Embedded quotation marks or newlines break the expected record boundary and can introduce forged content or additional lines. 5. Subsequent `list`, `search`, `remove`, `stats`, and `export` operations process the corrupted file as if each physical line were a legitimate stored entry. For example, a value containing a quotation mark, closing JSON syntax, a newline, and another JSON object can create more than one apparent JSONL record from a single `add` operation. ### Impact Assessment The vulnerability compromises the integrity and reliability of the Skill's persistent data. An attacker able to control entry ...[truncated 483 chars]
Remediation
View remediation
> "$DATA_DIR/data.jsonl" ``` 2. If external dependencies are prohibited, implement standards-compliant JSON escaping and test all control characters carefully. 3. Validate each existing JSONL record before reading or exporting it. 4. Treat malformed records as errors rather than parsing them with `grep` and `cut`. 5. Consider length limits for entry values to prevent storage abuse. 6. Add tests covering quotation marks, backslashes, tabs, carriage returns, newlines, and Unicode characters. 7. Store records with restrictive file permissions and use locking if concurrent invocations are possible. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/script.sh:100
Finding

CSV Injection and Malformed Export Through Unescaped Fields

Content
View full analysis
"$out" while IFS= read -r line; do ts=$(echo "$line" | grep -o '"ts":"[^"]*' | cut -d'"' -f4) c2=$(echo "$line" | grep -o '"cmd":"[^"]*' | cut -d'"' -f4) vl=$(echo "$line" | grep -o '"val":"[^"]*' | cut -d'"' -f4) echo "$ts,$c2,$vl" >> "$out" done < "$DATA_DIR/data.jsonl" ;; *) echo "Formats: json, csv"; return 1 ;; esac echo "Exported: $out ($(wc -c < "$out") bytes)" } ``` ### Technical Analysis The export routine concatenates fields with commas without applying RFC 4180-style CSV quoting. Commas, quotation marks, carriage returns, and newlines in stored values can therefore create additional columns or records. In addition, attacker-controlled values beginning with spreadsheet formula prefixes such as `=`, `+`, `-`, or `@` are written unchanged. Spreadsheet software may interpret such cells as formulas when a user opens the exported CSV. Depending on the spreadsheet application and its security settings, a formula can perform external requests, expose spreadsheet data, or invoke dangerous legacy functionality. The use of `grep` and `cut` as a JSON parser further compounds the issue: escaped characters and malformed or injected JSON records are not handled reliably. ### Attack Path 1. An attacker adds an entry whose value begins with a spreadsheet formula prefix or contains CSV delimiters and line breaks. 2. The malicious value is persisted in `data.jso ...[truncated 1016 chars]
Remediation
View remediation
Vulnerability Patterns
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (11)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The manifest and description present this skill as a dialog/UI generation tool, but the documented behavior is a persistent local record-management CLI that stores, searches, removes, and exports data from ~/.dialog. This mismatch can cause an agent or user to invoke the skill in the wrong context and unknowingly permit file-writing, deletion, and data export operations that are unrelated to the declared purpose.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill claims to generate dialog UI elements, but every documented command maps to local entry management operations such as add, remove, search, export, and config. In an agent ecosystem, this kind of semantic deception is dangerous because it can bypass user expectations and policy routing, leading to unauthorized local data manipulation under a benign-looking frontend label.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The documentation repeatedly frames the skill as a frontend/dialog generator while the command set describes unrelated record-management behavior. That inconsistency increases the chance of accidental invocation during ordinary frontend tasks, where the agent may instead create, modify, or export persisted data without the user intending to use a storage tool.

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 generating dialog UI/design assets, but its actual behavior is a persistent local datastore CLI for adding, searching, exporting, and deleting entries. This capability mismatch is dangerous because it can mislead users or orchestration systems into granting trust and execution to a skill that performs unrelated data collection and manipulation.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The comments and help text repeatedly describe a UI/design generation tool, while the available commands implement entry management, search, export, and deletion. This deceptive presentation can conceal data-handling behavior from users and reviewers, making the skill context more dangerous because it is masquerading as an unrelated benign utility.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The activation description is broad enough to overlap with many normal frontend tasks, yet the documented commands perform unrelated local data operations. This increases the risk of the skill being selected opportunistically by an agent in contexts where users expect design assistance, not persistence or record manipulation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The documented commands include add, remove, export, and config operations that modify persistent local state, but there is no warning or confirmation guidance around these side effects. In agent-driven use, silent mutation and deletion are dangerous because they can lead to unintended data loss or disclosure from ~/.dialog without informed user consent.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script creates a hidden data directory and appends user-provided content to a persistent JSONL file under the home directory without any purpose consistent with UI asset generation. Unnecessary persistent storage increases privacy risk, expands attack surface, and may retain sensitive user inputs longer than expected.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

User entries are silently persisted to disk in a local JSONL file with no prominent warning or consent flow. In the context of a purported UI-generation skill, this is especially risky because users would not reasonably expect their inputs to be stored, potentially including sensitive prompts or proprietary content.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The remove command deletes a line from the persistent data file using sed -i, which is a destructive operation. While the command name implies deletion, the file lacks any explicit warning in help text, comments, or confirmation prompt about modifying stored data irreversibly.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The export command writes collected data into a new file in the current working directory without prominent warning. While not severe on its own, it can unintentionally duplicate potentially sensitive stored content into a less expected or less protected location, increasing accidental exposure risk.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.