Back to skill

Security audit

skill-creator-canonical

Security checks for vulnerabilities and agentic risk

Overview

This is mostly a legitimate AgentSkill authoring tool, but its packaging and publishing path can expose local files from a skill folder if users rely on incomplete ignore rules.

Review this skill before installing if you will use packaging or publishing. Keep sensitive files out of skill directories, require a complete .clawhubignore before packaging, inspect the generated .skill archive before publishing, and verify or pin dual-thinking before installing it.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/package_skill.py:31
Finding
Packaging Proceeds Without Mandatory Sensitive-File Exclusions<![CDATA[ ## Vulnerability Details **File Location**: `scripts/package_skill.py`, lines 31-41 and 196-216 **Vulnerability Type**: Sensitive-file disclosure through fail-open archive configuration **Risk Level**: High ### Vulnerable Code ```python def _load_ignore_patterns(skill_root: Path) -> list[str]: ignore_file = skill_root / ".clawhubignore" if not ignore_file.exists(): return [] patterns: list[str] = [] for raw_line in ignore_file.read_text(encoding="utf-8").splitlines(): line = raw_line.strip() if not line or line.startswith("#"): continue patterns.append(line) return patterns ``` ```python ignore_patterns = _load_ignore_patterns(skill_path) # Create the .skill file (zip format) try: with zipfile.ZipFile(skill_filename, "w", zipfile.ZIP_DEFLATED) as zipf: # Walk through the skill directory for file_path in skill_path.rglob("*"): # Security: never follow or package symlinks. if file_path.is_symlink(): print(f"[WARN] Skipping symlink: {file_path}") continue if _should_ignore(file_path, skill_path, ignore_patterns): continue if file_path.is_file(): resolved_file = file_path.resolve() if not _is_within(resolved_file, skill_path): print(f"[ERROR] File escapes skill root: {file_path}") return None ``` ### Technical Analysis The packager treats a missing `.clawhubignore` file as an empty exclusion list. It then recursively processes every regular, non-symlink file beneath the Skill root. The preceding validation only validates the structure and frontmatter of `SKILL.md`; it does not scan the package for credentials, environment files, private keys, tokens, logs, session data, or other sensitive artifacts. Although `init_skill.py` creates a default `.clawhubignore`, `package_skill.py` can package existing ...[truncated 1801 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Make `.clawhubignore` mandatory and abort packaging when it is absent. 2. Enforce a non-overridable internal denylist in addition to user-defined patterns. At minimum, exclude: - `.env*` - `.git/` and other VCS metadata - private-key and credential filenames - `.clawhub/` - session, diagnostics, profile, cache, coverage, log, and temporary directories - generated `.skill` archives 3. Scan the final file list for sensitive names and probable secret material before writing the archive. 4. Display the complete archive manifest and require explicit confirmation when suspicious files are detected. 5. Validate the finished archive rather than relying only on source-directory checks. 6. Add regression tests confirming that packaging fails when `.clawhubignore` is absent and that mandatory exclusions cannot be disabled by an incomplete ignore file. 7. Delete any partially created archive when packaging aborts because a prohibited file is detected. ]]>

T08 · Insecure Dependencies

Warning
Location
SKILL.md:110
Finding
Deep Review Relies on an Unpinned External Skill Dependency<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 110-111 **Vulnerability Type**: Unpinned third-party Skill installation **Risk Level**: Medium ### Vulnerable Code ```text Runtime note: this path requires the `dual-thinking` skill to be installed and available in the user's environment. 1. If `dual-thinking` is unavailable, emit exactly: `REVIEW BLOCKED: dual-thinking skill not found. Run: clawhub install dual-thinking. If installation is not possible, ask the user whether to continue without deep review.` Then stop the skill execution. ``` ### Technical Analysis The full review path depends on an externally distributed Skill identified only by the mutable name `dual-thinking`. The suggested installation command does not pin a version, publisher identity, package digest, signature, or immutable source reference. Agent Skills contain instructions and may include executable scripts. Consequently, installing a dependency by an unverified mutable name introduces a supply-chain trust boundary. If the registry entry, publisher account, name resolution, or latest release is compromised, the installed dependency may differ from the component that was originally reviewed. The current Skill does not install the dependency automatically and stops before review, which limits immediate exposure. The risk arises when the user follows the emitted installation instruction and subsequently loads the external Skill. ### Attack Path 1. An operation reaches the mandatory full-review path. 2. The `dual-thinking` Skill is not installed. 3. The workflow emits `clawhub install dual-thinking`. 4. The user runs the command without a pinned version or verified publisher identity. 5. The registry resolves the mutable package name to the currently available release. 6. A compromised, replaced, or malicious release is installed. 7. The dependency is loaded for review and can influence the agent through its instructions or invoke any scripts permitted by the hos ...[truncated 577 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin `dual-thinking` to a reviewed, immutable version. 2. Verify the expected publisher or owner identity before installation. 3. Where supported, require a package digest, signed manifest, or other cryptographic provenance check. 4. Record the approved version and integrity value directly in `SKILL.md` or trusted release metadata. 5. Require explicit user approval before installing or loading an unavailable third-party Skill. 6. Inspect the dependency's instructions and scripts before granting it tools or filesystem access. 7. Define a safe local fallback review procedure so that security-sensitive work does not require an unverified dependency. 8. Re-audit the dependency whenever its pinned version changes. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Rogue AgentSelf-Modification, Session Persistence
Findings (23)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The skill's stated purpose understates that it may run validation and packaging-related checks that exercise archive generation, ignore-file processing, metadata/version checks, and related release hygiene. Even if these are legitimate maintenance actions, hiding them behind a narrower description can cause operators to underestimate the skill's reach and side effects.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The skill's stated purpose understates that it may run validation and packaging-related checks that exercise archive generation, ignore-file processing, metadata/version checks, and related release hygiene. Even if these are legitimate maintenance actions, hiding them behind a narrower description can cause operators to underestimate the skill's reach and side effects.

Ae1

High
Category
analysis-evasion
Content
Keep `SKILL.md` executable.
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
Keep `SKILL.md` executable.
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
Keep `SKILL.md` executable.
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
Keep `SKILL.md` executable.
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
Keep `SKILL.md` executable.
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
Keep `SKILL.md` executable.
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
Keep `SKILL.md` executable.
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
Keep `SKILL.md` executable.
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
Keep `SKILL.md` executable.
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
Keep `SKILL.md` executable.
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Direct Prompt Extraction

High
Category
System Prompt Leakage
Content
Use this reference when the skill must produce a specific artifact or report.

## Output rules
- Name the artifact explicitly.
- State where the artifact should be written.
- State what counts as complete.
Confidence
85% confidence
Finding
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Self-Modification

High
Category
Rogue Agent
Content
# Print next steps
    print(f"\n[OK] Skill '{skill_name}' initialized successfully at {skill_dir}")
    print("\nNext steps:")
    print("1. Edit SKILL.md to complete the TODO items and update the description")
    if resources:
        if include_examples:
            print("2. Customize or delete the example files in scripts/, references/, and assets/")
Confidence
85% confidence
Finding
Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Credential Access

High
Category
Privilege Escalation
Content
def test_skips_symlink_to_external_file(self):
        skill_dir = self.create_skill("symlink-file-skill")
        outside = self.temp_dir / "outside-secret.txt"
        outside.write_text("super-secret\n")
        link = skill_dir / "loot.txt"
        out_dir = self.temp_dir / "out"
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
def test_skips_symlink_to_external_file(self):
        skill_dir = self.create_skill("symlink-file-skill")
        outside = self.temp_dir / "outside-secret.txt"
        outside.write_text("super-secret\n")
        link = skill_dir / "loot.txt"
        out_dir = self.temp_dir / "out"
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
def test_skips_symlink_to_external_file(self):
        skill_dir = self.create_skill("symlink-file-skill")
        outside = self.temp_dir / "outside-secret.txt"
        outside.write_text("super-secret\n")
        link = skill_dir / "loot.txt"
        out_dir = self.temp_dir / "out"
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
".env*\n*.skill\n.daemon-ws-endpoint\n",
            encoding="utf-8",
        )
        (skill_dir / ".env.local").write_text("SECRET=1\n")
        (skill_dir / "draft.skill").write_text("archive\n")
        (skill_dir / ".daemon-ws-endpoint").write_text("ws://127.0.0.1\n")
        out_dir = self.temp_dir / "out"
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
".env*\n*.skill\n.daemon-ws-endpoint\n",
            encoding="utf-8",
        )
        (skill_dir / ".env.local").write_text("SECRET=1\n")
        (skill_dir / "draft.skill").write_text("archive\n")
        (skill_dir / ".daemon-ws-endpoint").write_text("ws://127.0.0.1\n")
        out_dir = self.temp_dir / "out"
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Lp3

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding
The skill instructs the agent to read and write files, run Python scripts, package archives, and publish releases, but it declares no explicit tool scope such as permissions or allowed-tools. That makes the effective authority implicit and environment-dependent, which increases the risk of unintended filesystem or shell access when the skill is invoked.

