Back to skill

Security audit

Fun Skills

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a simple entertainment helper, but its setup script can silently erase existing game notes in the user's home directory.

Review the initializer before installing or running it. If you already have files in ~/games, back them up or avoid scripts/init_games_directory.sh because rerunning it can replace your existing game progress, collections, favorites, wishlists, and game-night notes with templates.

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/init_games_directory.sh:19
Finding

Initialization script silently overwrites existing user records

Content
View full analysis
"$GAMES_DIR/video/playing.md" echo "[backlog template]" > "$GAMES_DIR/video/backlog.md" echo "[board-game collection template]" > "$GAMES_DIR/board/collection.md" echo "[board-game wishlist template]" > "$GAMES_DIR/board/wishlist.md" echo "[party-game template]" > "$GAMES_DIR/party/ideas.md" echo "[children's activity template]" > "$GAMES_DIR/kids/activities.md" echo "[favorite-games template]" > "$GAMES_DIR/favorites.md" echo "[game-night log template]" > "$GAMES_DIR/game-nights.md" ``` The corresponding truncating redirections occur at lines 25, 33, 48, 52, 66, 81, 95, and 107. The script creates directories with `mkdir -p` but does not check whether any target file already exists. ### Technical Analysis The shell `>` operator opens its target with truncation enabled. If a target file already exists, its previous contents are erased before the template is written. The script is documented as a normal initialization command in `README.md` lines 42-44: ```bash bash scripts/init_games_directory.sh ``` There is no warning that the operation is destructive, no confirmation prompt, no backup mechanism, no existing-file guard, and no explicit force option. Consequently, initialization is not idempotent: running it after the user has populated the files resets the stored records instead of preserving them. This is an insecure coding practice involving unsafe handling of persistent user data. It does not provide privilege escalation or code execution, but it can cause data loss within the invoking user's account. ### Attack Path 1. A user initializes `~/games` and subsequently adds game progress, collections, favorites, wishl ...[truncated 1239 chars]
Remediation
View remediation
"$target" else printf 'Preserving existing file: %s\n' "$target" fi ``` 2. **Use shell no-clobber mode** as a defense-in-depth measure: ```bash set -o noclobber ``` Handle creation failures explicitly rather than silently continuing. 3. **Add an explicit `--force` option** if resetting data is required. Clearly warn that it destroys existing records and require deliberate user action. 4. **Create timestamped backups** before any forced replacement: ```bash cp -- "$target" "$target.backup.$(date +%Y%m%d%H%M%S)" ``` 5. **Use restrictive and predictable failure behavior:** ```bash set -euo pipefail ``` 6. **Update the README** to distinguish safe first-time initialization from destructive reset behavior. 7. **Add regression tests** that populate every target file, rerun initialization, and verify that existing content remains unchanged unless an explicit force option is supplied. ]]>
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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 (5)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
80% confidence
Finding

The skill documentation and usage instructions are entirely in Chinese, including the recommended interaction phrases, but there is no indication that users may choose another language or that the skill is intentionally limited to a Chinese-speaking context. This can violate language/locale policy when a specific language is imposed without user opt-in or documented justification.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The invocation examples use broad natural-language triggers like “我想玩个游戏” and “讲个笑话” without defining clear scope boundaries. In an agent environment, vague triggers can cause the skill to activate in unintended contexts or intercept generic requests that should be routed elsewhere, increasing the chance of inappropriate actions or confusing delegation.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The invocation description is extremely broad ('entertainment or fun activities', 'jokes', 'family activities', 'fun things to do'), which can cause the skill to be selected for many ordinary requests where a narrower or more appropriate skill should handle the task. In an agent system, overbroad routing increases the chance of unintended activation, response hijacking, and inconsistent behavior across common user queries.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The document title and body switch into Chinese for the primary instructions and examples, but there is no statement that the user can choose another language or locale. This can violate language or locale policy when a skill implicitly forces a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

The file's docstrings, prompts, game names, and user-facing messages are all Chinese-language only. Under the policy rule, forcing a specific language without user opt-in is a natural-language policy concern unless the locale restriction is explicitly justified, which is not present here.

Content

No source excerpt is available for this finding.