T09 · Insecure Skill Coding Practices
- Location
phase6-packager/SKILL.md:37- Finding
Shell Command Injection Through an Unquoted User-Controlled Album Name
- Content
View full analysis
zip -r -promotional-materials.zip \ docs/album-overview.md \ docs/promotional-materials.md \ docs/cover-concept.md \ docs/artist-story-cn.md \ docs/artist-story-en.md \ docs/artist-story-short.md \ docs/artist-story-quotes.md \ docs/platform-check.txt \ generate/covers/album-cover-p1.png \ generate/covers/album-cover-p2.png \ generate/covers/album-cover-p3.png \ generate/covers/tracks/ \ docs/promo-video.mp4 \ docs/promo-video-15s.mp4 ``` The original command uses the user-derived album-name placeholder directly as an unquoted shell argument. The album name is collected during the concept phase and subsequently used to construct project paths and output filenames: ```text 1. Create the project directory workspace/projects/album-{album-name}/ 2. Copy templates/album-overview.md to docs/album-overview.md 3. Create song files according to the requested track count. ``` ### Technical Analysis The album name originates from user-supplied concept information. The packaging command incorporates that value into the ZIP filename without quoting, escaping, slug generation, or character validation. If an agent implements the documented command by directly replacing the placeholder and invoking a shell, shell metacharacters in the album name—such as semicolons, command substitutions, pipes, redirection operators, or newlines—will be interpreted as shell syntax rather than as part of the filename. For example, an album name structurally equivalent to: ```text release; attacker-command; # ``` could produce a command with this structure: ```bash zip -r release; attacker-command; #-promotional-materials.zip ... ``` The shell would treat `attacker-command` as a sepa ...[truncated 1942 chars]- Remediation
View remediation
