T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/init_skill.py:178- Finding
Unvalidated Skill Name Permits Output-Directory Traversal
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This is a coherent skill-building helper, but its local packaging scripts have real filesystem scoping bugs that could write or package files outside the intended skill directory.
Install only if you are comfortable with a skill that can create files and package local directories when invoked. Use clean, trusted skill directories, avoid packaging untrusted folders or symlinks, and keep output paths outside the source skill tree until these script scoping issues are fixed.
scripts/init_skill.py:178Unvalidated Skill Name Permits Output-Directory Traversal
scripts/package_skill.py:69Symlink Following Can Expose Files Outside the Skill Directory
scripts/package_skill.py:54In-Tree Output Archive Can Be Recursively Packaged Into Itself
The declared description says this is a guide for creating effective skills—i.e., an instructional or authoring-oriented skill for helping users create or update a skill. The supplied code does not provide guidance, content generation, or workflow assistance for designing skills. Instead, it is a local packaging utility whose primary purpose is to validate a skill directory and create a .skill archive on disk. That is a materially different function from the declared purpose, and it involves filesystem read/write and archive creation capabilities not reflected in the description.
The declared description presents the skill as a guide for helping users create or update skills. The supplied code instead implements a concrete validation utility that reads files from disk, parses YAML frontmatter, and enforces naming/description constraints. That is a materially different primary purpose: automated validation of skill metadata rather than instructional guidance for skill creation. The file access and validation behavior are substantive capabilities not reflected in the description.
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.
1. Understand the skill with concrete examples
2. Plan reusable skill contents (scripts, references, assets)
3. Initialize the skill (run init_skill.py)
4. Edit the skill (implement resources and write SKILL.md)
5. Package the skill (run package_skill.py)
6. Iterate based on real usage
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.
Any example files and directories not needed for the skill should be deleted. 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 Guidelines:** Always use imperative/infinitive form.
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.
# 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")
Without declared permissions the skill's intent is opaque and cannot be validated.
The description says the skill should be used when users want to create a new skill or update an existing skill, which is a very broad activation condition for a manifest/markdown trigger. It does not provide clear boundaries, exclusions, or negative examples, so it could overlap with many general conversations about skills and cause unintended invocation.