Back to skill

Security audit

ClawHub Publisher

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a real ClawHub publishing helper, but its packaging code can unintentionally publish local secrets or other unintended files, so it should be reviewed before use.

Install only if you are comfortable auditing and running a local publishing CLI. Avoid running it on untrusted skill folders, remove .env/.npmrc and symlinks before preparing packages, prefer dry-run first, keep output outside important directories, and update vulnerable dependencies before using it in a production publishing workflow.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (4)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
src/index.ts:101
Finding

Symbolic Links Can Disclose Arbitrary Local Files Through Prepared and Published Bundles

Content
View full analysis
{ const entries = await fse.readdir(dir, { withFileTypes: true }); const files: string[] = []; for (const entry of entries) { const abs = path.join(dir, entry.name); const rel = path.relative(root, abs); if (entry.isDirectory()) { if (EXCLUDED_DIRS.has(entry.name)) continue; files.push(...await walk(abs, root)); } else { if (EXCLUDED_FILES.has(entry.name)) continue; files.push(rel); } } return files.sort(); } ``` ```ts function isTextFile(rel: string) { const ext = getExtension(rel); return TEXT_EXTENSIONS.has(ext) || !BINARY_EXTENSIONS.has(ext); } ``` ```ts for (const rel of sourceFiles) { const source = path.join(absDir, rel); const dest = path.join(outputDir, rel); const raw = isTextFile(rel) ? await readText(source).catch(() => '') : ''; const likelyBlank = isTextFile(rel) && !raw.trim(); const shouldSkip = likelyBlank && rel !== 'SKILL.md'; if (shouldSkip) { removedFiles.push(rel); continue; } await fse.ensureDir(path.dirname(dest)); if (isTextFile(rel)) { await fse.writeFile(dest, normalizeLines(raw), 'utf8'); } else { await fse.copy(source, dest); } copiedFiles.push(rel); } ``` ### Technical Analysis The directory walker does not distinguish symbolic links from ordinary files. A symbolic link is not reported as a directory by `Dirent.isDirectory()`, so it enters the file list. During preparation, `readText()` ultimately calls `readFile()`, which follows the link and reads its target. The permissive `isTextFile()` implementation also classifies every extension not explicitly listed as binary as text. Consequently, an attacker can give a symlink ...[truncated 1371 chars]
Remediation
View remediation
'')`. 6. Repeat containment validation immediately before reading to reduce time-of-check/time-of-use exposure. 7. Add automated tests covering file symlinks, directory symlinks, nested links, broken links, and links to files outside the source root. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
src/index.ts:306
Finding

Unsafe Output Path Construction Can Recursively Delete Unintended Directories

