T09 · Insecure Skill Coding Practices
- Location
scripts/setup.sh:183- Finding
Alibaba Cloud credentials are collected through exposed command-line arguments
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is a plausible Alibaba Cloud ECS management tool, but it handles powerful cloud credentials and network-changing actions in ways users should review carefully before installing.
Install only if you are comfortable giving this skill Alibaba Cloud ECS authority. Use a least-privilege RAM user rather than broad ecs:* permissions, avoid pasting long-lived secrets into chat or shell commands, rotate any key already entered that way, verify ~/.aliyun/config.json permissions, and manually confirm all stop/reboot, snapshot rollback, and security-group changes, especially any rule that exposes a port to 0.0.0.0/0.
scripts/setup.sh:183Alibaba Cloud credentials are collected through exposed command-line arguments
src/index.js:367Security-group rules default to unrestricted public IPv4 ingress
scripts/setup.sh:88Credential configuration is written non-atomically without securing the directory or destination first
The documented scope does not clearly disclose local credential file access under ~/.aliyun/config.json, and the claimed remote execution capability is not substantiated in the supplied content. Hidden or underexplained credential-file access is risky because it may expose or reuse sensitive secrets beyond what the user expects from an ECS operations skill.
The documented scope does not clearly disclose local credential file access under ~/.aliyun/config.json, and the claimed remote execution capability is not substantiated in the supplied content. Hidden or underexplained credential-file access is risky because it may expose or reuse sensitive secrets beyond what the user expects from an ECS operations skill.
The documented scope does not clearly disclose local credential file access under ~/.aliyun/config.json, and the claimed remote execution capability is not substantiated in the supplied content. Hidden or underexplained credential-file access is risky because it may expose or reuse sensitive secrets beyond what the user expects from an ECS operations skill.
Resetting a disk to a snapshot is inherently destructive and may overwrite current data or render a workload unusable if applied incorrectly. Performing this action without an explicit warning and strong confirmation is dangerous in an autonomous or assistant-driven workflow.
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
if (!rules) return [];
return rules.map(rule => ({
ipProtocol: rule.ipProtocol,
portRange: rule.portRange,
sourceCidrIp: rule.sourceCidrIp,
The README prominently advertises security-sensitive and potentially destructive capabilities such as starting/stopping/restarting instances, managing snapshots, and modifying security group rules, but it does not warn users about service disruption, accidental exposure, or rollback risks. In a cloud infrastructure skill, these operations directly affect production availability and network security, so omission of cautions increases the likelihood of harmful misuse or operator error.
The installation instructions tell users to pass the Alibaba Cloud Access Key ID and Access Key Secret directly on the command line without any warning about shell history, process listing exposure, or secure storage. Because these are cloud credentials for infrastructure management, disclosure could let an attacker control instances, snapshots, and security groups across the account scope granted to the key.
The skill invokes shell scripts and depends on environment/local filesystem state, but it declares no explicit tool scope or permissions boundary. In an agent setting, this increases the chance of unintended shell execution and local data access without clear user/admin review, especially because the skill can install packages and write config files.
The skill instructs users to paste long-lived AccessKey ID and AccessKey Secret directly into the chat-driven workflow, then passes them on the command line to a setup script and stores them in ~/.aliyun/config.json. This is dangerous because secrets may be exposed in conversation logs, shell history, process listings, or local plaintext storage, enabling full compromise of the associated Alibaba Cloud account or ECS resources.
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
}
EOF
chmod 600 "$CONFIG_FILE"
echo -e "${GREEN}✓ 配置文件创建完成 ($CONFIG_FILE)${NC}"
}
The script accepts the Alibaba Cloud AccessKey Secret via the --access-key-secret command-line argument, which exposes the secret to shell history, process listings, audit logs, and potentially other local users while the process runs. In the context of a cloud-management skill, this is especially sensitive because compromise of these credentials can enable broad control over ECS resources.
The manifest describes querying instances, monitoring, firewall, snapshots, and remote execution, but does not mention powering instances on/off or rebooting them. These functions introduce state-changing operational control over ECS instances that goes beyond the listed behavior in the skill description.
Start, stop, and reboot operations are state-changing and can disrupt workloads, but this file executes them directly with no user-facing warning, confirmation, or safety interlock. In an agent context, missing confirmation increases the chance of accidental downtime from misunderstood or ambiguous prompts.
The code can reset a disk to a snapshot, which is a destructive rollback operation with significant availability and integrity impact. Because this capability is not surfaced in the stated skill description, users may invoke the skill without understanding it can perform irreversible restoration actions.
Authorizing security group rules changes network exposure and can unintentionally open services to the internet, especially given the permissive default sourceCidrIp of 0.0.0.0/0. Without warning or confirmation, an agent could expose sensitive ports or widen access based on a vague request.
The help text and user-facing messages are presented only in Chinese, and the code later also formats timestamps with a fixed 'zh-CN' locale. This enforces a specific language/locale without any opt-in or alternative, which matches the language/locale policy violation criteria.
The skill description is entirely presented in Chinese and says the user can manage ECS with natural language, but it does not indicate whether other languages are supported or allow user opt-in to a preferred language. This can be a locale/language policy concern when a skill appears to force a specific language without explicit justification.
The dependency uses a caret version range, which allows installation of newer upstream releases that were not explicitly reviewed by the skill author. If the dependency publisher account is compromised, a malicious release is published, or a breaking/security-regressing update lands, consumers of this skill could pull unsafe code during install or deployment.
"author": "Leo & AI Agent",
"license": "MIT",
"dependencies": {
"@alicloud/openapi-client": "^0.4.10",
"@alicloud/ecs20140526": "^7.0.0"
}
}
The dependency uses a caret version range, which permits unreviewed future versions of the Alibaba Cloud ECS SDK to be resolved. In a cloud-management skill, third-party SDK code often runs with access to cloud credentials and management operations, so a compromised or vulnerable update could materially affect infrastructure.
"license": "MIT",
"dependencies": {
"@alicloud/openapi-client": "^0.4.10",
"@alicloud/ecs20140526": "^7.0.0"
}
}
User-facing messages, help text, and usage instructions are all hard-coded in Chinese throughout the script. This imposes a specific language on all users without any documented choice, which matches the language/locale policy violation criteria.
The code uses toLocaleString('zh-CN') for monitor output, which forces Chinese locale formatting regardless of user preference. Because no language or locale choice is offered, this is a natural-language policy concern.
No suspicious patterns detected.