Back to skill

Security audit

blog-polish-zhcn

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it advertises, but its generated filename can escape the intended output folder and overwrite Markdown files elsewhere.

Review this before installing if you will process drafts from others or untrusted content. The skill should sanitize titleSlug and verify the final path remains under outputDir before writing; otherwise a crafted draft could influence where the output Markdown file is created or overwritten.

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
SKILL.md:69
Finding

Path Traversal Through Unsanitized LLM-Generated Filename

Content
View full analysis
"$outputPath" ``` ### Technical Analysis The `titleSlug` value is produced by the LLM after processing attacker-controllable draft content. It is then concatenated directly into `outputPath` without validation, sanitization, or canonical-path containment checks. Shell quoting prevents shell metacharacters from producing direct command injection, but it does not prevent filesystem path traversal. A generated slug containing path separators and traversal components, such as `../../../target`, can cause the resulting path to resolve outside the intended `outputDir`. The subsequent `mkdir -p` and output redirection operate on that untrusted path. Consequently, the workflow can create directories and overwrite a Markdown file outside the documented output directory. ### Attack Path 1. An attacker supplies or modifies the Markdown draft processed by the skill. 2. The draft includes content or prompt-injection text intended to influence the LLM-generated `titleSlug`. 3. The LLM returns a slug containing traversal components, such as `../../../attacker-target`. 4. The `prepare_output` step concatenates that value into `${outputDir}/${ts}_${titleSlug}.md` ...[truncated 946 chars]
Remediation
View remediation
&2 exit 1 ;; esac ``` The containment check should be retained even when an allowlist is used, providing defense in depth. ]]>
Vulnerability Patterns
  • Rogue AgentSelf-Modification, Session Persistence
  • 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 (4)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill description requires translation into Simplified Chinese (zh-CN) as a fixed behavior, and the file does not indicate that the user can choose another language or explicitly opt into this locale constraint. This is a natural-language locale policy concern because the skill hard-codes a language outcome rather than presenting it as a user-selected option.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The documented triggers include broad phrases such as "polish my draft" and "translate blog to Chinese," which are generic enough to match common conversational requests outside a narrowly defined skill context. The description does not provide exclusion conditions or negative examples to clarify when the skill should not activate.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · SKILL.md (reported line 111)May include surrounding context.

md
## Workflow Summary

1. **Resolve paths** + create timestamp (`date +"%y%m%d%H%M"`)
2. **Read draft** from `draftPath`
3. **Polish English**: Fix grammar/spelling, improve clarity, structure into 4-5 sections, target 1000-1200 words
4. **Translate to zh-CN**: Preserve code blocks, inline code, technical terms (`openclaw`, `skill`, `cli`)

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The workflow summary says the skill should structure the article to a 1000–1200 word target, while the manifest description at L003 states the intended output is 1200–1400 words. This is an active contradiction in the skill’s own documentation about the expected behavior.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.