Back to skill

Security audit

Daily Xuanzang

Security checks for vulnerabilities and agentic risk

Overview

This is mostly a disclosed daily reading skill, but it asks the agent to run an unverified local audio helper script and to persist or send generated outputs, so it needs careful review before installation.

Install only if you are comfortable with local progress/media persistence and scheduled delivery. Before enabling voice, remove the external bash-helper instruction or replace it with a bundled, reviewed, fixed-path helper; use explicit trigger phrases and confirmation before advancing progress or posting to channels; prune or guard the vol12 donation section so it is not narrated as source text.

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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:163
Finding

Execution of an Unreviewed Workspace-Controlled Audio Helper

Content
View full analysis
/scripts/xuanzang-audio.sh /tmp/xz_read_NNN.txt /xuanzang-NNN-voice.mp3 ``` Script stdout: `XZAUDIO_OK` indicates success; `XZAUDIO_SKIP` indicates a normal NO_TTS skip; `XZAUDIO_ERR/WARN` indicates that audio is unavailable. > Reference script: `~/clawd/scripts/xuanzang-audio.sh` ``` The excerpt above is an English rendering of the operative instructions at the cited lines. The actual command executed by the Skill is: ```bash bash /scripts/xuanzang-audio.sh /tmp/xz_read_NNN.txt /xuanzang-NNN-voice.mp3 ``` ### Technical Analysis The Skill instructs the Agent to invoke a shell script located in the consuming workspace or at `~/clawd/scripts/xuanzang-audio.sh`. That helper is not included in the audited project and therefore is outside the package's review and integrity boundary. Executing a workspace-controlled file explicitly through `bash` gives that file the ability to run arbitrary shell commands with the same operating-system privileges as the Agent. No signature, checksum, ownership validation, permission check, or trusted-path validation is specified before execution. The command's arguments do not themselves demonstrate command injection because they are shown as positional arguments. The security issue is the trust placed in the script body at an unverified external path. ### Attack Path 1. An attacker gains the ability to create or replace `/scripts/xuanzang-audio.sh` or `~/clawd/scripts/xuanzang-audio.sh`. This could occur through another compromi ...[truncated 1033 chars]
Remediation
View remediation

other

Note
Location
data/volumes/vol12.txt:539
Finding

Donation and Payment Material Is Reachable Through the Lecture Extraction Pipeline

