Back to skill

Security audit

ClawHub发布工具

Security checks for vulnerabilities and agentic risk

Overview

This publishing skill does what it says, but it ships a plaintext shared ClawHub bearer token and uploads local skill files without much user-facing control or disclosure.

Review the skill directory before publishing because matching files will be uploaded to ClawHub. Do not install or use this version until the embedded bearer token is removed and rotated, and the tool requires a user-provided credential plus a clear upload preview or confirmation.

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 (1)

T09 · Insecure Skill Coding Practices

Error
Location
publish.py:10
Finding

Hard-Coded ClawHub Bearer Token in Source Code

Content
View full analysis
" ``` The embedded token is subsequently attached to outbound requests: ```python resp = requests.post( "https://clawhub.ai/api/cli/upload-url", headers={"Authorization": f"Bearer {TOKEN}"}, json={"filename": filename, "contentType": content_type} ) ``` ```python resp = requests.post( API_URL, headers={"Authorization": f"Bearer {TOKEN}"}, data={"payload": json.dumps(payload)}, files=file_data ) ``` The credential value has been redacted from this report to prevent further disclosure. The audited source contains the complete plaintext token. ### Technical Analysis The application embeds a live-looking ClawHub bearer token directly in distributable Python source. Anyone who can read the project can extract this credential without needing access to a protected configuration file or credential store. The token is automatically supplied to ClawHub as an HTTP `Authorization` bearer credential. Bearer tokens generally grant access based solely on possession, so an attacker can replay the credential from another system. Embedding it also causes every installation of the Skill to share one identity, preventing reliable attribution and violating least-privilege credential management. The network transmission of selected Skill files is consistent with the declared publishing functionality and is not, by itself, unauthorized exfiltration. The security defect is that publication is performed using an embedded shared credential rather than an explicitly configured, user-specific credential. ### Attack Path 1. An attacker obtains a copy of the Skill package or read access to `publish.py`. 2. The attacker extracts the plaintext token assigned to `TOK ...[truncated 1167 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • 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)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The documentation instructs users to publish a local skill to ClawHub but does not clearly disclose that local skill files, metadata, and possibly embedded secrets or proprietary content will be transmitted off-host. This creates a real risk of unintended data disclosure because users may invoke the publish command without understanding the privacy and supply-chain implications of uploading a local directory.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
95% confidence
Finding

This external request initiates an upload workflow with a remote API and therefore participates in transmitting local publishing data off the machine. In a publishing utility, that behavior is expected, but without consent prompts and with a hardcoded API token, it still represents a real security concern rather than a false positive.

Content

Scanner excerpt · publish.py (reported line 17)May include surrounding context.

python
def upload_file(filename, content_type="text/plain"):
    """获取上传URL并上传文件"""
    resp = requests.post(
        "https://clawhub.ai/api/cli/upload-url",
        headers={"Authorization": f"Bearer {TOKEN}"},
        json={"filename": filename, "contentType": content_type}

External Transmission

Medium
Category
Data Exfiltration
Confidence
95% confidence
Finding

This external request initiates an upload workflow with a remote API and therefore participates in transmitting local publishing data off the machine. In a publishing utility, that behavior is expected, but without consent prompts and with a hardcoded API token, it still represents a real security concern rather than a false positive.

Content

Scanner excerpt · publish.py (reported line 17)May include surrounding context.

python
def upload_file(filename, content_type="text/plain"):
    """获取上传URL并上传文件"""
    resp = requests.post(
        "https://clawhub.ai/api/cli/upload-url",
        headers={"Authorization": f"Bearer {TOKEN}"},
        json={"filename": filename, "contentType": content_type}

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This script uploads local files from the selected skill directory to a remote API without any explicit user-facing warning, preview, or confirmation of what will be transmitted. In a skill context, that creates a meaningful data-exfiltration risk because users may unintentionally publish sensitive local content, credentials, or proprietary code if the directory contents are broader than expected.

Content

No source excerpt is available for this finding.

Tainted flow: 'upload_url' from requests.post (line 23, network input) → requests.put (network output)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · publish.py (reported line 27)May include surrounding context.

python
if upload_url:
        # 上传文件内容
        requests.put(upload_url, data=content, headers={"Content-Type": content_type})
    
    return True

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

Natural-language policy violations apply to all file types, including markdown. The documentation uses Chinese for core instructions and examples, which can effectively force a specific language unless the skill explicitly offers alternatives or documents that locale restriction as intentional.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The module docstring presents the skill description only in Chinese, which indicates a language-specific behavior without offering user choice or documenting a justified locale constraint. This can violate language/locale policy when the skill does not explicitly provide opt-in or alternatives.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.