T09 · Insecure Skill Coding Practices
- Location
SKILL.md:63- Finding
Unquoted Environment Variables Permit Argument and Option Injection
- Content
View full analysis
&1 | tail -30 ``` ```bash rsync -avz $RSYNC_EXCLUDE server:/tmp/static_mirror/DOMAIN/ ./build/site/ rsync -avz $RSYNC_EXCLUDE server:$WP_ROOT/wp-content/uploads/ ./build/site/wp-content/uploads/ rsync -avz $RSYNC_EXCLUDE server:$WP_ROOT/wp-content/themes/ ./build/site/wp-content/themes/ rsync -avz $RSYNC_EXCLUDE server:$WP_ROOT/wp-content/plugins/ ./build/site/wp-content/plugins/ rsync -avz $RSYNC_EXCLUDE server:$WP_ROOT/wp-includes/ ./build/site/wp-includes/ ``` ```bash gh repo create $WP_SITE_NAME --private --source=. --push CLOUDFLARE_ACCOUNT_ID=$CF_ACCOUNT_ID wrangler pages project create $WP_SITE_NAME --production-branch main CLOUDFLARE_ACCOUNT_ID=$CF_ACCOUNT_ID wrangler pages deploy ./public --project-name $WP_SITE_NAME ``` ### Technical Analysis Values such as `WP_SSH_KEY`, `WP_SSH_PORT`, `WP_SSH_USER`, `WP_SSH_HOST`, `WP_SITE_URL`, `WP_ROOT`, and `WP_SITE_NAME` are expanded without quoting or strict validation. Unquoted shell expansion enables word splitting and pathname expansion. Values beginning with hyphens may also be interpreted as additional command options where option parsing remains active. This can change command semantics, split one intended value into several arguments, select an unintended SSH identity or destination, alter rsync source paths, or supply unintended ...[truncated 1985 chars]- Remediation
View remediation
