Back to skill

Security audit

emotion-regulation-sprints

Security checks for vulnerabilities and agentic risk

Overview

This is a Chinese emotion-regulation self-help skill with no hidden runtime code, but it needs Review because it can activate broadly in mental-health contexts and does not clearly handle crisis situations.

Review this carefully before installing if users may be in acute distress. It should add clear crisis guidance, confirm intent before starting exercises from broad triggers, and pin the publishing CLI version or otherwise harden the publish workflow. The inspected runtime skill does not contain hidden code or credential access.

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

T08 · Insecure Dependencies

Error
Location
.github/workflows/clawhub-publish.yml:17
Finding

Unpinned ClawHub CLI Executes with a Publishing Credential

Content
View full analysis

Vulnerability Details

File Location: .github/workflows/clawhub-publish.yml, lines 17–26
Vulnerability Type: Unpinned third-party dependency in a privileged publishing workflow
Risk Level: High

Vulnerable Code

yaml
    - name: Install ClawHub CLI
      run: npm install -g clawhub@latest

    - name: Publish to ClawHub
      env:
        CLAWHUB_TOKEN: ${{ secrets.CLAWHUB_TOKEN }}
      run: |
        mkdir -p "$HOME/.config/clawhub"
        echo "{\"registry\":\"https://clawhub.ai\",\"token\":\"$CLAWHUB_TOKEN\"}" > "$HOME/.config/clawhub/config.json"
        clawhub skill publish . --owner 987618350-cmd

Technical Analysis

The workflow installs clawhub@latest, whose effective version can change between otherwise identical workflow executions. Consequently, the repository does not define or review the exact code that will run.

The globally installed CLI is subsequently invoked in a step where CLAWHUB_TOKEN is available both as an environment variable and in $HOME/.config/clawhub/config.json. A malicious or compromised future release of the npm package could therefore read and exfiltrate that credential when clawhub skill publish executes. npm installation scripts associated with the package would also execute during the installation step, although the publishing token is not introduced until the following step.

This is a supply-chain risk rather than evidence that the current ClawHub package is malicious. The vulnerable condition is the workflow's trust in an unreviewed, mutable dependency version.

Attack Path

  1. An attacker compromises the clawhub npm package, its publisher account, or its release process.
  2. The attacker publishes a malicious version that becomes the version resolved by the latest distribution tag.
  3. A push to main or a manual workflow dispatch starts the publishing job.
  4. npm install -g clawhub@latest installs the attacker-controlled ...[truncated 1176 chars]
Remediation
View remediation

Remediation Suggestions

  1. Replace clawhub@latest with a specific, reviewed version:
    yaml
    - name: Install ClawHub CLI
      run: npm install -g clawhub@1.2.3
    
  2. Prefer a repository-managed dependency with a committed lockfile and install it using npm ci, so the exact resolved package and transitive dependency versions are reproducible.
  3. Review the selected package version, its transitive dependencies, and any lifecycle scripts before approving upgrades. Use automated dependency updates that require review rather than a mutable distribution tag.
  4. If supported by the package, suppress unnecessary lifecycle scripts with --ignore-scripts; verify that doing so does not prevent legitimate installation.
  5. Scope CLAWHUB_TOKEN to publishing only the intended skill and owner. Use a short-lived or automatically rotated credential where supported.
  6. Rotate the current token if there is evidence that an untrusted CLI release has run with it.
  7. Avoid persisting the token to a plaintext file when the CLI supports environment-only authentication. If a file is required, set restrictive permissions and remove it immediately after publication:
    bash
    install -d -m 700 "$HOME/.config/clawhub"
    umask 077
    printf '%s\n' "{\"registry\":\"https://clawhub.ai\",\"token\":\"$CLAWHUB_TOKEN\"}" \
      > "$HOME/.config/clawhub/config.json"
    trap 'rm -f "$HOME/.config/clawhub/config.json"' EXIT
    
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 (9)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

All user-facing instructions, feature descriptions, and trigger phrases are written in Chinese, which effectively forces a specific language for use of the skill. The README does not offer an opt-in language choice or explain that the skill is intentionally limited to a Chinese-speaking audience.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README positions the skill as rapid emotional crisis intervention but does not state that it is not a substitute for professional care, does not define scope limits, and does not provide escalation guidance for self-harm, suicidality, panic, or other acute risk states. In this context, omission of warnings is dangerous because users may rely on the skill during a real crisis and delay seeking appropriate support.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The trigger phrases are broad, common expressions such as '心情很差' and '很难受', which can cause the skill to activate in many ordinary or ambiguous situations. In a mental-health-adjacent skill, over-triggering increases the chance of unsolicited intervention, misrouting user intent, or responding to users in distress without sufficient triage or context.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The trigger list contains common emotional phrases such as '焦虑', '想哭', and '心烦' that can appear in ordinary conversation, making accidental activation likely. In a mental-health skill, unintended activation is risky because users may receive coping guidance when they did not request it, or the assistant may route sensitive conversations into lightweight self-help content inappropriately.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill provides mental-health coping techniques but does not clearly state that it is not suitable for crisis situations such as self-harm, suicidality, or acute psychiatric distress. This is dangerous because distressed users may rely on short self-help exercises instead of seeking urgent professional or emergency support, leading to delayed intervention in high-risk situations.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The description, triggers, and all instructional content are written exclusively in Chinese, which imposes a language constraint on users. The file does not indicate that the skill is intentionally region-specific or provide an opt-in choice for language/locale.

Content

No source excerpt is available for this finding.

Overly Broad Trigger

Low
Category
Trigger Abuse
Confidence
93% confidence
Finding

The trigger '焦虑' is a short, generic term that may appear in many contexts without an actual request to invoke the skill. In this domain, over-triggering is more concerning because users discussing anxiety may instead need tailored support, disambiguation, or crisis screening before being given generic self-help content.

Content

No source excerpt is available for this finding.

Overly Broad Trigger

Low
Category
Trigger Abuse
Confidence
92% confidence
Finding

The trigger '想哭' is broad and conversational, so it can match many ordinary statements not intended to start the skill. Because the skill addresses emotional distress, accidental activation may interrupt or mis-handle sensitive user conversations and provide insufficient support for more serious underlying conditions.

Content

No source excerpt is available for this finding.

Overly Broad Trigger

Low
Category
Trigger Abuse
Confidence
92% confidence
Finding

The trigger '心烦' is a common everyday expression and is too ambiguous to safely launch a mental-health coping skill on its own. In context, the main risk is unintended activation and inappropriate routing of emotionally sensitive conversations into generic exercises without verifying user intent or severity.

Content

No source excerpt is available for this finding.