Back to skill

Security audit

skill-creator

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a coherent skill-building helper, but its packaging script can unintentionally include files outside the selected skill folder through symlinks.

Review before installing or using the packaging helper. Use it only on skill folders you trust, inspect for symlinks before packaging, and avoid sharing generated ZIP files until you are sure they contain only intended skill files.

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
scripts/package_skill.py:65
Finding

Symbolic Link Allows Packaging Files Outside the Skill Directory

Content
View full analysis

Vulnerability Details

File Location: scripts/package_skill.py, lines 65–69
Vulnerability Type: Symlink-based arbitrary local file disclosure
Risk Level: High

python
for file_path in skill_path.rglob('*'):
    if file_path.is_file():
        # Calculate the relative path within the zip
        arcname = file_path.relative_to(skill_path.parent)
        zipf.write(file_path, arcname)
        print(f"  Added: {arcname}")

Technical Analysis

The packaging routine recursively discovers entries beneath an attacker-supplied skill directory and adds entries for which Path.is_file() returns true. That check follows symbolic links. The subsequent zipf.write(file_path, arcname) operation also reads the referenced target rather than preserving or rejecting the symbolic link.

The archive name is calculated from the unresolved path inside the skill directory. Consequently, a symbolic link appears to be an ordinary in-scope skill file in the archive even when its target is outside the skill root.

The validation performed before packaging does not reject symbolic links or verify that every resolved file remains beneath the resolved skill directory. An untrusted skill author can therefore cause the packager to read any file accessible to the user running it.

Attack Path

  1. An attacker supplies a skill directory containing a valid SKILL.md.
  2. The attacker places a symbolic link within that directory, such as assets/collected-data, pointing to a sensitive local file expected to exist on the packaging system.
  3. The user or agent invokes scripts/package_skill.py on the supplied skill directory, as directed by the Skill workflow.
  4. rglob('*') discovers the symbolic link, and is_file() accepts it because its target is a regular file.
  5. zipf.write() follows the link and copies the target file's contents into the generated ZIP archive under an apparently legitimate skill-relative name.
  6. If the archive is shared or published as ...[truncated 780 chars]
Remediation
View remediation

Remediation Suggestions

  • Reject symbolic links explicitly before adding entries:
    python
    if file_path.is_symlink():
        raise ValueError(f"Symbolic links are not allowed: {file_path}")
    
  • Resolve the skill root and every candidate path, then require each candidate to remain beneath the resolved root:
    python
    skill_root = skill_path.resolve()
    
    for file_path in skill_root.rglob("*"):
        if file_path.is_symlink():
            raise ValueError(f"Symbolic links are not allowed: {file_path}")
    
        resolved = file_path.resolve(strict=True)
        if not resolved.is_relative_to(skill_root):
            raise ValueError(f"File escapes skill directory: {file_path}")
    
        if resolved.is_file():
            arcname = resolved.relative_to(skill_root.parent)
            zipf.write(resolved, arcname)
    
  • Reject special filesystem objects and package regular files only.
  • Where supported, open files using operating-system primitives that prevent symlink following, such as O_NOFOLLOW, to reduce check-to-use race exposure.
  • Add validation tests covering file symlinks, directory symlinks, links to sensitive external files, broken links, and links changed during packaging.
  • Abort packaging on any boundary violation rather than silently skipping questionable entries, so users cannot mistake an unsafe package operation for a successful one.
Vulnerability Patterns
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (6)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill is framed as a documentation-style guide, but it also functions as an operational workflow that invokes CLI tooling and filesystem-based validation. That hidden behavioral breadth increases the chance of unintended execution and makes it harder for policy systems to classify the skill's real capabilities.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill is framed as a documentation-style guide, but it also functions as an operational workflow that invokes CLI tooling and filesystem-based validation. That hidden behavioral breadth increases the chance of unintended execution and makes it harder for policy systems to classify the skill's real capabilities.

Content

No source excerpt is available for this finding.

Self-Modification

High
Category
Rogue Agent
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.

Content

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

md
Also, delete any example files and directories not needed for the skill. The initialization script creates example files in `scripts/`, `references/`, and `assets/` to demonstrate structure, but most skills won't need all of them.

#### Update SKILL.md

**Writing Style:** Write the entire skill using **imperative/infinitive form** (verb-first instructions), not second person. Use objective, instructional language (e.g., "To accomplish X, do Y" rather than "You should do X" or "If you need to do X"). This maintains consistency and clarity for AI consumption.

Self-Modification

High
Category
Rogue Agent
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.

Content

Scanner excerpt · scripts/init_skill.py (reported line 266)May include surrounding context.

python
# Print next steps
    print(f"\n✅ 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")
    print("2. Customize or delete the example files in scripts/, references/, and assets/")
    print("3. Run the validator when ready to check the skill structure")

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
83% confidence
Finding

The skill instructs the agent to run local scripts that create directories, write files, validate filesystem contents, and package artifacts, but it does not declare any explicit tool scope or allowed-tools constraints. That can lead to over-broad execution privileges at runtime, making accidental or inappropriate shell, file, or network use more likely if the skill is invoked in a permissive environment.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The description says the skill should be used whenever users want to create a new skill or update an existing one, but it does not define concrete trigger phrases, scope boundaries, or exclusion conditions. Because 'create' or 'update' a skill is a broad intent and no negative examples are provided, the activation guidance is somewhat ambiguous for routing.

Content

No source excerpt is available for this finding.