Back to skill

Security audit

Lunar Reminder

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent lunar reminder tool, but its documented cron commands can run unsafe shell input from reminder names.

Install only if you are comfortable with this skill creating and removing OpenClaw cron reminders. Avoid untrusted reminder names, especially names containing shell syntax, until the author adds input validation, safe command invocation, explicit deletion confirmation, timezone configurability, and pinned dependencies.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:113
Finding
Shell Command Injection Through Attacker-Controlled Event Names<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, line 75 and lines 113-118 **Vulnerability Type**: OS command injection **Risk Level**: High ### Vulnerable Code At line 75: ```bash openclaw cron rm "lunar_<事件名>" ``` At lines 113-118: ```bash # 先删除旧任务 openclaw cron rm "lunar_<事件名>" # 创建新任务 openclaw cron add --name "lunar_<事件名>" --cron "<分> <时> <日> <月> *" --message "🔔 农历提醒:<事件名>将在<N>天后到来" --tz "Asia/Shanghai" ``` ### Technical Analysis The workflow instructs the agent to extract an event name from user input and interpolate it directly into shell commands. Although the interpolated values are enclosed in double quotes, double-quoted shell strings still evaluate command substitutions using `$(...)` or backticks. The instructions do not require validation, shell escaping, or execution through an argument-array API with shell interpretation disabled. The affected values appear in both the cron task name and message. Consequently, a malicious event name can alter shell behavior when the deletion or synchronization workflow executes the generated command. ### Attack Path 1. An attacker asks the agent to create a reminder with an event name containing shell command substitution, such as `$(touch /tmp/lunar-pwned)`. 2. The workflow accepts and stores the event name in `data/events.json` without defining any security validation. 3. The attacker requests reminder synchronization or deletion. 4. The agent substitutes the stored event name into an `openclaw cron rm` or `openclaw cron add` shell command. 5. The shell evaluates the command substitution before invoking `openclaw`. 6. The injected command runs with the operating-system permissions of the agent process. ### Impact Assessment Successful exploitation provides arbitrary command execution under the account running the agent. The attacker could read or modify files accessible to that account, steal locally available credentials, disrupt application data, invoke other installed utilities, ...[truncated 217 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Do not construct shell command strings using user-controlled event names or messages. 2. Invoke `openclaw` through a process API that accepts an argument array and explicitly disables shell processing. For example, pass `cron`, `add`, `--name`, and each value as separate arguments. 3. Validate event names before storage and before use. Apply a conservative allowlist covering only necessary letters, numbers, spaces, and selected punctuation. 4. Reject command-substitution syntax, shell metacharacters, control characters, newlines, and null bytes. Validation should be defense in depth rather than the sole protection. 5. Generate an internal task identifier independently of the display name, such as a random UUID or a safely encoded identifier. Use that identifier for cron task names. 6. Treat reminder messages as data and pass them as a separate process argument rather than embedding them into a command string. 7. Revalidate existing records loaded from `data/events.json`, because previously stored values may already contain malicious content. 8. Add security tests covering event names containing `$()`, backticks, quotes, semicolons, newlines, option-like prefixes, and Unicode edge cases. ]]>

T08 · Insecure Dependencies

