Back to skill

Security audit

Yq Skill Sync

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent ClaWHub synchronization utility, but it asks for high-impact credential and bulk publishing authority with automatic triggers and weak user control.

Install only if you intend this skill to use the configured ClaWHub account to update and synchronize local skills. Before enabling it, change it to use a protected, pinned CLI path, avoid reading the token file directly, require a dry run and explicit confirmation before any sync or publish, restrict synchronization to approved skill directories, and leave the cron disabled unless recurring publishing is truly intended.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Tool Hijacking and SpoofingModifies or replaces tools so legitimate-looking calls execute attacker logic
  • 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 (3)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
SKILL.md:25
Finding

Direct Access to a Root-Owned Authentication Token File

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 25-34
Vulnerability Type: Sensitive credential access beyond least-privilege requirements
Risk Level: High

Relevant snippet translated from the source documentation:

markdown
- **Token file:** `/root/.config/clawhub/config.json`
- **ClaWHub CLI:** `/root/.npm/_npx/ce38bf0ef4fd88c6/node_modules/.bin/clawhub`
- **Workspace:** `/workspace`
- **Account:** tianheihei002

### Execution Process

1. Read `/root/.config/clawhub/config.json` to confirm that the token is valid.

Technical Analysis

The Skill explicitly instructs the agent to read an authentication configuration owned by the root account. Reading the token contents is unnecessary for checking authentication status because the documented clawhub whoami operation can validate the active session through its exit status and sanitized output.

Loading a root-owned credential into an agent's context unnecessarily expands the credential's exposure boundary. Prompt injection, unsafe logging, diagnostic output, or another malicious Skill active in the same context could capture the token. The issue is especially significant if the Skill runs with root privileges, as suggested by the configured paths.

Attack Path

  1. A user or scheduled agent run activates the synchronization Skill.
  2. The agent follows the instruction to open /root/.config/clawhub/config.json.
  3. The ClaWHub token is loaded into the agent or tool execution context.
  4. A malicious instruction, compromised tool, or unsafe log captures the token.
  5. The attacker uses the token to authenticate to ClaWHub.
  6. The attacker performs registry operations permitted to the associated account.

Impact Assessment

Exploitation could expose the ClaWHub authentication token for account tianheihei002. The resulting privileges depend on the token's server-side permissions, but may include reading private registry data, ...[truncated 272 chars]

Remediation
View remediation

Remediation Suggestions

  • Remove the instruction to read or parse /root/.config/clawhub/config.json.
  • Validate authentication exclusively through clawhub whoami, using its exit status and sanitized output.
  • Run the Skill under a dedicated, unprivileged service account rather than root.
  • Store the token in an operating-system credential store or protected secret manager.
  • Scope the token to the minimum required registry permissions and repositories.
  • Ensure commands and reports never print environment variables, request headers, configuration contents, or token values.
  • Rotate the existing token if it may previously have been exposed to agent context or logs.

T05 · Unauthorized Access and Privilege Escalation

Error
Location
SKILL.md:36
Finding

Unrestricted Workspace-Wide Synchronization Can Publish Private Skill Content

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 36-38
Vulnerability Type: Uncontrolled bulk publication of local workspace content
Risk Level: High

Relevant snippet translated from the source documentation:

markdown
3. Scan every `SKILL.md` under `/workspace/skills/` and extract its version.
4. For Skills with a version API, such as mxai, call the API to check them.
5. Run `clawhub sync --workdir /workspace` to synchronize online.

Technical Analysis

The Skill scans all local Skills and then synchronizes the entire /workspace directory without documenting an allowlist, exclusion policy, dry-run review, destination visibility check, or per-publication user confirmation.

The scope of clawhub sync --workdir /workspace is broader than the version metadata needed for update checking. If the workspace contains private Skills, unpublished instructions, credentials, internal endpoints, or other sensitive files accepted by the synchronization client, those materials may be transferred to ClaWHub. The presence of a security-vetting table does not mitigate this issue because no enforceable pre-synchronization validation workflow is defined.

