Back to skill

Security audit

claw-lark Patches

Security checks for vulnerabilities and agentic risk

Overview

This skill openly patches a local Lark plugin, but its auto-apply script makes persistent installed-code changes and unsafely embeds environment values into JavaScript source.

Review the patch script before installing, run it only from a clean environment, set BOT_OPEN_ID and BOT_NAME to simple expected values, and keep a backup or versioned copy of the claw-lark dist files so the plugin can be restored if the patch breaks or captures unsafe input.

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

Error
Location
scripts/apply-patches.sh:145
Finding

JavaScript Source Injection Through Unescaped Environment Variables

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (4)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
84% confidence
Finding

The skill includes operational steps that rely on environment variables such as BOT_OPEN_ID and BOT_NAME, but it declares no explicit tool scope or permissions metadata. That mismatch is risky because it obscures the skill's runtime assumptions and can lead an agent or operator to expose environment data or execute the skill with broader capabilities than intended.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill tells the user to run an auto-apply shell script immediately, while the document itself states that it patches compiled plugin dist files directly. Encouraging execution of a modification script without an inline warning, review guidance, backup steps, or integrity checks is dangerous because it can cause silent code changes in production-facing plugin files and normalize running unreviewed scripts.

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 · references/patch-details.md (reported line 15)May include surrounding context.

md
- ✅ Exact match `m.id.open_id === BOT_OPEN_ID`

### Thread Reply
- ❌ `client.im.message.create()` + `root_id` → only associates, doesn't create thread
- ❌ `thread_id` as `receive_id` → 400 error
- ✅ `client.im.message.reply()` + `reply_in_thread: true` → creates thread

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

Line L26 specifies the bot name in Chinese without any indication that language choice is configurable or user-selected. This can violate language/locale policy expectations when a skill implicitly fixes output or identity to a specific language without opt-in.

Content

No source excerpt is available for this finding.