Note
Location
package.json:6
Finding
Non-Deterministic Third-Party Dependency Installation<![CDATA[ ## Vulnerability Details **File Location**: `package.json`, lines 6-8; `SKILL.md`, lines 8-12 **Vulnerability Type**: Unpinned third-party dependency and missing lockfile **Risk Level**: Low ### Vulnerable Code From `package.json`, lines 6-8: ```json "dependencies": { "lunar-javascript": "^1.6.12" } ``` From `SKILL.md`, lines 8-12: ```yaml install: - id: lunar-javascript kind: node package: lunar-javascript label: 安装 lunar-javascript ``` ### Technical Analysis The package uses the caret range `^1.6.12`, which permits installation of later compatible releases rather than an exact reviewed artifact. The project contains no package lockfile or integrity information. The skill metadata also requests installation by package name without an exact version. As a result, separate installations can resolve to different dependency releases. If a future allowed release is compromised, maliciously modified, or otherwise unsafe, installation may introduce unreviewed code. Node package installation may also execute package lifecycle scripts unless those scripts are disabled. No evidence in the reviewed files establishes that the current `lunar-javascript` package is malicious. This finding concerns avoidable supply-chain exposure and non-reproducible dependency resolution. ### Attack Path 1. A future release permitted by `^1.6.12` is published with malicious code or a malicious lifecycle script, whether through maintainer compromise or registry-account takeover. 2. A user installs or reinstalls the skill after that release becomes available. 3. Without a lockfile or exact version constraint, the package manager resolves the newer release. 4. Malicious lifecycle code may execute during installation, or malicious library code may execute when the documented Node conversion commands load the package. 5. The payload runs with the permissions of the user installing or invoking the skill. ### Impact Assessment The potential scope is arbitrary c ...[truncated 398 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin `lunar-javascript` to an exact reviewed version instead of using a caret range. 2. Add and commit a package lockfile containing resolved versions and integrity hashes. 3. Use deterministic installation, such as `npm ci`, rather than allowing dependency resolution to change between installations. 4. Specify the reviewed version explicitly in the skill installation metadata where the platform supports version-qualified package names. 5. Review dependency release notes and package provenance before updating the pinned version. 6. Disable package lifecycle scripts during installation where operationally feasible, and enable them only for packages that have been reviewed and require them. 7. Integrate dependency vulnerability, provenance, and integrity checks into the release process. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (6)

Description-Behavior Mismatch

Medium
Confidence
91% confidence
Finding
The manifest presents the skill as a lunar reminder/date-conversion utility, but the instructions also direct the agent to delete reminder data and manage cron jobs. That mismatch expands the effective privilege/behavior surface beyond what a reviewer or user would expect, increasing the chance of unsafe execution or unauthorized task scheduling/deletion. In this context, the hidden operational capability is more dangerous because cron manipulation affects persistent system behavior, not just local date conversion.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The deletion flow removes both stored reminder data and a cron job without any confirmation or warning step. This creates a straightforward risk of accidental or manipulated destructive actions, especially if the agent misparses the target event name or the user did not intend to remove persistent scheduled behavior.

Context-Inappropriate Capability

Medium
Confidence
87% confidence
Finding
The skill documentation instructs the agent to perform system cron management, which is a materially more sensitive capability than simple reminder bookkeeping or lunar date conversion. Allowing a reminder skill to create and remove scheduled jobs can be abused to establish persistence, alter future agent behavior, or delete legitimate scheduled tasks if names collide or inputs are mishandled.

Natural-Language Policy Violations

Medium
Confidence
97% confidence
Finding
Hardcoding the cron time zone to Asia/Shanghai without user opt-in can cause reminders to fire at incorrect times for users in other locales. While not typically a code-execution issue, it can still create integrity and reliability problems for time-sensitive reminders and may surprise users by silently imposing an unintended locale assumption.

Natural-Language Policy Violations

Low
Confidence
92% confidence
Finding
The skill hard-codes the timezone to Asia/Shanghai, which can cause reminders and date conversions to be wrong for users in other regions if their actual locale/timezone differs. In a lunar calendar reminder skill, timezone directly affects reminder timing and potentially date conversion boundaries, so forced configuration increases the chance of incorrect or unexpected behavior.

Unpinned Dependencies

Low
Category
Supply Chain
Content
"description": "按农历日期设置提醒(生日、节日等)",
  "private": true,
  "dependencies": {
    "lunar-javascript": "^1.6.12"
  }
}
Confidence
92% confidence
Finding
The dependency is version-ranged with a caret (^1.6.12), so installs may resolve to newer patch/minor releases without explicit review. This creates a supply-chain risk because a compromised or breaking upstream release could be pulled into the skill unexpectedly, even though the package itself appears ordinary and the skill context does not increase the danger beyond normal dependency risk.

Static analysis

No suspicious patterns detected.