T09 · Insecure Skill Coding Practices
- Location
scripts/init_skill.py:206- Finding
Output Directory Escape Through an Unvalidated Skill Name
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is a coherent skill-authoring helper, but its bundled local scripts have real filesystem boundary risks users should review before installing.
Install only if you trust the users and workspaces where it will be used. Run its scripts only on skill names you control, avoid absolute or parent-directory path components, do not package untrusted skill folders, and inspect for symlinks before creating a .skill archive.
scripts/init_skill.py:206Output Directory Escape Through an Unvalidated Skill Name
scripts/package_skill.py:68External File Disclosure Through Symlink Following During Packaging
The skill behaves like an instruction set for a command-line workflow operating on local paths, but that behavior is not surfaced in the metadata that determines triggering. Hidden operational scope is risky because the skill can be selected under the assumption it is merely instructional, while it actually authorizes schema enforcement, directory traversal, and output generation.
The skill behaves like an instruction set for a command-line workflow operating on local paths, but that behavior is not surfaced in the metadata that determines triggering. Hidden operational scope is risky because the skill can be selected under the assumption it is merely instructional, while it actually authorizes schema enforcement, directory traversal, and output generation.
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")
The skill instructs the agent to create, edit, validate, and package skills via local scripts, which implies filesystem writes, reads, and shell execution, yet it declares no tool scope or permission boundaries. That omission can cause the agent to perform state-changing actions without explicit capability disclosure or gating, increasing the chance of unintended file modification or command execution.
The activation description is broad enough to trigger on many generic requests about creating or updating skills. Overbroad triggering increases the chance that the agent loads instructions that encourage file creation, editing, and script execution in contexts where the user may have wanted only conceptual advice.
The instructions tell the agent to run initialization and packaging scripts that create directories and produce archive files, but they do not require warning the user or obtaining confirmation before making filesystem changes. In an agent setting, this can lead to unexpected writes or artifact creation in user workspaces.
The skill requires testing added scripts by actually running them, but provides no safety guardrails about untrusted code, side effects, network access, or sandboxing. Executing newly created or modified scripts without restrictions can cause destructive local changes or unsafe external interactions.
No suspicious patterns detected.