Back to skill

Security audit

Discord社区管理

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a Discord management guide, but it asks for broad local read/write/command tools and includes mismatched generic instructions that users should review carefully.

Install only if you intend to use it for Discord account, guild, permission, entitlement, or role-connection management through ClawLink. Confirm every Discord-changing action, avoid granting local file or shell access unless the host platform requires it and you understand why, and do not run it with administrator privileges for routine failures.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:27
Finding

Excessive Local Tool Permissions Violate Least Privilege

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 27–30
Vulnerability Type: Excessive filesystem and command-execution permissions
Risk Level: Medium

yaml
tools:
- read
- exec
- write

Related declarations at lines 343–345 advertise generic file processing and system-command execution. The troubleshooting guidance at line 391 also recommends running with administrator privileges when filesystem permissions are insufficient.

Technical Analysis

The Skill's stated purpose is Discord community administration through OAuth and named ClawLink API tools. Arbitrary local file reading, file writing, and shell execution are not necessary for those operations. Granting these generic capabilities violates the principle of least privilege and unnecessarily exposes the host environment to agent-generated actions.

The document does not define filesystem path restrictions, a command allowlist, argument validation, or enforceable sandbox boundaries. Consequently, attacker-controlled or malformed natural-language input could potentially influence the Agent to use these permissions outside the legitimate Discord-management scope. The recommendation to run with administrator privileges could further amplify the impact rather than resolving access failures safely.

Attack Path

  1. A user or attacker submits crafted input to a session in which this Skill is active.
  2. The input induces the Agent to treat generic file access or command execution as part of the requested workflow.
  3. Because the Skill declares read, write, and exec, the Agent may read local data, modify accessible files, or execute attacker-influenced commands.
  4. If an operation fails because of insufficient permissions, the documented troubleshooting advice may lead the operator to rerun the Agent with administrator privileges.
  5. The same operation may then affect privileged files, system configuration, or other users' resources.

E ...[truncated 789 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove read, write, and exec from the declared tools unless a specific, documented Discord workflow strictly requires them.
  2. Restrict the Skill to explicitly named ClawLink and Discord API tools with narrowly validated parameters.
  3. If local file access is unavoidable, constrain it to a dedicated working directory, reject path traversal, prohibit symbolic-link escapes, and use read-only access wherever possible.
  4. If command execution is unavoidable, use a fixed command allowlist, pass arguments without shell interpolation, reject metacharacters, impose timeouts, and run in an isolated low-privilege sandbox.
  5. Remove the recommendation to run as administrator. On permission failure, the Skill should stop safely, explain the required resource, and request only the minimum necessary permission.
  6. Preserve explicit confirmation for all state-changing Discord operations and add confirmation for any local write or process execution.
  7. Document enforceable sandbox boundaries and add tests verifying that Discord-related input cannot trigger arbitrary filesystem or shell operations.
Vulnerability Patterns
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (8)

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The description at L011-L013 says to use the skill when database operations, SQL queries, and data storage management are needed, which contradicts the rest of the file describing Discord OAuth, guilds, permissions, entitlements, and role connections. This is an active intent mismatch in the documentation, not just missing detail.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The description says the skill should be used when '需要数据库操作、SQL查询、数据存储管理时使用', which is unrelated to the Discord-focused purpose and is broad enough to overlap with many general requests. This creates ambiguity about when the skill should activate and lacks clear trigger constraints or exclusions.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The activation wording mixes Chinese and English and describes broad applicability to developers, enterprise teams, and automation workflows without defining precise trigger phrases or negative examples. For a manifest/markdown description, this can cause unintended invocation outside the intended Discord-management context.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The description states '支持中文交互,无需复杂配置即开即用', which indicates a Chinese-language interaction policy but does not mention any opt-in or alternative language support. The policy requires flagging language or locale constraints when they are forced without user choice or clear justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The markdown headline says the skill provides '中文交互', presenting a specific language as the interaction mode without indicating user choice. This is a natural-language policy issue because it can constrain users to a locale/language without explicit opt-in.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

Line L053 lists '多渠道消息批量发送' as a supported paid capability. This directly conflicts with L264, which states the skill cannot send messages or manage channel content and is focused on identity and permission management, creating a clear documentation-to-intent contradiction.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

L286 classifies the skill as 'MD+EXEC', and L345 advertises command execution in a sandbox, while L410-L411 later state the skill is 'MD(纯Markdown指令,通过自然语言驱动Agent完成操作)'. These statements actively contradict each other about whether the skill executes commands or is documentation-only.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

L343 states the skill supports reading, parsing, and writing multiple file formats, but the substantive content of the document defines a Discord community management workflow and L410-L411 describe a Markdown-driven skill. This appears to be copied generic documentation that conflicts with the stated intent.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.