Back to skill

Security audit

Workspace Heartbeat Integration

Security checks for vulnerabilities and agentic risk

Overview

The skill's heartbeat logging purpose is mostly coherent, but its installer can publish the package with the user's ClawHub credentials without a separate approval step.

Review install.sh before running it. Install only if you are comfortable with persistent workspace memory logs and heartbeat state updates, and avoid running the installer while authenticated to ClawHub unless you intentionally want it to publish this package. Back up any existing workspace-heartbeat-integration config first.

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
install.sh:25
Finding
Installation Script Publishes the Project Using Existing ClawHub Credentials<![CDATA[ ## Vulnerability Details **File Location**: `install.sh:25-29` **Vulnerability Type**: Unauthorized use of authenticated publishing access **Risk Level**: Medium ```bash echo "📦 Publishing skill to ClawHub..." if command -v clawhub &> /dev/null; then cd "$SKILL_DIR" clawhub publish . --slug workspace-heartbeat-integration --name "Workspace Heartbeat Integration" --version 1.0.0 --changelog "自动同步 HEARTBEAT 和 self-improving 状态" echo "✅ Skill published successfully" ``` ### Technical Analysis The installation script invokes `clawhub publish .` whenever the `clawhub` executable is present. This operation uses the current user's existing ClawHub authentication and submits the project directory to an external registry. Publishing is not required to install the local command, and it is materially different from the documented installation workflow. The script does not request confirmation, require an explicit publishing option, or verify that the user intends to release this directory. As a result, running what appears to be a local installation procedure can exercise the user's remote publishing privileges. The uploaded scope is the directory represented by `.` after changing into `$SKILL_DIR`. Any private files subsequently added beneath that directory could therefore be included, subject to the behavior and exclusion rules of the ClawHub CLI. ### Attack Path 1. A user has the `clawhub` CLI installed and authenticated with permission to publish packages. 2. The user obtains the project and runs `install.sh`, expecting it to install the local heartbeat integration. 3. The script detects the `clawhub` executable without checking whether publication was requested. 4. It changes into the skill directory and executes `clawhub publish .` using the user's existing credentials. 5. The project contents are submitted to ClawHub under the specified slug and version. 6. Depending on registry and account visibility settings, project files may become ...[truncated 833 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove all publication behavior from `install.sh`; installation should perform only local setup. 2. Move `clawhub publish` into a separate release script intended for maintainers. 3. If publication must remain available, require an explicit option such as `--publish` and display the target slug, version, and directory before proceeding. 4. Require interactive confirmation unless a separate non-interactive release flag is supplied. 5. Inspect and display the upload manifest before publishing, and maintain an explicit exclusion file for secrets, configuration files, test artifacts, and local metadata. 6. Use dedicated release credentials with the minimum required permissions rather than implicitly reusing the operator's general authenticated session. 7. Add an automated test confirming that the default installation path never performs network publication or invokes `clawhub publish`. ]]>
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (8)

Vague Triggers

Medium
Confidence
95% confidence
Finding
The trigger section is broad enough that the skill could be invoked during many routine workspace activities, including generic heartbeat checks, memory syncing, and task board updates. Because the skill performs write-oriented synchronization and logging actions, ambiguous invocation increases the chance of unintended file modifications, overcollection of work context, or execution in situations where the user did not explicitly intend persistence.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The installer unconditionally writes a config file to ~/.config/workspace-heartbeat-integration/config.json using shell redirection, which will overwrite any existing user configuration without prompting or backing it up. This is not code execution, but it can destroy prior settings and silently change behavior of the installed tool, making it a real safety/quality issue.

Vague Triggers

Medium
Confidence
88% confidence
Finding
The description claims the skill will automatically synchronize HEARTBEAT.md with a self-improving heartbeat-state, record work results, and update long-term memory, but it does not define clear triggers, scope, consent boundaries, or what data is persisted. In an agent skill, vague automation around synchronization and memory updates can lead to over-collection, unintended persistence of sensitive workspace data, and actions occurring outside user expectations.

Natural-Language Policy Violations

Medium
Confidence
96% confidence
Finding
The default log template written by the skill includes Chinese headings and text, which imposes a specific language on generated user-facing content. The file does not offer a language choice or document this as a justified locale-specific constraint.

Natural-Language Policy Violations

Low
Confidence
87% confidence
Finding
The setup and workflow instructions switch into Chinese for routine steps and examples, while the rest of the document is in English. This imposes a specific language for part of the operational guidance without stating that the skill is Chinese-language-oriented or offering an opt-in choice.

Natural-Language Policy Violations

Low
Confidence
95% confidence
Finding
The changelog string passed to the publish command contains Chinese text, which forces a specific language in user-visible metadata. There is no indication that the skill is region-specific or that users can choose their preferred language.

Natural-Language Policy Violations

Low
Confidence
78% confidence
Finding
The manifest description is written only in Chinese, which may impose a language choice on users without offering an alternative or documenting a locale-specific purpose. Under the language/locale policy, skills should not force a specific language unless the constraint is justified or users can opt in.

Natural-Language Policy Violations

Low
Confidence
81% confidence
Finding
This code checks specifically for the Chinese phrase "学习日志", which encodes a language expectation in the skill's behavior. Under the policy rule for natural-language violations, forcing a specific language without opt-in or clear regional justification can be problematic.

Static analysis

No suspicious patterns detected.