Back to skill

Security audit

Widget

Security checks for vulnerabilities and agentic risk

Overview

The skill is a disclosed macOS widget helper, but it needs review because its widget installer can overwrite files outside the widget folder and setup makes persistent host changes.

Install only if you are comfortable with a skill that can run shell scripts, install or start Übersicht, copy files into ~/.claude, and modify/delete files in the Übersicht widgets directory. Avoid passing custom target names to install-widget.sh until path validation is added, and review any requested delete or setup action before allowing it.

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

Error
Location
scripts/install-widget.sh:18
Finding
Arbitrary File Overwrite Through Target-Name Path Traversal<![CDATA[ ## Vulnerability Details **File Location**: `scripts/install-widget.sh`, lines 18–41 **Vulnerability Type**: Path traversal leading to arbitrary file overwrite **Risk Level**: High ### Vulnerable Code ```bash SOURCE_FILE="$1" TARGET_NAME="${2:-$(basename "$SOURCE_FILE")}" WIDGET_DIR="$HOME/Library/Application Support/Übersicht/widgets" APP_PATH="$(find_uebersicht_app || true)" if [ ! -f "$SOURCE_FILE" ]; then echo "Source widget not found: $SOURCE_FILE" >&2 exit 1 fi if [ -z "$APP_PATH" ]; then echo "Übersicht.app not found. Run bash scripts/setup.sh first." >&2 exit 1 fi if [ ! -d "$WIDGET_DIR" ]; then echo "Widget directory not found: $WIDGET_DIR" >&2 echo "Run bash scripts/setup.sh first so Übersicht can create the widget directory." >&2 exit 1 fi cp "$SOURCE_FILE" "$WIDGET_DIR/$TARGET_NAME" ``` ### Technical Analysis The optional target filename is taken directly from the second command-line argument and appended to the widget directory without validation or canonicalization: ```bash TARGET_NAME="${2:-$(basename "$SOURCE_FILE")}" cp "$SOURCE_FILE" "$WIDGET_DIR/$TARGET_NAME" ``` Although the default value uses `basename`, a caller-supplied value can contain directory traversal sequences such as `../`. The operating system resolves those sequences before the copy is performed, allowing the destination to escape the intended Übersicht widget directory. The script does not reject: - Absolute or traversal-based paths - Directory separators - Non-`.jsx` filenames - Existing destination files - Destinations whose canonical parent is outside the widget directory Because `cp` overwrites existing files by default, exploitation can replace any file writable by the current user. ### Attack Path A concrete exploitation sequence is: 1. Create a file containing attacker-controlled shell commands: ```bash cat > /tmp/payload <<'EOF' echo "attacker-controlled command" > /tmp/widgetdesk-executed EOF ``` 2. Invoke the i ...[truncated 1331 chars]
Remediation
<![CDATA[ ## Remediation Suggestions Treat the target name strictly as a filename rather than a path. 1. Enforce a conservative lowercase kebab-case `.jsx` filename: ```bash if [[ ! "$TARGET_NAME" =~ ^[a-z0-9][a-z0-9-]*\.jsx$ ]]; then echo "Invalid target name: use lowercase kebab-case ending in .jsx" >&2 exit 1 fi ``` 2. Explicitly reject absolute paths, separators, and parent-directory references: ```bash if [[ "$TARGET_NAME" == /* || "$TARGET_NAME" == *"/"* || "$TARGET_NAME" == *"\\"* || "$TARGET_NAME" == "." || "$TARGET_NAME" == ".." ]]; then echo "Target name must be a filename, not a path" >&2 exit 1 fi ``` 3. Construct the destination only after validation: ```bash DESTINATION="$WIDGET_DIR/$TARGET_NAME" ``` 4. Canonicalize and verify the destination parent where platform support permits: ```bash canonical_widget_dir="$(cd "$WIDGET_DIR" && pwd -P)" canonical_parent="$(cd "$(dirname "$DESTINATION")" && pwd -P)" if [ "$canonical_parent" != "$canonical_widget_dir" ]; then echo "Destination escapes the widget directory" >&2 exit 1 fi ``` 5. Avoid silently overwriting an existing widget. Either refuse replacement by default: ```bash cp -n -- "$SOURCE_FILE" "$DESTINATION" ``` or require a separate explicit `--force` option before overwriting. 6. Add regression tests covering `../`, absolute paths, embedded separators, hidden files, malformed extensions, and valid kebab-case widget names. ]]>
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (43)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding
The skill advertises widget management, but the documentation instructs use of setup scripts that install host dependencies, start applications, and populate skill files under the user's home directory. That is materially broader than CRUD on widget files and can change the host environment in ways a user may not expect from the manifest alone.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The skill advertises widget management, but the documentation instructs use of setup scripts that install host dependencies, start applications, and populate skill files under the user's home directory. That is materially broader than CRUD on widget files and can change the host environment in ways a user may not expect from the manifest alone.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding
The skill advertises widget management, but the documentation instructs use of setup scripts that install host dependencies, start applications, and populate skill files under the user's home directory. That is materially broader than CRUD on widget files and can change the host environment in ways a user may not expect from the manifest alone.

Ae1

High
Category
analysis-evasion
Content
- When working inside a WidgetDesk repo clone, run `bash scripts/setup.sh` first
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
- When working inside a WidgetDesk repo clone, run `bash scripts/setup.sh` first
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
- When working inside a WidgetDesk repo clone, run `bash scripts/setup.sh` first
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
- When working inside a WidgetDesk repo clone, run `bash scripts/setup.sh` first
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
- When working inside a WidgetDesk repo clone, run `bash scripts/setup.sh` first
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
- When working inside a WidgetDesk repo clone, run `bash scripts/setup.sh` first
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
- When working inside a WidgetDesk repo clone, run `bash scripts/setup.sh` first
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Tool Parameter Abuse

High
Category
Tool Misuse
Content
~/Library/Application\ Support/Übersicht/widgets/{name}.jsx

# Delete a widget
rm ~/Library/Application\ Support/Übersicht/widgets/{name}.jsx
```

Prefer the `scripts/` helpers for host operations. Only write raw widget files directly when creating or replacing actual JSX content.
Confidence
96% confidence
Finding
The raw deletion command uses a user-controlled placeholder in a shell command: rm ~/Library/Application Support/Übersicht/widgets/{name}.jsx. If name is not strictly validated and safely escaped, an agent could be induced to delete unintended files via path traversal, globbing, or shell metacharacter injection; even without injection, permanent deletion of local files is inherently high risk.

Ae1

High
Category
analysis-evasion
Content
| `now-playing.jsx` | Apple Music now playing | Bottom center |
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
| `weather-canvas.jsx` | Animated weather card | Top left |
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
| `git-pulse.jsx` | Local Git activity heatmap | Top right |
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
| `memo-capsule.jsx` | Local quick-note capsule | Top center |
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
| `volume-knob.jsx` | System volume control knob | Right side |
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Lp1

High
Category
MCP Least Privilege
Confidence
98% confidence
Finding
The script has broad shell execution capability and performs filesystem changes, process launching, and installation actions, but the declared skill description only mentions widget management. This mismatch is dangerous because users or reviewers may not expect installer-level behavior from a skill, weakening informed consent and increasing the chance of unintended code execution.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
else
    if [ ! -f "$zip_path" ] || ! verify_sha256 "$zip_path" "$sha256"; then
      echo -e "${YELLOW}→${NC} 正在下载 Übersicht ${version}..."
      curl -fL "$url" -o "$zip_path"
    fi
    if ! verify_sha256 "$zip_path" "$sha256"; then
      echo -e "${RED}✗${NC} Übersicht 安装包校验失败"
Confidence
70% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Description-Behavior Mismatch

High
Confidence
99% confidence
Finding
This file implements a Git activity monitoring widget, but the declared skill is for managing Übersicht desktop widgets. That mismatch matters because the code performs unrelated local data collection from the user's home directory, which can bypass user expectations and consent boundaries for the stated skill purpose. In an agent skill ecosystem, capability/purpose mismatch is dangerous because it can hide surveillance-like behavior inside a seemingly innocuous tool.

Description-Behavior Mismatch

High
Confidence
98% confidence
Finding
The manifest describes a skill whose function is to manage Übersicht widgets themselves. This code does not implement widget lifecycle management; instead, it defines a specific weather widget template that fetches current weather data and renders animated UI, which is a materially different behavior from the manifest's claimed scope.

Vague Triggers

Medium
Confidence
92% confidence
Finding
The trigger text says to use this skill whenever the user asks for desktop widgets, desktop gadgets, or widgets, which is broad enough to match casual requests. Because the skill also recommends setup and host-modifying scripts, overbroad invocation increases the chance of activating privileged behavior in contexts where the user did not intend system changes.

Context-Inappropriate Capability

Medium
Confidence
90% confidence
Finding
The skill directs the agent to run host setup and app-management scripts as a first step, including starting Übersicht and preparing the environment. This expands the trust boundary from widget file management to system configuration and execution of local scripts, increasing the chance of unintended host changes.

Context-Inappropriate Capability

Medium
Confidence
95% confidence
Finding
The setup script is described as installing missing host dependencies, which is a significant capability escalation for a widget skill. Dependency installation can fetch and execute external software, modify package-manager state, and create persistent system changes unrelated to the user's immediate widget request.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
The documentation includes direct destructive operations such as deleting widget files with rm, but does not require confirmation, backup, or a safer recovery path. In an agent context, omission of explicit warnings makes accidental data loss more likely, especially if filenames are user-supplied or ambiguous.

Natural-Language Policy Violations

Medium
Confidence
90% confidence
Finding
This markdown skill guidance forces a specific language for all readers, which can violate language/locale policy when no user opt-in or justified regional constraint is provided. The file contains instructional content only in Chinese and does not indicate that the skill is intended exclusively for a Chinese-speaking audience.

Static analysis

No suspicious patterns detected.