Content
View full analysis
{ const validation = await validateSkill(skillDir); const absDir = validation.skillDir; const outputRoot = resolvePath(options?.outputRoot || DEFAULT_OUTPUT_ROOT); const slug = inferSlug(absDir, validation.metadata.name); const outputDir = path.join(outputRoot, slug); await fse.remove(outputDir); await fse.ensureDir(outputDir); ``` ### Technical Analysis `inferSlug()` can return an empty string when the metadata name consists entirely of punctuation or other filtered characters. When the slug is empty, `path.join(outputRoot, slug)` resolves to the output root itself. The destination is then passed directly to `fse.remove()`, which recursively deletes the path before recreating it. No validation prevents the destination from being the source directory, the project directory, the output root itself, or another directory containing valuable files. A user-selected `--output` path can further increase the likelihood of a destructive collision. ### Attack Path 1. A Skill declares a metadata name that normalizes to an empty slug, such as a name containing only punctuation. 2. The victim chooses an existing directory as `--output`, or the resulting output path otherwise overlaps with important data. 3. `inferSlug()` returns an empty string. 4. `outputDir` becomes the output root rather than a dedicated child directory. 5. `fse.remove(outputDir)` recursively deletes the entire output root. 6. If the select ...[truncated 681 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
src/index.ts:20
Finding

Generated Output Is Re-Ingested Into Subsequent Publication Bundles

Content
View full analysis
'') : ''; const likelyBlank = isTextFile(rel) && !raw.trim(); const shouldSkip = likelyBlank && rel !== 'SKILL.md'; if (shouldSkip) { removedFiles.push(rel); continue; } await fse.ensureDir(path.dirname(dest)); if (isTextFile(rel)) { await fse.writeFile(dest, normalizeLines(raw), 'utf8'); } else { await fse.copy(source, dest); } copiedFiles.push(rel); } ``` The committed report confirms that generated artifacts were included: ```json "copiedFiles": [ ".clawhub-publisher/clawhub-publisher.zip", ".clawhub-publisher/demo-publish-skill.zip", ".clawhub-publisher/demo-publish-skill/SKILL.md", ".clawhub-publisher/demo-publish-skill/notes.txt", ".clawhub-publisher/demo-publish-skill/publish-report.json" ] ``` ### Technical Analysis The default output directory is `.clawhub-publisher`, but the exclusion list contains only `.clawhub`. When a source directory contains output from an earlier run, `walk()` treats that generated directory as source content. The included `publish-report.json` demonstrates that existing ZIP archives and prepared bundles were copied into a later package. This can produce recursively growing artifacts and can publish stale content that is no longer ...[truncated 1057 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
src/index.ts:335
Finding

Publish Reports Expose Absolute Local Filesystem Paths

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (21)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- missing `SKILL.md`

Known Vulnerable Dependency: brace-expansion==2.0.3 — 3 advisory(ies): CVE-2026-13149 (brace-expansion: DoS via exponential-time expansion of consecutive non-expanding); CVE-2026-14257 (brace-expansion: DoS via unbounded expansion length causing an out-of-memory pro); CVE-2026-69152 (brace-expansion: DoS via unbounded intermediate arrays, bypassing the CVE-2026-1)

High
Category
Supply Chain
Confidence
93% confidence
Finding

brace-expansion 2.0.3 is flagged for multiple denial-of-service issues involving pathological brace patterns that can trigger excessive CPU or memory consumption. In this lockfile it appears as a transitive dependency used by glob/minimatch-style tooling, so the issue is real, but its practical exploitability depends on whether untrusted patterns are ever fed into those libraries by the packaged CLI or its build pipeline.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: js-yaml==4.1.1 — 4 advisory(ies): CVE-2026-84375 (js-yaml: maxTotalMergeKeys does not limit CPU use for empty merge sources); CVE-2026-59869 (js-yaml: YAML merge-key chains can force quadratic CPU consumption); GHSA-5p4m-2wfm-xmqj (JS-YAML: Quadratic CPU consumption in !!omap resolution (3.x and 4.x) — CVE-2026) +1 more

High
Category
Supply Chain
Confidence
96% confidence
Finding

js-yaml 4.1.1 is reported with multiple parser CPU-consumption issues, making malicious YAML input capable of causing denial of service through expensive parsing behavior. Because this skill is a publisher/validator for OpenClaw skills and explicitly depends on js-yaml at runtime, it is plausible that it processes attacker-supplied skill manifests or metadata, which makes the finding more relevant than a dormant dev-only dependency.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: lodash==4.17.23 — 2 advisory(ies): CVE-2025-13465 (lodash vulnerable to Prototype Pollution via array path bypass in `_.unset` and ); CVE-2021-23337 (lodash vulnerable to Code Injection via `_.template` imports key names)

High
Category
Supply Chain
Confidence
80% confidence
Finding

Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: js-yaml==4.1.1 — 4 advisory(ies): CVE-2026-84375 (js-yaml: maxTotalMergeKeys does not limit CPU use for empty merge sources); CVE-2026-59869 (js-yaml: YAML merge-key chains can force quadratic CPU consumption); GHSA-5p4m-2wfm-xmqj (JS-YAML: Quadratic CPU consumption in !!omap resolution (3.x and 4.x) — CVE-2026) +1 more

High
Category
Supply Chain
Confidence
95% confidence
Finding

The manifest permits or resolves a js-yaml version with known CPU-denial-of-service flaws in YAML parsing and merge-key handling. Because this skill is a CLI publisher/validator and explicitly depends on YAML processing, it is plausible that untrusted or semi-trusted skill metadata files are parsed locally, making parser-level DoS more relevant than in an application that never handles attacker-influenced YAML.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
97% confidence
Finding

Including .env in TEXT_EXTENSIONS causes environment files to be treated as normal package content, and prepareSkill will normalize and copy them into the output bundle if non-empty. Because this CLI prepares and publishes skill directories, that behavior can directly leak secrets to ClawHub or to distributable zip archives.

Content

Scanner excerpt · src/index.ts (reported line 16)May include surrounding context.

ts
const TEXT_EXTENSIONS = new Set([
  '.md', '.txt', '.json', '.yaml', '.yml', '.js', '.mjs', '.cjs', '.ts', '.tsx', '.jsx', '.css', '.scss', '.html',
  '.sh', '.bash', '.zsh', '.py', '.rb', '.php', '.java', '.kt', '.kts', '.xml', '.gradle', '.properties', '.toml',
  '.ini', '.env', '.gitignore', '.npmrc', '.editorconfig'
]);
const BINARY_EXTENSIONS = new Set(['.png', '.jpg', '.jpeg', '.gif', '.webp', '.pdf', '.zip', '.ico']);
const EXCLUDED_DIRS = new Set(['.git', 'node_modules', 'dist', 'build', '.next', '.clawhub', '.DS_Store']);

Credential Access

High
Category
Privilege Escalation
Confidence
97% confidence
Finding

Including .env in TEXT_EXTENSIONS causes environment files to be treated as normal package content, and prepareSkill will normalize and copy them into the output bundle if non-empty. Because this CLI prepares and publishes skill directories, that behavior can directly leak secrets to ClawHub or to distributable zip archives.

Content

Scanner excerpt · src/index.ts (reported line 16)May include surrounding context.

ts
const TEXT_EXTENSIONS = new Set([
  '.md', '.txt', '.json', '.yaml', '.yml', '.js', '.mjs', '.cjs', '.ts', '.tsx', '.jsx', '.css', '.scss', '.html',
  '.sh', '.bash', '.zsh', '.py', '.rb', '.php', '.java', '.kt', '.kts', '.xml', '.gradle', '.properties', '.toml',
  '.ini', '.env', '.gitignore', '.npmrc', '.editorconfig'
]);
const BINARY_EXTENSIONS = new Set(['.png', '.jpg', '.jpeg', '.gif', '.webp', '.pdf', '.zip', '.ico']);
const EXCLUDED_DIRS = new Set(['.git', 'node_modules', 'dist', 'build', '.next', '.clawhub', '.DS_Store']);

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
85% confidence
Finding

The skill describes and encourages use of shell-capable commands (npm, node, clawhub publish) but does not declare any permissions or allowed-tools scope in the skill manifest/frontmatter. That creates an authorization and review gap: an agent may invoke shell actions the operator did not explicitly approve, increasing the chance of unintended command execution during validation, packaging, or publish flows.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: esbuild==0.27.4 — 1 advisory(ies): GHSA-g7r4-m6w7-qqqr (esbuild allows arbitrary file read when running the development server on Window)

Low
Category
Supply Chain
Confidence
60% confidence
Finding

Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Content

Scanner excerpt · package.json (reported line 23)May include surrounding context.

json
],
  "license": "MIT",
  "dependencies": {
    "archiver": "^7.0.1",
    "chalk": "^5.4.1",
    "commander": "^14.0.1",
    "execa": "^9.6.0",

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Content

Scanner excerpt · package.json (reported line 24)May include surrounding context.

json
"license": "MIT",
  "dependencies": {
    "archiver": "^7.0.1",
    "chalk": "^5.4.1",
    "commander": "^14.0.1",
    "execa": "^9.6.0",
    "fs-extra": "^11.3.2",

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Content

Scanner excerpt · package.json (reported line 25)May include surrounding context.

json
"dependencies": {
    "archiver": "^7.0.1",
    "chalk": "^5.4.1",
    "commander": "^14.0.1",
    "execa": "^9.6.0",
    "fs-extra": "^11.3.2",
    "js-yaml": "^4.1.0"

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Content

Scanner excerpt · package.json (reported line 26)May include surrounding context.

json
"archiver": "^7.0.1",
    "chalk": "^5.4.1",
    "commander": "^14.0.1",
    "execa": "^9.6.0",
    "fs-extra": "^11.3.2",
    "js-yaml": "^4.1.0"
  },

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Content

Scanner excerpt · package.json (reported line 27)May include surrounding context.

json
"chalk": "^5.4.1",
    "commander": "^14.0.1",
    "execa": "^9.6.0",
    "fs-extra": "^11.3.2",
    "js-yaml": "^4.1.0"
  },
  "devDependencies": {

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Content

Scanner excerpt · package.json (reported line 28)May include surrounding context.

json
"commander": "^14.0.1",
    "execa": "^9.6.0",
    "fs-extra": "^11.3.2",
    "js-yaml": "^4.1.0"
  },
  "devDependencies": {
    "@types/archiver": "^7.0.0",

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Content

Scanner excerpt · package.json (reported line 31)May include surrounding context.

json
"js-yaml": "^4.1.0"
  },
  "devDependencies": {
    "@types/archiver": "^7.0.0",
    "@types/fs-extra": "^11.0.4",
    "@types/js-yaml": "^4.0.9",
    "tsup": "^8.5.0",

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Content

Scanner excerpt · package.json (reported line 32)May include surrounding context.

json
},
  "devDependencies": {
    "@types/archiver": "^7.0.0",
    "@types/fs-extra": "^11.0.4",
    "@types/js-yaml": "^4.0.9",
    "tsup": "^8.5.0",
    "tsx": "^4.20.6",

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Content

Scanner excerpt · package.json (reported line 33)May include surrounding context.

json
"devDependencies": {
    "@types/archiver": "^7.0.0",
    "@types/fs-extra": "^11.0.4",
    "@types/js-yaml": "^4.0.9",
    "tsup": "^8.5.0",
    "tsx": "^4.20.6",
    "typescript": "^5.9.2"

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Content

Scanner excerpt · package.json (reported line 34)May include surrounding context.

json
"@types/archiver": "^7.0.0",
    "@types/fs-extra": "^11.0.4",
    "@types/js-yaml": "^4.0.9",
    "tsup": "^8.5.0",
    "tsx": "^4.20.6",
    "typescript": "^5.9.2"
  }

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Content

Scanner excerpt · package.json (reported line 35)May include surrounding context.

json
"@types/fs-extra": "^11.0.4",
    "@types/js-yaml": "^4.0.9",
    "tsup": "^8.5.0",
    "tsx": "^4.20.6",
    "typescript": "^5.9.2"
  }
}

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Content

Scanner excerpt · package.json (reported line 36)May include surrounding context.

json
"@types/js-yaml": "^4.0.9",
    "tsup": "^8.5.0",
    "tsx": "^4.20.6",
    "typescript": "^5.9.2"
  }
}