Content
View full analysis
TOTAL_VOLUMES: return {"done_all": True, "vol": vol} off = p["charOffset"] target = p.get("segCharsTarget", 900) body = vol_body(vol) base = strip_volume_header(body) start = base + off if start >= len(body): return {"done_volume": True, "vol": vol} window = body[start : start + target + 500] cut = min(target, len(window)) if len(window) > target: m = re.search(r"[。!?」]", window[target:]) cut = target + m.end() if m else len(window) raw = window[:cut] seg_text = clean_segment_text ...[truncated 2550 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (18)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The code does support one core part of the description: sequential daily reading of the 12-volume text with automatic progress tracking and a zh/en language preference. However, several prominently declared user-facing capabilities are not implemented in this code chunk. There is no translation engine or translated output, no route map generation or map data, no voice/audio support, and no trigger processing. The actual code is narrower in scope: it only manages reading progress and extracts source-text segments from local files. Because the description claims multiple major features absent from the implementation, the description does not accurately represent the code chunk.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The trigger list includes very generic terms such as 'xuanzang' and the text title itself, which can cause accidental invocation during ordinary conversation or historical discussion. In a stateful skill, unintended activation can lead to unwanted content generation or progress changes without clear user intent, making this a genuine prompt-squatting / overbroad invocation issue.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill instructs the agent to read and write local files, including progress state under ~/.openclaw/workspace and media copies under ~/.openclaw/media/outbound, but it declares no explicit tool scope or permissions. That creates an over-broad execution model where filesystem access is implicit rather than constrained, increasing the chance of unintended file access or modification if the skill is invoked in a permissive runtime.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger list includes generic terms such as 'xuanzang' and '西域记', which may appear in ordinary conversation and accidentally invoke the skill. Because the skill performs stateful file writes and may generate/send media, unintended activation could cause unwanted progress advancement, filesystem changes, or noisy outbound content.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The document is entirely written and framed as a Chinese '白话讲解', with no indication that other languages are supported or that the Chinese-only presentation is optional. Under the policy, forcing a specific language without user opt-in is a natural-language locale violation unless the constraint is explicitly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The text explicitly attributes fixed negative traits to a people based on supposed lineage and origin, e.g. claims that a population is inherently violent or poisoned by ancestry. Even though this appears in a historical/religious source text rather than as an instruction, surfacing it uncontextualized in a modern skill can normalize ethnic stereotyping and cause harm to users.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This passage repeatedly generalizes regional populations as inherently deceitful, violent, crude, or otherwise morally deficient. In a daily-reading skill with translation and voice, repeated delivery of such stereotypes without context increases the risk of reputational harm and the propagation of biased or xenophobic content.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The text makes sweeping derogatory claims about a national/regional group, including statements about lacking manners or being inherently violent. In this skill's context, the content is more dangerous because it is designed for recurring consumption and may be voiced or translated, amplifying harmful stereotypes beyond a one-off archival display.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The file specifies "中文 300–800 字朗读稿" as a fixed requirement, which imposes a specific language for generated content. Under the policy, forcing a language without user opt-in is a natural-language policy violation unless the locale constraint is clearly justified as region-specific.

Content

No source excerpt is available for this finding.

Tainted flow: 'data' from pathlib.Path.read_text (line 59, file read) → pathlib.Path.write_text (file write)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · scripts/progress.py (reported line 68)May include surrounding context.

python
def save(data):
    ensure_dir()
    PROGRESS_FILE.write_text(
        json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8"
    )

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The README advertises automatic progress tracking and later shows commands that advance and reset progress, but it does not clearly disclose what state is persisted, when it changes, or how users can control it. This creates a real transparency and consent issue: users may unknowingly have reading progress stored or modified, especially if accidental invocation occurs.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
71% confidence
Finding

This plain-text skill file consists entirely of Chinese text and does not include any natural-language indication that the user can choose a language or that the locale constraint is intentional. Under the policy rule for language/locale, forcing a specific language without opt-in can be a policy concern when presented as skill content.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

This plain-text file consists entirely of Chinese text and does not offer any language or locale choice. Under the stated policy, a skill file can violate language/locale requirements if it forces a specific language without user opt-in, and no region-specific justification is provided here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

This plain-text file contains natural-language content describing an institutional rule: '唯我國僧而得自在,及有國人亦同僧例,' which privileges monks and nationals of one country. That is a locale/nationality-based restriction presented without user choice or opt-in, matching the policy-violation category for language/locale-type organizational constraints.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

SQP-3 applies to all file types and covers natural-language policy violations such as forcing a specific language without user opt-in. This plain-text file presents all content in Chinese and contains no indication that the locale is user-selectable or region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

This plain-text file is primarily in Chinese, but these lines switch to English for donation instructions and receipts without indicating that language selection is optional or user-driven. Under the stated policy, forcing or embedding a specific language without opt-in can be a natural-language locale policy issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

The package description states that each episode includes a bilingual route map and vernacular/English translation, which implies a fixed language/locale behavior. Because no opt-in, language choice, or region-specific justification is stated in this file, this may conflict with a policy requiring language selection rather than forcing a specific locale.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The natural-language interface restricts the language preference to only 'zh' or 'en' via both validation logic and CLI argument choices. This is a locale/language policy concern because the skill forces a specific language set rather than offering broader user choice or documenting a justified regional limitation.

Content

No source excerpt is available for this finding.