T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:81- Finding
Unverified Remote Installer Is Downloaded and Executed Directly
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This is a plausible Alibaba Cloud RDS Copilot skill, but it needs review because it can change the local CLI environment, install unpinned remote components, handle cloud credentials, and send database context to Alibaba Cloud.
Install only if you intentionally want an agent to use Alibaba Cloud RDS Copilot. Review and approve any CLI install, plugin install/update, sudo command, or credential setup before it runs. Prefer interactive credential configuration, avoid pasting AccessKey secrets into chat or command arguments, use a least-privileged RAM identity, and redact SQL, logs, customer data, connection strings, tokens, and instance details before sending them to Alibaba Cloud.
SKILL.md:81Unverified Remote Installer Is Downloaded and Executed Directly
SKILL.md:68Automatic Installation and Update of an Unpinned CLI Plugin
SKILL.md:119Long-Lived Cloud Credentials Can Be Exposed Through Command-Line Arguments
SKILL.md:138Sensitive SQL and Diagnostic Content May Be Transmitted Without a Redaction Gate
The verification flow captures full CLI output into RESULT, prints it verbatim, and then extracts and echoes ConversationId. In a shared terminal, CI log, or support transcript, this can leak conversation metadata and potentially other response content from the RDS Copilot session, increasing the risk of cross-session correlation or inadvertent disclosure of sensitive prompts/results.
--user-agent 'AlibabaCloud-Agent-Skills/alibabacloud-rds-copilot/{session-id}' 2>&1)
echo "$RESULT"
# Extract ConversationId
CONV_ID=$(echo "$RESULT" | grep -oP '"ConversationId":"[^"]+' | head -1 | cut -d'"' -f4)
echo "ConversationId: $CONV_ID"
The trigger list is broad enough to activate on generic database help requests such as SQL optimization or troubleshooting, even when the user did not intend to use Alibaba Cloud RDS Copilot. In this skill, unintended activation is more dangerous because activation can lead to autonomous installation, plugin changes, and credential prompts or API calls.
The skill explicitly instructs the agent to make the environment 'ready by itself' and to install or upgrade the Alibaba Cloud CLI and plugins without first requiring user-initiated setup. In this context, autonomous modification of the local environment and preparation for cloud access materially increases risk because a loosely triggered skill can perform networked installation and change execution state before the user fully understands the consequences.
## Agent Execution Contract
Before calling RDS Copilot, the agent must make the local environment ready by itself whenever command execution is available. Do not ask the user to install CLI or plugins first if the agent can install or upgrade them directly.
If install or upgrade needs network access, sudo, or tool approval, request that approval with the concrete command and continue after approval.
**Hard gate**: Do not execute `aliyun rdsai chat-messages` until all readiness checks pass:
The instructions allow the agent to proceed from missing prerequisites into credential setup guidance and potentially configuration actions, while enforcing default region and other operational choices. In a skill that can touch real cloud accounts, this degree of autonomous decision-making can steer users into credential entry and account-affecting operations without a narrowly scoped, explicit consent boundary.
- Missing or old CLI: install or upgrade Alibaba Cloud CLI, then re-run `aliyun version`.
- Missing `rdsai` plugin: enable plugin auto-install and install or trigger installation of `rdsai`, then re-check the command.
- Missing/invalid credentials: stop before the RDS Copilot API call and guide the user to configure credentials. If the user asks the agent to configure them, request only the required fields, then configure through `aliyun configure`; never ask the user to paste secrets into environment variables.
**Default region**: If the user does not explicitly provide a region, always use `cn-hangzhou`. Natural language "Hangzhou" maps to `cn-hangzhou`. Keep this default in both `--inputs RegionId=cn-hangzhou` and any credential setup guidance unless the user specifies another region.
The skill includes privileged installation paths using sudo installer and a one-line curl | bash pattern that downloads and executes remote code. This is dangerous because it combines elevated execution with network-fetched content, creating a strong supply-chain and arbitrary code execution risk if the source, transport, or script is compromised.
# Option 2: Install via PKG package
curl -O https://aliyuncli.alicdn.com/aliyun-cli-latest.pkg
sudo installer -pkg aliyun-cli-latest.pkg -target /
# Option 3: Install via one-click script
/bin/bash -c "$(curl -fsSL https://aliyuncli.alicdn.com/install.sh)"
The Linux install instructions direct the agent to download a binary archive from the network and place the extracted executable into /usr/local/bin/ using sudo. Without mandatory integrity verification, this permits privileged installation of potentially tampered binaries and expands the blast radius of any compromise.
curl https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-amd64.tgz -o aliyun-cli.tgz tar xzvf aliyun-cli.tgz sudo mv aliyun /usr/local/bin/
### Verify Installation
The parameter table specifies Language defaulting to zh-CN, and later command examples consistently pass Language=zh-CN, which forces a specific locale unless the user overrides it. Although the skill says it understands Chinese or English, it does not present language selection as an explicit opt-in choice before defaulting to Chinese.
The workflow tells the agent to collect parameters using defaults if unspecified, including Language default zh-CN. This operational instruction reinforces a fixed-language default without requiring consent or selection from the user.
The skill claims it is read-only and requires no cleanup, but earlier instructions direct the agent to install software, enable plugins, modify CLI configuration, and potentially write credentials via aliyun configure. This mismatch can mislead users and higher-level safety systems about the real side effects, increasing the chance of unreviewed environment changes and credential handling.
The criteria hard-code Language=zh-CN, Timezone=Asia/Shanghai, and default region cn-hangzhou without making clear that these should be user-selected or justified by prior configuration. In an operations assistant, forced locale and region can cause user confusion, misrouting of requests, or accidental processing in an unintended jurisdiction, which is more concerning because cloud/database context may be sensitive and region-specific.
The sample aliyun rdsai chat-messages commands send the user's query and accompanying context fields to an external Alibaba Cloud service, but the acceptance criteria do not require any disclosure, consent, or warning before doing so. In a skill meant for SQL optimization and troubleshooting, prompts may contain SQL text, schema details, or operational metadata, so omitting a transmission warning creates a meaningful risk of unintended data exposure to a third party.
The documentation explicitly instructs sending arbitrary user queries, troubleshooting details, SQL text, and multi-turn conversation content to a remote AI service, but it provides no warning about data sensitivity, retention, logging, or consent. In this skill context, prompts may contain database identifiers, SQL statements, operational incidents, and potentially secrets or personal data, so omission of privacy guidance creates a realistic data-exposure risk.
The supported parameter table sets defaults of RegionId=cn-hangzhou, Language=zh-CN, and Timezone=Asia/Shanghai, and all examples repeat those locale choices. This can violate language/locale policy because it imposes a specific language and locale without user opt-in or justification that the skill is intended only for that region.
The verification commands hard-code Language=zh-CN and Timezone=Asia/Shanghai, and later sections repeat the same pattern as expected behavior. This is a natural-language policy concern because the skill appears to require a specific locale without user opt-in or justification that the tool is region-locked.
The instruction says the agent 'must still pass RegionId=cn-hangzhou' even when the user omitted region, which imposes a specific regional setting by default. Without explicit opt-in or a documented reason that this skill is restricted to that region, this is a locale-policy issue.
No suspicious patterns detected.