Back to skill

Security audit

Timer Build Monitor

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent timer helper, but it delegates full conversation context to delayed subagents and its cancel command does not actually stop those subagents.

Review before installing. Avoid putting secrets or unrelated sensitive details in timer requests, and do not rely on this skill's cancel command to stop delayed subagent work unless the implementation is changed to terminate the actual session. Prefer a version that passes only minimal task context to subagents and clearly documents local timer metadata retention.

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

Warning
Location
scripts/timer.sh:85
Finding

Timer Cancellation Does Not Terminate the Associated Subagent

Content
View full analysis

Vulnerability Details

File Location: scripts/timer.sh:85-88
Supporting Location: scripts/state.sh:64-70, SKILL.md:78-79
Vulnerability Type: Incomplete cancellation and unsafe lifecycle management
Risk Level: Medium

Vulnerable Code

The cancellation command only delegates to the state-management script:

bash
  cancel)
    name="${1:?Usage: timer.sh cancel <timer-name>}"
    "$STATE_SCRIPT" cancel "$name"
    ;;

The state-management script merely updates the local JSON record:

bash
  cancel)
    name="${1:?Usage: state.sh cancel <timer-name>}"
    _read_state | jq --arg name "$name" --arg cancelledAt "$(date -u +%Y-%m-%dT%H:%M:%SZ)" '
      .timers[$name].status = "cancelled"
      | .timers[$name].cancelledAt = $cancelledAt
    ' | _write_state
    echo "Timer '$name' cancelled."
    ;;

This conflicts with the documented behavior in SKILL.md:

markdown
### `$timer cancel <name>`
Kill the subagent session and mark timer as cancelled.

Technical Analysis

The implementation treats cancellation as a state transition rather than an execution-control operation. It does not store the spawned subagent's session identifier, invoke a session termination API, or verify that execution has stopped.

Consequently, the local state can report that a timer is cancelled while the associated subagent continues sleeping or executing its assigned task. This is a time-of-check/time-of-use lifecycle inconsistency and violates the documented cancellation guarantee.

Attack Path

  1. A user creates a timer.
  2. The host Agent reads the emitted task information and spawns a subagent.
  3. The timer state is stored locally without a usable subagent session identifier.
  4. The user invokes timer.sh cancel &lt;timer-name&gt;.
  5. The script changes the timer's JSON status to cancelled.
  6. No session-termination operation occurs.
  7. The subagent remains active and may execute the delayed task or send results despite the appare ...[truncated 550 chars]
Remediation
View remediation

Remediation Suggestions

  1. Persist the spawned subagent's verified session identifier in each timer record.
  2. On cancellation, retrieve that identifier and invoke the host platform's supported session-termination API.
  3. Mark the timer as cancelled only after termination is confirmed.
  4. If termination fails, preserve an explicit state such as cancellation_failed and return a nonzero exit status.
  5. Make cancellation idempotent and safely handle completed, missing, and already-cancelled sessions.
  6. Reconcile state against the actual subagent status before displaying a timer as cancelled.
  7. Add integration tests verifying that a cancelled timer cannot subsequently execute or report completion.

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:88
Finding

Full Conversation Context Is Unnecessarily Delegated to Timer Subagents

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:88
Vulnerability Type: Excessive delegation of potentially sensitive context
Risk Level: Medium

Vulnerable Instruction

markdown
- Subagent receives the full task description + current context

Technical Analysis

A timer subagent performing a delayed build-status check generally requires only the normalized task, delay, target identifier, and narrowly scoped credentials or tool permissions. Supplying the entire current conversation context violates least-privilege and data-minimization principles.

The current context may contain unrelated source code, internal project details, user messages, tokens, credentials, or operational instructions. Delegating all of it expands the data and authority exposed to an additional execution context without demonstrating that such access is necessary.

The reviewed shell scripts do not directly perform this delegation; the risk originates from the Skill instruction that directs the host Agent to provide the context when spawning the subagent.

Attack Path

  1. Sensitive or unrelated information is present in the current Agent conversation.
  2. The user creates a timer for a narrow task such as checking build status.
  3. Following the Skill instruction, the host Agent spawns a subagent with the full task description and current context.
  4. The spawned subagent gains access to information unrelated to the timer operation.
  5. That information may influence the subagent's behavior or become exposed through its tools, output, logs, or completion message.

Impact Assessment

The affected scope includes all information contained in the conversation context supplied at spawn time. The subagent may gain visibility into data beyond what is required for the timer task and may exercise any tools or permissions available in its isolated execution environment.

No direct exfiltration mechanism was identified in the reviewed files. The confirmed issue is th ...[truncated 121 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove the instruction to pass the complete current context.
  2. Construct a minimal subagent payload containing only the normalized task, timer identifier, delay, target build identifier, and required output format.
  3. Provide credentials through narrowly scoped platform facilities rather than embedding them in conversation context.
  4. Require explicit user approval before forwarding any additional contextual information.
  5. Apply tool allowlists and least-privilege permissions to spawned subagents.
  6. Redact secrets and unrelated conversation content before delegation.
  7. Document precisely which fields are sent to a subagent and add tests confirming that unrelated context is excluded.
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 (3)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 30)May include surrounding context.

md
- `SKILL.md` — This file. Usage + workflow.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The markdown explicitly states that timer state is stored as a JSON file in ~/.openclaw/timers/, which is a user-data-affecting behavior. The document does not provide any warning or disclosure about local persistence, retention, or that timer metadata such as task descriptions and session keys will be written to disk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

This shell script writes timer state by piping JSON into the state management script's upsert operation, which is a file-affecting action for a code file. Although the script prints a success message afterward, there is no prior user-facing warning, confirmation, or inline disclosure here that setting a timer persists state.

Content

No source excerpt is available for this finding.