Back to skill

Security audit

Zen Master

Security checks for vulnerabilities and agentic risk

Overview

This Zen-persona skill is not malicious, but its installer can overwrite persistent agent identity, tool, and memory files without confirmation or backup.

Install only into a disposable or intentionally prepared agent workspace. Back up any existing IDENTITY.md, SOUL.md, TOOLS.md, MEMORY.md, and knowledge/ directory first, because the installer can replace them. Expect a Chinese-language Buddhist/Zen persona and do not rely on its distress responses as professional mental-health support.

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/install.sh:89
Finding

Unconditional Overwrite of Persistent Agent Configuration and Memory

Content
View full analysis
"$TARGET_DIR/IDENTITY.md" << 'EOF' ``` ```bash cat > "$TARGET_DIR/SOUL.md" << 'EOF' ``` ```bash cat > "$TARGET_DIR/TOOLS.md" << 'EOF' ``` ```bash cat > "$TARGET_DIR/MEMORY.md" << 'EOF' ``` Each command uses the shell `>` redirection operator, which truncates an existing destination file before writing the bundled replacement content. ### Technical Analysis The installer accepts an existing Agent workspace through `--dir` or resolves one through `--agent`. It then replaces four persistent control and state files without: - Checking whether the files already exist. - Obtaining confirmation before destructive modification. - Creating recoverable backups. - Requiring an explicit overwrite option. - Validating whether the destination is an appropriate disposable workspace. - Merging settings while preserving existing security rules. `IDENTITY.md` and `SOUL.md` can govern the Agent's identity, response behavior, and safety boundaries. `TOOLS.md` can affect its understanding of available tools and expected tool use. `MEMORY.md` represents persistent state that may affect future sessions. The skill openly intends to transform the Agent's persona, so the replacement content is not a hidden malicious payload. Nevertheless, silently truncating existing control and memory files is an unsafe installation practice. A user who points the installer at a populated workspace may irreversibly lose unrelated configuration, safety guidance, and accumulated memory. ### Attack Path 1. A user has an existing Agent workspace containing customized identity, safety, tool, and memory files. 2. The user runs: ```bash ./skills/zen-master/scripts/install.sh --dir /path/to/existing-agent-workspace ``` 3. The installer verifies only that the destinat ...[truncated 1378 chars]
Remediation
View remediation
&2 exit 1 fi ``` 2. Require an explicit `--force` or `--replace-config` option for destructive replacement. 3. Create timestamped backups before modifying any existing file: ```bash backup_dir="$TARGET_DIR/.zen-master-backup-$(date +%Y%m%d-%H%M%S)" mkdir -p "$backup_dir" cp -p "$TARGET_DIR/IDENTITY.md" "$backup_dir/" 2>/dev/null || true ``` 4. Display every affected path and request interactive confirmation unless a clearly documented noninteractive flag is supplied. 5. Prefer namespaced files, such as `skills/zen-master/IDENTITY.md`, rather than replacing workspace-level control files. 6. Where supported by the Agent platform, merge only explicitly approved configuration sections instead of replacing entire files. 7. Use atomic writes: - Write generated content to a temporary file inside the destination filesystem. - Validate the generated file. - Preserve ownership and permissions where appropriate. - Rename the temporary file into place only after successful validation. 8. Add an uninstall or rollback command that restores backups and removes only files created by this skill. ]]>
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The description, commands, and content framing are entirely in Chinese and present the skill as transforming any agent into a Zen master in that language context. The file does not indicate that users can opt into another language or that the locale limitation is intentional and documented as a region-specific constraint.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The documentation states that the install process will automatically copy content into the agent workspace and create multiple control files, but it does not clearly warn users about the scope of these modifications or advise review before execution. In an agent-skill context, automatic creation of identity, memory, or tool configuration files can materially alter agent behavior and persistence, making undocumented workspace mutation a meaningful security concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest description is entirely in Chinese and presents the skill as transforming any agent into a Zen master without indicating that users can choose another language. This can violate language/locale policy when users are not given an explicit opt-in or alternative locale.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file provides direct guidance to a user expressing anxiety and existential distress without any safety framing, limits-of-use notice, or escalation guidance for crisis situations. In an agent skill, users may treat this as supportive mental-health advice, which can delay appropriate professional help or fail to respond safely if the user is at risk of self-harm.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This shell script writes multiple generated markdown files and all user-facing instructions entirely in Chinese, effectively forcing a specific language/locale on the installed skill. Under the policy, locale constraints should either be optional, user-selectable, or clearly justified as region-specific; that is not present here.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The installer writes into an arbitrary target directory and creates or overwrites agent workspace files, not just a self-contained knowledge folder. Because --dir accepts any path and the script later writes multiple fixed filenames there, a user can unintentionally alter unrelated agent state or important local files if the wrong directory is supplied.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

This markdown file presents all instructional and descriptive content exclusively in Chinese. Under the policy category, forcing a specific language without user opt-in can be a locale/language policy violation when no justification or alternative is provided.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

This markdown file contains user-facing instructional content only in Chinese, and no text indicates that users may choose another language or that the language restriction is required for a region-specific purpose. Under the policy rule for natural-language locale constraints, forcing a single language without opt-in can be a violation.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

The generated IDENTITY.md states "不传教" and "不神化," but other generated files include lines such as "在线度人" and repeated devotional phrasing like "阿弥陀佛,愿施主心安," which push the persona toward explicitly religious framing. That creates an internal intent contradiction in the skill's own installed documentation.

Content

No source excerpt is available for this finding.