Attack Path

  1. Sensitive or private Skill content is present under /workspace.
  2. An attacker supplies a malicious Skill containing sensitive-looking bait, embedded data, or content intended for unauthorized publication, or ordinary private content already exists there.
  3. A trigger phrase or scheduled run activates the synchronization process.
  4. The Skill enumerates all SKILL.md files without restricting the operation to approved Skills.
  5. clawhub sync --workdir /workspace uploads or publishes eligible workspace content.
  6. Unauthorized users obtain the synchronized content from the remote service, subject to the destination's visibility and access controls.

Impact Assessment

The operation can affect all synchronization-eligible co ...[truncated 385 chars]

Remediation
View remediation

Remediation Suggestions

  • Replace workspace-wide synchronization with an explicit allowlist of approved Skill directories.
  • Separate update checking from publishing; version inspection must not automatically trigger upload.
  • Use a dry-run mode and display the exact local files, remote destination, visibility, and proposed changes.
  • Require explicit user confirmation immediately before every publication or remote modification.
  • Exclude private directories, secret files, dotfiles, backups, generated files, and unrelated workspace content.
  • Scan proposed upload content for tokens, credentials, private keys, internal endpoints, and other sensitive data.
  • Enforce repository-side access controls and default new publications to private visibility.
  • Record a sanitized audit log containing file names and checksums, but never file secrets.

T07 · Tool Hijacking and Spoofing

Warning
Location
SKILL.md:26
Finding

Mutable npm Cache Path Is Treated as a Trusted ClaWHub Executable

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 26
Vulnerability Type: Executable spoofing through a mutable package-cache path
Risk Level: Medium

Relevant snippet translated from the source documentation:

markdown
- **ClaWHub CLI:** `/root/.npm/_npx/ce38bf0ef4fd88c6/node_modules/.bin/clawhub`

Technical Analysis

The Skill identifies a binary inside an npm _npx cache as the authoritative ClaWHub CLI. Package-cache paths are installation artifacts rather than stable, protected trust anchors. If another process, package installation, or attacker can replace the target executable or its linked JavaScript entry point, subsequent legitimate-looking ClaWHub calls will execute the replacement.

The risk is amplified because the same Skill uses ClaWHub authentication and operates on the entire workspace. A spoofed CLI could read credentials available to its process, alter synchronization behavior, modify workspace content, or transmit data to an attacker-controlled service.

The project does not contain code that replaces the executable, so this finding concerns the unsafe trust model and resulting hijacking opportunity rather than an embedded malicious payload.

Attack Path

  1. An attacker gains write access to the referenced npm cache directory, its executable link, or the linked package files.
  2. The attacker replaces the clawhub entry point with a malicious implementation.
  3. The user activates the Skill or its scheduled workflow.
  4. The agent invokes the hard-coded executable while believing it is the legitimate ClaWHub CLI.
  5. The malicious executable inherits the process's available authentication and filesystem access.
  6. It steals credentials, changes local content, falsifies command output, or redirects synchronization data.

Impact Assessment

Successful exploitation grants the malicious executable the same operating-system privileges and environment access as the agent ...[truncated 275 chars]

Remediation
View remediation

Remediation Suggestions

  • Do not execute security-sensitive tools directly from an _npx cache directory.
  • Install a version-pinned ClaWHub CLI in a protected system or application-specific directory.
  • Verify the package source, lockfile, cryptographic integrity, and expected executable checksum before use.
  • Restrict write permissions so only the trusted administrator or deployment process can replace the executable.
  • Resolve symbolic links and verify that the final executable remains inside the approved installation directory.
  • Run the CLI as a dedicated unprivileged account with access only to approved Skills.
  • Pin the supported CLI version and use a controlled update process that revalidates integrity before activation.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (2)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger phrases are broad and overlap with normal user requests about checking or updating skills, which increases the chance of accidental activation. Because this skill performs state-changing actions such as reading a local token-backed config and synchronizing local and remote skill state, unintended invocation could cause unauthorized or surprising updates.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill description does not clearly warn that it reads /root/.config/clawhub/config.json and uses those credentials to perform synchronization and update operations that affect both local workspace contents and remote ClaWHub state. This weakens informed consent and makes accidental privilege use more likely, especially when combined with automatic or broad triggers.

Content

No source excerpt is available for this finding.