T09 · Insecure Skill Coding Practices
- Location
publish.py:11- Finding
Hardcoded ClawHub Bearer Token Exposes Publishing Credentials
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill does what it says by publishing local skill files to ClawHub, but it ships a hardcoded publishing token and uploads selected local files without strong user review controls.
Review the target directory carefully before using this skill, because it uploads matching source and text files to ClawHub and may publish them publicly or under the configured account. Do not install or run this version with the embedded token present; the publisher should revoke that token and replace it with user-provided credentials plus a dry-run or confirmation step.
publish.py:11Hardcoded ClawHub Bearer Token Exposes Publishing Credentials
The skill explicitly instructs users to publish a local skill directory to an external service, but the documentation does not warn that local contents will be transmitted or encourage users to review included files first. In a skill-publishing context, this can lead to accidental disclosure of secrets, private prompts, test data, or other sensitive files bundled in the target directory.
The natural-language instructions and examples are presented in Chinese, including parameter examples and descriptive text, with no indication that the user may choose another language or that the skill is intentionally region-specific. Under the stated policy, forcing a specific language without opt-in is a natural-language policy concern.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
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}
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
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}
Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.
if upload_url:
# 上传文件内容
requests.put(upload_url, data=content, headers={"Content-Type": content_type})
return True
The script reads local files from the provided skill directory and uploads them to a remote service without any explicit user-facing warning about what content will leave the machine. In a skill/publishing context, this can lead to unintended disclosure of source code, embedded secrets, or sensitive documentation if users point the tool at the wrong directory or do not understand that all matching files are transmitted.
The comment on L06 is written only in Chinese, which reflects a language-specific instruction in the file without offering any language choice or justification. The policy explicitly calls for flagging language or locale constraints when they force a specific language without opt-in.
The reasoning field and duplicated raw_prediction.reasoning text are written only in Chinese, with no indication that language choice is optional or that the skill is region-specific. This can violate a language/locale policy when a skill or its metadata implicitly enforces one language without user opt-in.
The file's human-facing description and CLI help text are written in Chinese, which imposes a specific language on users of the skill without any opt-in or explanation that the tool is intended only for a Chinese-speaking audience. This matches the policy category for language or locale constraints expressed in natural-language content.