Back to skill

Security audit

语雀知识库导出

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent Yuque export skill, but it will process authenticated knowledge-base content through the agent and write it to local files.

Use this only for Yuque repositories whose contents you are comfortable having the agent process. Export to a dedicated folder, review the destination before running, and avoid --images unless you want remote Yuque CDN assets downloaded locally.

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

Authenticated Knowledge-Base Content Is Exposed to the Agent Context

Content
View full analysis
{ for (let retry = 0; retry < 3; retry++) { try { const r = await fetch(`/api/docs/${slug}?book_id=${BOOK_ID}`, { credentials: 'include', headers: { 'Accept': 'application/json' } }); if (r.status === 429) { await new Promise(ok => setTimeout(ok, 2000 * (retry + 1))); continue; } const data = await r.json(); const content = data.data?.content || data.data?.body_lake || data.data?.body_html || ''; return { slug, title: titles[i], md: window._lakeToMarkdown(content, titles[i]), ok: true }; } catch (e) { if (retry === 2) return { slug, title: titles[i], md: `# ${titles[i]}\n\n(导出失败: ${e.message})\n`, ok: false }; await new Promise(ok => setTimeout(ok, 1000)); } } })); JSON.stringify(results); ``` The surrounding instructions require each result batch to be returned through `evaluate_script` to the agent before the agent writes it to local files. ### Technical Analysis The Skill legitimately needs authenticated read access to the selected Yuque knowledge base to perform an export. However, it uses the browser's authenticated session through `credentials: 'include'`, retrieves complete document bodies, converts them to Markdown, serializes the Markdown into JSON, and returns that JSON to the AI agent. Routing full document bodies through the agent context exceeds the minimum privilege required for a local export. Fetching, conversion, and file writing could instead occur within a trusted local process, while the agent receives only operational metadata such as ...[truncated 2770 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (2)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill instructs the agent to create directories and write many exported documents to local disk, but it does not require an explicit warning or confirmation before modifying the filesystem. In an agent setting, silent bulk file creation can surprise users, overwrite expected contents in a chosen path, or place sensitive exported material on disk without the user's informed consent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The optional image step causes the agent to fetch remote resources and create additional local files, yet the skill does not mandate a clear warning that network downloads will occur and that _assets/ will be populated. This expands the operation from local export to external retrieval, which can consume bandwidth/storage and persist third-party content locally without sufficiently explicit consent.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.