Unbounded Resource Access

Medium
Category
Excessive Agency
Content
3. Fix every validation error, then re-run validation and output the new validator state.
4. Review warnings and either fix them or record why the warning is acceptable, then output that warning decision.
5. Re-run both validators after each fix cycle and output the latest results.
6. If either validator fails twice consecutively, output the raw error log, mark validation as blocked, and stop the entire skill execution. Do not proceed to Step 8. Do not loop indefinitely.
Output: validation results for both scripts.
Stop when both validators succeed, the remaining warnings are explicitly accepted, or the 2-cycle retry limit is hit.
Confidence
75% confidence
Finding
Skill allows unbounded resource consumption (API calls, storage, compute). Without rate limits or quotas, a compromised or misbehaving agent can cause denial-of-service or cost overruns.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The publish step includes a command that can distribute the skill externally, but the instructions do not require a prominent user-facing warning about that consequence before execution. In an agent setting, this can lead to accidental disclosure or irreversible external release of code or metadata when the user asked for help but did not fully appreciate that publication would occur.

Missing User Warnings

Low
Confidence
88% confidence
Finding
The fallback instructs the agent to write to `skill_output.txt` in the current working directory when output expectations are unclear. Even though this is framed as a safety fallback, it can still cause unintended modification of the user's workspace, overwrite or append to files unexpectedly, and create side effects in contexts where read-only behavior was expected.

Static analysis

No suspicious patterns detected.