Back to skill

Security audit

Skill Audit & Publish

Security checks for vulnerabilities and agentic risk

Overview

ClawScan rates this publishing skill suspicious because it reports instructions that may overwrite original files and expand publishing beyond the requested destination; some scanner coverage was partial.

Consider the reported possibility of publishing to additional platforms and overwriting original files before installing. The scan is incomplete: it covered 7 of 9 components, and some checks were partial because of obfuscated instruction text, opaque content, and unresolved references. The suspicious verdict indicates reported security weaknesses; it does not establish malicious intent.

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
scripts/sync_skill_to_github.js
Finding

GitHub publishing helper performs remote writes without an enforced approval gate

Content
View full analysis

Impact

Premature invocation can publish unapproved local contents or overwrite existing repository files on the selected branch.

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md
Finding

Mandatory three-platform workflow expands a ClawHub-only publishing request

Content
View full analysis

Impact

The approved package can be uploaded to an unrequested platform, creating an unauthorized publication under the user's SkillHub identity.

Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (13)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 14)May include surrounding context.

md
- "network: api.github.com — used only by the bundled sync helper when explicitly invoked"
      - "credentials: GITHUB_TOKEN / GITHUB_PAT environment variables — read at runtime, never stored or logged"
      - "network: api.skillhub.cn — used only by the stage 5b SkillHub upload when the user approves publishing"
      - "credentials: the local SkillHub credential file (~/.skillhub/credentials.json, field user.token) read only during stage 5b to authenticate the upload — held in memory for that single request, never embedded in the skill, logged, or shipped in any package"
    tags:
      - skill-publishing
      - pre-publish-audit

Post-publish writeback overwrites original skill files despite the explicit promise never to modify them.

High
Category
Excessive Agency
Confidence
99% confidence
Finding

The post-publish instruction explicitly copies the transformed staging package over the original skill directory, contradicting repeated promises that original files remain untouched. An agent following it could overwrite private, richer source material or unpublished local changes with a sanitized public version.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 138)May include surrounding context.

md
Two things to know before you consider skipping it:

- **There is no read API.** Every `GET` under `/api/v1/community/skills/*` returns 405. You cannot verify remotely whether a skill is already on SkillHub; use `clawhub inspect <slug> --versions` plus the GitHub mirror as side evidence.
- **Auth is a local credential file, read in memory only.** The upload authenticates with a Bearer token read from the SkillHub credential file (`~/.skillhub/credentials.json`, field `user.token`). The token is held in memory for that single request — never embedded in the skill, logged, or included in any published package.
- **Skipping it is the most common way the unified-version rule breaks.** The skill lands on two platforms, the version registry drifts apart, and the next publish has to guess which number is authoritative.

Load **`references/skillhub-publish.md`** during stage 5 for the endpoint, auth path, multipart shape, response codes, and the correct ordering of the three uploads.

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/skillhub-publish.md (reported line 17)May include surrounding context.

md
## Auth

Bearer token from `~/.skillhub/credentials.json` → **`user.token`**.
The file has no top-level `token` key; reading `d["token"]` yields null and produces a misleading 401/403.

## Request — multipart/form-data

Code capability 'network' detected in scripts/sync_skill_to_github.js but not covered by declared permissions.

High
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill uses 'network' capability that is not covered by the declared 'allowed-tools' preapproval. Review the host runtime's actual enforcement policy; runtime permissions are unknown unless separately verified, and this declaration alone does not establish a permission ceiling.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/sync_skill_to_github.js (reported line 11)May include surrounding context.

js
//                                [--files "SKILL.md,README.md,references/foo.md"]
//
// Environment:
//   GITHUB_TOKEN or GITHUB_PAT — a GitHub personal access token (repo scope). Required.
//   The script exits with an error if neither variable is set. Credentials are
//   consumed from the environment only — nothing credential-related is read from
//   disk, and requests go nowhere except api.github.com.

The language audit requires an English SKILL.md body and bilingual READMEs without user opt-in.

Medium
Category
Output Handling
Confidence
96% confidence
Finding

The checklist treats an English SKILL.md body and bilingual READMEs as publication requirements. No user language choice or justification for these constraints is documented.

Content

No source excerpt is available for this finding.

The language checklist requires an English SKILL.md body and bilingual Chinese/English README without user opt-in.

Medium
Category
Output Handling
Confidence
96% confidence
Finding

The checklist treats specific documentation languages as a publishing requirement. It provides neither a user language choice nor a documented justification for enforcing English and Chinese.

Content

No source excerpt is available for this finding.

Post-publish writeback overwrites original skill files without a clear data-loss warning or separate user approval.

Medium
Category
Output Handling
Confidence
99% confidence
Finding

Approval of public release contents is not approval to overwrite local originals, particularly when the workflow promises not to modify them. The writeback lacks a separate consent gate, backup requirement, or clear warning that sanitization and transformation may discard source information.

Content

No source excerpt is available for this finding.

A maintenance-framed instruction directs the agent to overwrite protected original files after publishing, without separate approval.

Medium
Category
Prompt Injection
Confidence
98% confidence
Finding

The instruction presents overwriting originals as necessary maintenance to prevent version regressions, encouraging an agent to cross the workflow's stated preservation boundary. Its exception for intentionally newer originals does not provide a reliable conflict check or substitute for user authorization.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/skillhub-publish.md (reported line 12)May include surrounding context.

Endpoint

text
POST https://api.skillhub.cn/api/v1/community/skills/publish

Auth

The publish payload specifies an English description without user opt-in.

Medium
Category
Output Handling
Confidence
93% confidence
Finding

The description template specifies a "one-line English summary," directing the agent to produce this metadata in a particular language. The file neither offers a language choice nor documents a platform requirement that justifies English-only descriptions.

Content

No source excerpt is available for this finding.

The rollback workflow reframes removing usage restrictions as a security improvement to reduce scanner findings while retaining current capabilities.

Medium
Category
Prompt Injection
Confidence
95% confidence
Finding

The rollback procedure recommends removing usage restrictions and safety-relevant metadata based on scanner results while retaining the current body, conflating fewer findings with lower risk. Although it preserves genuine scope fixes, its blanket prohibition on restoring restrictions can remove meaningful guardrails and make risky capabilities less visible to users or reviewers.

Content

No source excerpt is available for this finding.