Back to skill

Security audit

ClawHub发布助手

Security checks for vulnerabilities and agentic risk

Overview

This ClawHub publishing helper is coherent, but it needs review because it handles publishing credentials, can release skills, and suggests running project-local publish scripts without inspection.

Install only if you intend this agent to help publish ClawHub skills. Before use, require explicit confirmation of the exact skill, version, changelog, and account, avoid pasting real tokens into command lines or logs, and do not run a target repository's publish.sh unless you have inspected and trust it.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:233
Finding
Authentication Token Exposure Through Command-Line Arguments## Vulnerability Details **File Location**: `SKILL.md`, line 233 **Vulnerability Type**: Credential exposure through process arguments and command history **Risk Level**: Medium **Vulnerable code snippet**: ```bash clawhub login --token "<token>" --no-browser ``` ### Technical Analysis The documented login method passes the ClawHub authentication token directly as a command-line argument. After replacing the placeholder with a real credential, the token may become accessible through: - Shell history files - Process-listing and process-monitoring utilities - Terminal session recordings - CI/CD build logs - Command auditing or endpoint-monitoring systems - Wrapper scripts that record invoked arguments The document also states that the authenticated token is retained in a ClawHub configuration file, but it does not prescribe restrictive file permissions or other credential-storage controls. ### Attack Path 1. A user replaces the placeholder with a valid ClawHub publishing token. 2. The user executes the documented login command. 3. The command or its arguments are retained in shell history, process telemetry, terminal logs, or automation output. 4. A local user, monitoring process, or party with access to those logs extracts the token. 5. The attacker authenticates to ClawHub using the recovered credential. 6. The attacker performs any operation permitted by the compromised token, potentially including unauthorized publication of Skill versions. ### Impact Assessment Successful exploitation compromises the ClawHub privileges associated with the exposed token. Depending on the token's permissions, an attacker could impersonate the publisher, publish unauthorized or malicious updates, modify accessible Skill releases, or otherwise operate against resources owned by the affected account. This issue does not directly grant operating-system privilege escalation. Its scope is primarily the ClawHub accou ...[truncated 52 chars]
Remediation
## Remediation Suggestions - Prefer the ClawHub CLI's interactive authentication flow so the secret is not included in the command line. - If supported, provide the token through standard input, an operating-system credential manager, or a protected credential file. - If environment-variable authentication is unavoidable, ensure the variable is masked in CI/CD systems and never printed or passed through verbose tracing. - Explicitly warn users not to place real credentials in shell history, scripts, screenshots, issue reports, or build logs. - Disable command echoing and tracing around authentication operations. - Require restrictive permissions on the ClawHub configuration file, limiting access to the owning user. - Recommend short-lived, narrowly scoped publishing tokens and immediate rotation whenever accidental disclosure is suspected.

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:220
Finding
Execution of an Unreviewed Project-Local Publishing Script## Vulnerability Details **File Location**: `SKILL.md`, lines 220-223 **Vulnerability Type**: Unsafe execution of repository-controlled code **Risk Level**: High **Vulnerable code snippet**: ```bash cd <技能目录> ./publish.sh [版本号] [更新说明] ``` ### Technical Analysis The optional workflow recommends executing a `publish.sh` file whenever one exists in the target Skill directory. It does not require the user or agent to inspect the script, verify its provenance, validate a cryptographic signature, or obtain explicit confirmation after displaying its contents. A target Skill directory is potentially attacker-controlled input. A malicious or compromised project can therefore supply a `publish.sh` containing arbitrary shell commands. Executing that file transfers control to repository-provided code with the full permissions and environment of the publishing user. The audited package does not itself contain a malicious `publish.sh`; the vulnerability is the unsafe trust model created by recommending unconditional execution of an external project-local script. ### Attack Path 1. An attacker creates or modifies a target Skill repository. 2. The attacker adds a malicious `publish.sh` file while presenting it as a normal publishing helper. 3. A user or agent follows the documented optional workflow and changes into the target Skill directory. 4. The user or agent executes `./publish.sh` without reviewing or validating it. 5. The script runs arbitrary commands with the publishing user's operating-system privileges. 6. The malicious script may read accessible credentials or source files, alter the package before publication, invoke network utilities, or publish attacker-controlled content. ### Impact Assessment Exploitation can provide arbitrary command execution under the account running the publishing workflow. The malicious script can access any files, credentials, environment variables, network resources, and ClawHub ...[truncated 462 chars]
Remediation
## Remediation Suggestions - Remove the recommendation to execute arbitrary project-local publishing scripts by default. - Prefer constructing and invoking the known `clawhub publish` command directly from validated package metadata. - If local scripts must be supported, display the complete script and require explicit user confirmation before execution. - Validate script provenance using a trusted repository, pinned revision, checksum, or cryptographic signature. - Run publishing helpers in a restricted environment with minimal filesystem, network, and credential access. - Do not expose long-lived publishing credentials to repository-controlled scripts. - Validate the target Skill directory and metadata before publication, and verify that the script cannot silently alter the files between validation and upload. - Document that the presence of `publish.sh` alone is not evidence that the file is trusted.
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 (7)

Ae1

High
Category
analysis-evasion
Content
- 技能必须包含 `SKILL.md` 文件
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
- 技能必须包含 `SKILL.md` 文件
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
- 技能必须包含 `SKILL.md` 文件
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Vague Triggers

Medium
Confidence
94% confidence
Finding
The trigger phrases are broad enough to match ordinary user requests like 'publish this skill' or 'upgrade a skill', which can cause the agent to invoke this skill in situations where the user did not specifically intend automated publishing. Because the skill performs impactful actions including login, version changes, and publication, overbroad routing increases the risk of unintended deployment or disclosure of unpublished content.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The documentation instructs use of a raw token directly on the command line, which is commonly exposed through shell history, process listings, logs, screenshots, and clipboard leakage. In a publishing skill, that token likely grants account access to release or modify artifacts, so credential exposure could enable unauthorized publication or account compromise.

Vague Triggers

Medium
Confidence
87% confidence
Finding
The description promises 'one-click publishing' and broad automation for login, version updates, and release flow without stating explicit trigger boundaries, confirmation requirements, or scope limits. In an agent ecosystem, overly broad activation wording can cause the skill to be invoked for sensitive account and publishing actions when user intent is ambiguous, increasing the risk of unintended releases or credential-handling workflows.

Natural-Language Policy Violations

Low
Confidence
93% confidence
Finding
The display name and description are entirely in Chinese, which implies a fixed language presentation in the skill metadata without offering user language choice or documenting a region-specific constraint. This can violate language/locale policy when the skill is not clearly limited to Chinese-speaking users.

Static analysis

No suspicious patterns detected.