Back to skill

Security audit

doc-export

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it says, but it can publish conversation-derived documents to a public website and retain archived copies without enough safeguards.

Install only if you intentionally want generated documents copied to that specific public web domain. Before use, redact secrets and personal data, confirm the domain and web root are yours, require explicit approval before publishing, use private or expiring links if possible, and define how both public and archived copies will be deleted.

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:22
Finding

Unauthenticated Publication and Indefinite Retention of Conversation-Derived Documents

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 22-45 and 57-64
Vulnerability Type: Public information exposure and insecure data retention
Risk Level: Medium

Vulnerable Code

markdown
### 1. 整理文档

- 根据对话内容整理解决方案
- 使用 Markdown 格式
- 包含:问题背景、解决步骤、配置示例、常见问题等
- 保存到 `/root/.openclaw/workspace/docs/` 目录
- 文件命名:`<主题>-guide.md` 或 `<主题>.md`

### 2. 部署到 Web

- 复制文件到 nginx web 目录:`/www/wwwroot/ucloud.demo.binyuli.top/`
- 用户的域名:`ucloud.demo.binyuli.top`(已配置 HTTPS)
- 下载链接格式:`https://ucloud.demo.binyuli.top/<文件名>`

### 3. 告知用户

- 提供下载链接
- **必须提醒用户:下载完告诉我要清理文件**

示例回复:
> 文档准备好了!
>
> **下载链接:** https://ucloud.demo.binyuli.top/xxx-guide.md
>
> 下载完告诉我,我帮你清理文件。

### 4. 清理文件

用户确认下载完成后:
- 删除 `/www/wwwroot/ucloud.demo.binyuli.top/` 下的临时文档
- 保留 `/root/.openclaw/workspace/docs/` 下的原始文档(作为归档)

## 相关配置

- Web 根目录:`/www/wwwroot/ucloud.demo.binyuli.top/`
- 文档归档目录:`/root/.openclaw/workspace/docs/`
- 用户域名:`ucloud.demo.binyuli.top`(HTTPS)

## 注意事项

- 文件名使用英文,避免中文和空格
- 使用 kebab-case 命名(如 `whatsapp-setup-guide.md`)
- 清理时只删 web 目录的文件,保留归档

Technical Analysis

The skill directs the agent to extract material from a conversation, save it under a privileged local path, and copy it into an nginx document root. The resulting URL appears to be directly accessible over HTTPS, but the workflow specifies no authentication, authorization, expiring token, randomized object identifier, or access-control check.

HTTPS only protects data while it is transmitted; it does not prevent an unauthorized party from requesting the published URL. The required descriptive, kebab-case filenames may also make document paths easier to guess. No procedure is defined for detecting or redacting credentials, API keys, personal information, internal hostnames, proprietary configuration, or other sensitive conversation content before publication.

Public cleanup is manual and d ...[truncated 2093 chars]

Remediation
View remediation

Remediation Suggestions

  1. Require explicit user confirmation immediately before publishing a document to any externally reachable location.
  2. Scan generated documents for secrets, access tokens, passwords, private keys, personal data, internal addresses, and other sensitive information. Require redaction or an explicit override when potential sensitive content is found.
  3. Replace direct public web-root publication with an authenticated download service.
  4. Use cryptographically random, unguessable identifiers rather than descriptive filenames in public URLs.
  5. Issue short-lived signed download links and enforce expiration on the server.
  6. Automatically delete published files after a short time-to-live, regardless of whether the user returns to confirm the download.
  7. Disable directory indexing and configure appropriate cache-control and search-engine exclusion headers. These measures are defense in depth and must not replace authentication.
  8. Define an archive retention policy. Obtain user consent before archival, delete records after the retention period, and provide a deletion mechanism.
  9. Protect archived documents with restrictive filesystem permissions and encryption at rest. Avoid storing them beneath /root unless elevated access is necessary and justified.
  10. Record publication and deletion events without logging document contents, credentials, or signed download tokens.
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • 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
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (2)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill description and workflow normalize exporting conversation-derived material to a publicly accessible web root without any upfront warning about confidentiality, sensitivity, or public exposure. This is dangerous because users may assume the export is private, while the skill actually publishes potentially sensitive conversation content to an internet-reachable domain where it may be accessed before cleanup or discovered by third parties.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The trigger phrases are broad enough that normal conversation about exporting or organizing content could invoke the skill without a clear, informed request to publish material. In this skill, unintended invocation is more dangerous because execution leads to creating a file in a public web directory and exposing conversation-derived content via a live HTTPS link.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.