Scanned on 2/7/2026
Template generation script with path traversal vulnerabilities and insufficient validation of user-controlled file operations.
This script is a skill template generator with moderate security concerns. The primary risk is path traversal vulnerabilities through the --path argument, which accepts user input without validation and could allow writing files to arbitrary filesystem locations (e.g., /etc, system directories, or parent directories via ../). While the skill_name undergoes normalization, this occurs after the path is accepted, and the normalization itself may not fully prevent directory traversal attacks. The script creates executable Python files which could be a concern if placed in sensitive locations. Positively, the script has no network operations, doesn't access credentials, uses only standard libraries, and implements some input validation (resource type whitelist, regex normalization). However, the incomplete code prevents full analysis. The trust score of 72 reflects good intentions with standard security practices but critical missing safeguards around filesystem operations that could be exploited by malicious users or through social engineering.
Path traversal vulnerability - user-supplied path argument is used directly without validation to create directories and files
Evidence:
argparse path argument combined with skill_name allows arbitrary filesystem writes: init_skill.py custom-skill --path /custom/location or --path ../../../etcIncomplete input validation on skill_name allows potential directory traversal through normalization bypass
Evidence:
normalize_skill_name() uses regex to clean input but doesn't prevent sequences like '..' before normalization. A crafted input could potentially escape intended directories.Script creates executable Python files with user-controlled content in potentially sensitive locations
Evidence:
EXAMPLE_SCRIPT template creates files with #!/usr/bin/env python3 shebang and executable permissions in user-specified pathsNo validation of MAX_SKILL_NAME_LENGTH enforcement in the visible code
Evidence:
MAX_SKILL_NAME_LENGTH = 64 is defined but the code is truncated before showing where/if this limit is enforcedCode is truncated and incomplete, preventing full security analysis
Evidence:
parse_resources() function is cut off mid-line: print(f"[ERROR] Unknown resource type(s): {', '.join(inv