T09 · Insecure Skill Coding Practices
- Location
references/diagnose.md:31- Finding
Command Injection Through Unvalidated Deployment State Values
- Content
View full analysis
--Type RunShellScript --InstanceId.1 \ --ContentEncoding Base64 \ --CommandContent "$(printf '%s' 'systemctl is-active ; systemctl is-active nginx; ss -ltnp | grep -E ":80|:"; nginx -t 2>&1 | tail -n 3; df -h /; uptime; top -bn1 | head -n 12; free -m; journalctl -u --since "30 min ago" --no-pager | tail -n 80' | base64)" aliyun ecs DescribeInvocations --RegionId --InvokeId --IncludeOutput true ``` The recovery procedure uses the same unsafe construction: ```bash aliyun ecs RunCommand --RegionId --Type RunShellScript --InstanceId.1 \ --ContentEncoding Base64 \ --CommandContent "$(printf '%s' 'systemctl restart && sleep 3 && systemctl is-active ' | base64)" aliyun ecs DescribeInvocations --RegionId --InvokeId --IncludeOutput true ``` ### Technical Analysis The Skill does not require strict syntactic validation of `service_name`, `app_port`, `region`, or ECS iden ...[truncated 1926 chars]- Remediation
View remediation
