T09 · Insecure Skill Coding Practices
- Location
scripts/build-cidata-iso.sh:36- Finding
Arbitrary Local Code Execution Through Password Interpolation
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is aligned with creating Docker-ready Hyper-V VMs, but it exposes sensitive VM credentials and includes unsafe high-privilege provisioning paths that need review before use.
Install only if you are comfortable reviewing and hardening the scripts first. Use explicit VM names from a safe character set, provide an explicit SSH public key, avoid returning or logging passwords, verify downloaded binaries and images, and reduce the deploy user's privileges where possible. Treat VMs created by this skill as administrative infrastructure until the template-injection and path-handling issues are fixed.
scripts/build-cidata-iso.sh:36Arbitrary Local Code Execution Through Password Interpolation
scripts/build-cidata-iso.sh:28Unsafe Temporary Path Construction Permits Destructive Path Traversal
scripts/build-cidata-iso.sh:43Cloud-Init Template Injection Through Unescaped User Inputs
scripts/cloud-init-user-data.yaml:24Unverified Remote Docker Compose Binary Installed as Root
scripts/cloud-init-user-data.yaml:5Deploy Account Is Granted Multiple Root-Equivalent Privilege Paths
The skill explicitly instructs returning plaintext SSH credentials to the caller, which creates immediate secret exposure risk in chat logs, agent transcripts, observability systems, and downstream integrations. Because this skill provisions a Docker-ready VM with remote SSH access, disclosure of the password could directly enable unauthorized access to newly created infrastructure.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
set -euo pipefail
VM_NAME="${1:?Usage: VM_PASSWORD=<pass> $0 <vm-name> [ssh-public-key] [extra-packages]}"
SSH_KEY="${2:-$(cat ~/.ssh/id_ed25519.pub 2>/dev/null || echo 'NO_KEY')}"
EXTRA_PKGS="${3:-}"
# Read password from env var or stdin (never CLI args)
Line L056 says the skill applies 'Any time you need a fresh Linux VM on a Windows Hyper-V host,' which is a broad natural-language condition rather than a specific invocation phrase or constrained scope. This can overlap with many ordinary requests and does not clearly distinguish when this skill should or should not activate.
The guidance explicitly disables Hyper-V Secure Boot for Ubuntu cloud images without warning about the reduced boot-chain protections. While this appears operationally motivated rather than malicious, removing Secure Boot lowers resistance to boot-level tampering and should not be presented as a default fix without discussing alternatives or compensating controls.
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
- htop
runcmd:
- systemctl enable docker
- systemctl start docker
- usermod -aG docker deploy
- mkdir -p /usr/local/lib/docker/cli-plugins
This shell script unconditionally runs rm -rf "$WORK_DIR", which is a destructive file deletion operation. While the script includes general usage comments and some status output, there is no specific warning or confirmation around this deletion step itself.
No suspicious patterns detected.