T09 · Insecure Skill Coding Practices
- Location
scripts/deploy.sh:215- Finding
Shell Command Injection Through Deployment Metadata
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This deployment skill has a legitimate purpose, but its scripts expose users to unexpected local code execution, persistent cloud credential storage, and service-affecting cloud changes with limited safeguards.
Review this skill before installing or using it on a machine with valuable files or production cloud credentials. Use only trusted build commands and metadata values, prefer short-lived or isolated credentials, verify exact project IDs before deploy/offline/delete operations, and avoid running it in shared or CI environments unless credential persistence and npm package installation are acceptable.
scripts/deploy.sh:215Shell Command Injection Through Deployment Metadata
scripts/deploy.sh:132Python Code Injection Through the Secrets File Path
scripts/setup.sh:16Unpinned Nest CLI Installation Creates Supply-Chain Risk
scripts/deploy.sh:177Arbitrary Shell Execution Through the Build Command Option
scripts/deploy.sh:205Ambiguous Project Name Matching Can Modify the Wrong Deployment
The skill documents a destructive delete operation (manage.sh delete --pages p-xxx) without any warning about irreversible project removal, confirmation expectations, or guidance to verify the target before execution. In an agent-driven workflow, users may copy or invoke this command with limited review, increasing the risk of accidental deletion of production Pages projects or associated deployment state.
The script persists access_key and secret_key into the nest CLI global config using config set -g, which stores credentials beyond the lifetime of this deployment. On shared machines, CI runners, or agent environments, later processes or users may read or reuse these credentials, increasing the blast radius of any compromise.
The script executes the user-provided --build-cmd value with shell eval, which permits arbitrary shell metacharacters, command substitution, and chaining. In an agent/skill context, this is dangerous because untrusted or indirectly influenced input can lead to arbitrary code execution on the host running the deployment, including secret theft or filesystem tampering.
The script offers a user-controlled build command and executes it via eval without an explicit trust boundary or safety warning. In this deployment skill, that makes the feature more dangerous because build parameters may come from automation, wrappers, or less-trusted operators, turning a convenience option into arbitrary command execution.
The offline command performs a service-affecting operation immediately with no confirmation, dry-run, or explicit warning. In a deployment-management skill, this increases the risk of accidental downtime from mistyped IDs, automation misuse, or an operator misunderstanding, especially since nearby destructive actions like delete do require confirmation.
The script reads the Secret Key with a normal prompt, so the credential is echoed to the terminal as the user types. This can expose the secret to shoulder-surfing, screen recording, terminal logs, or session capture tools, which is especially risky in a deployment setup workflow where real cloud credentials are being entered interactively.
The script persists the access key and secret key into the CLI's global configuration without clearly warning the user that long-lived cloud credentials will be stored on disk for future use. If the local machine, home directory, backups, or config files are later accessed by another user or malware, these credentials could be recovered and used to manage or deploy cloud resources.