Back to skill

Security audit

Alibabacloud Oos Template Generation

Security checks for vulnerabilities and agentic risk

Overview

The skill has a coherent Alibaba Cloud OOS template-generation purpose, but its setup and reference guidance push risky local installs, persistent CLI changes, broad permissions, and insecure credential patterns.

Review this skill carefully before installing. Use an isolated environment and a least-privileged Alibaba Cloud profile limited to oos:ListActions and oos:ValidateTemplateContent. Do not run curl-to-bash installers, enable automatic plugin installation globally, update unrelated plugins, grant product-wide FullAccess policies, or place access keys in shell commands, logs, or broadly exported environment variables. Avoid create-template verification unless you explicitly intend to create and later delete a cloud template.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
Findings (6)

T03 · Remote Payload Retrieval and Execution

Error
Location
SKILL.md:26
Finding

Unverified Remote Installation Script Executed Directly by Bash

Content
View full analysis
Run `aliyun version` to verify >= 3.3.3. If not installed or version too low, > run `curl -fsSL https://aliyuncli.alicdn.com/setup.sh | bash` to install/update, > or see [`references/cli-installation-guide.md`](references/cli-installation-guide.md) for installation instructions. ``` ### Technical Analysis The command streams a mutable HTTPS response directly into Bash. The downloaded script is not saved for inspection, pinned to a version, or authenticated using a cryptographic signature or published checksum. The domain appears related to Alibaba Cloud, but domain reputation alone does not establish the integrity of the script returned at execution time. If the hosting infrastructure, distribution pipeline, DNS resolution, trusted certificate chain, or remote script is compromised, the effective payload can change after this Skill has been reviewed. Installing the CLI is ancillary to template generation, and immediate execution of an unverified remote script is not the minimum capability required for the declared functionality. ### Attack Path 1. An attacker compromises the remote script, its hosting infrastructure, or another component in its delivery chain. 2. The Skill detects that Aliyun CLI is missing or outdated. 3. The Agent follows the documented prerequisite and executes the `curl | bash` pipeline. 4. Bash runs the attacker-controlled response immediately under the Agent or user's local account. 5. The payload can access local files, modify configuration, replace executables, read available credentials, or establish persistence using all permissions held by that account. ### Impact Assessment Successful exploitation provides arbitrary local command execution with the privileges of the process running the Skill. If invoked by a privileged user, the ...[truncated 251 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Error
Location
SKILL.md:30
Finding

Mandatory Automatic Installation and Updating of Mutable CLI Plugins

Content
View full analysis
**Pre-check: Aliyun CLI plugin update required** > [MUST] run `aliyun configure set --auto-plugin-install true` to enable automatic plugin installation. > [MUST] run `aliyun plugin update` to ensure that any existing plugins on your local machine are always up-to-date. ``` ### Technical Analysis The Skill requires automatic plugin installation and mandates updating all existing plugins. No plugin version is pinned, no integrity verification procedure is provided, and the update is not limited to the OOS functionality needed by the Skill. This creates a mutable supply-chain dependency whose code can change independently after the Skill is audited. Updating all installed plugins also exposes unrelated components to risk and modifies persistent, user-wide CLI configuration. Because the CLI operates in an authenticated cloud context, malicious plugin code could potentially observe or interfere with subsequent commands. ### Attack Path 1. An attacker compromises a plugin publishing account, plugin repository, update endpoint, or dependency delivery path. 2. A malicious plugin version is published as the current release. 3. The Agent enables automatic plugin installation and executes the mandatory global plugin update. 4. The compromised component is installed without version or digest verification. 5. A subsequent CLI invocation loads or executes the plugin in the user's authenticated environment. 6. The plugin performs unauthorized local actions or cloud API operations permitted to the configured identity. ### Impact Assessment The immediate scope includes execution under the local user's privileges and modification of the user's persistent CLI environment. Cloud impact is bounded by the permissions of the selected Aliyun profile, but may include reading cloud metadata or ...[truncated 140 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Error
Location
references/cli-installation-guide.md:41
Finding

Unchecked Latest CLI Binaries Installed into Privileged Executable Paths

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
references/cli-installation-guide.md:104
Finding

Cloud Credentials Recommended in Plaintext Command Arguments and Environment Variables

Content
View full analysis
\ --access-key-secret \ --region cn-hangzhou ``` The guide also recommends credential-bearing environment variables: ```bash export ALIBABA_CLOUD_ACCESS_KEY_ID=your_access_key_id export ALIBABA_CLOUD_ACCESS_KEY_SECRET=your_access_key_secret export ALIBABA_CLOUD_REGION_ID=cn-hangzhou ``` For STS credentials, it additionally recommends: ```bash export ALIBABA_CLOUD_ACCESS_KEY_ID=your_access_key_id export ALIBABA_CLOUD_ACCESS_KEY_SECRET=your_access_key_secret export ALIBABA_CLOUD_SECURITY_TOKEN=your_sts_token export ALIBABA_CLOUD_REGION_ID=cn-hangzhou ``` ### Technical Analysis Passing secrets as command-line arguments can expose them through shell history, terminal transcripts, process telemetry, CI logs, command auditing, and error reports. Exporting credentials places them in the environment inherited by child processes, increasing the number of processes that can access them. These instructions conflict with the primary Skill's security rules at `SKILL.md:37-39`, which prohibit requesting AK/SK values in commands and prohibit using literal credential values with `aliyun configure set`. The contradiction makes it likely that users or Agents will follow the less secure linked setup procedure. ### Attack Path 1. A user follows the referenced installation guide to configure Aliyun authentication. 2. The user places an access-key secret or STS token directly in a shell command or exported environment variable. 3. The value is retained in shell history, captured by logs or telemetry, or inherited by an untrusted child process. 4. An attacker with access to that source extracts the credential. ...[truncated 634 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:181
Finding

Predictable Shared Temporary File Permits Symlink and Race Attacks

Content
View full analysis
/tmp/oos_template.yaml << 'EOF' EOF ``` The same predictable file is subsequently read: ```bash aliyun oos validate-template-content \ --biz-region-id cn-hangzhou \ --content "$(cat /tmp/oos_template.yaml)" \ --user-agent AlibabaCloud-Agent-Skills/alibabacloud-oos-template-generation ``` ### Technical Analysis The workflow uses a fixed filename in the shared `/tmp` directory. It does not create the file exclusively, validate whether the path is a symbolic link, restrict permissions before writing, or guarantee that the file read during validation is the same object that was written. On a multi-user system, another local process can pre-create the path as a symlink, inspect or modify the file, or replace it between the write and read operations. Since generated template content may contain resource identifiers or operational details, default file permissions can also cause unintended disclosure. ### Attack Path 1. A local attacker predicts the documented `/tmp/oos_template.yaml` path. 2. Before the Skill writes the template, the attacker creates a symbolic link at that path pointing to a file writable by the victim, or creates a file the attacker can monitor and replace. 3. The Skill redirects generated content through the attacker-controlled path. 4. In a symlink attack, the target file is overwritten with the Skill user's privileges. 5. In a race attack, the attacker replaces the temporary file before the validation command reads it. 6. The Skill transmits attacker-substituted content to the remote validation API or discloses the generated template through the shared file. ### Impact Assessme ...[truncated 416 chars]
Remediation
View remediation
"$template_file" <<'EOF' EOF aliyun oos validate-template-content \ --biz-region-id cn-hangzhou \ --content "$(cat -- "$template_file")" \ --user-agent AlibabaCloud-Agent-Skills/alibabacloud-oos-template-generation ``` ]]>

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
references/verification-method.md:20
Finding

Verification Guidance Creates Persistent Cloud Resources Beyond Generation Scope

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
Findings (37)

External Script Fetching

High
Category
Supply Chain
Confidence
100% confidence
Finding

The command curl -fsSL https://aliyuncli.alicdn.com/setup.sh | bash downloads and immediately executes a remote script. This is a classic supply-chain risk: compromise of the remote host, transport path, or script content would lead to arbitrary code execution on the user's machine, and the skill encourages this as a routine prerequisite.

Content

Scanner excerpt · SKILL.md (reported line 27)May include surrounding context.

md
> **Pre-check: Aliyun CLI >= 3.3.3 required**
> Run `aliyun version` to verify >= 3.3.3. If not installed or version too low,
> run `curl -fsSL https://aliyuncli.alicdn.com/setup.sh | bash` to install/update,
> or see [`references/cli-installation-guide.md`](references/cli-installation-guide.md) for installation instructions.

> **Pre-check: Aliyun CLI plugin update required**

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · SKILL.md (reported line 289)May include surrounding context.

md
- Property name case must exactly match the Action definition
- **NEVER** expose AK/SK in commands or output

### Output Rules
- Do not output subtask titles (frontend renders them automatically)
- Do not add Outputs or Parameters that the user did not request
- Templates must be wrapped in `yaml` or `json` code blocks

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The documentation recommends attaching product-wide full-access policies such as AliyunECSFullAccess, AliyunRDSFullAccess, and similar broad roles to support templates. For a template-generation skill, this is excessive and dangerous because it can cause users to grant sweeping control over core cloud services, greatly increasing blast radius if the skill, credentials, or generated automation are misused.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger list includes broad phrases like 'create template' and 'write a template' that are not uniquely tied to Alibaba Cloud OOS. This can cause the skill to activate on unrelated requests and steer the agent into cloud-oriented command generation or validation flows the user did not intend, increasing the risk of inappropriate system or network actions.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The activation section specifies examples of matching intents but does not define clear non-applicability conditions. In practice, this ambiguity can make the agent invoke the skill in borderline cases, causing unnecessary command suggestions, cloud-specific assumptions, or escalation into credential and CLI setup flows without clear user intent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill instructs users to install or update software and plugins, including enabling auto-plugin install, which modifies the local system and future command behavior. These side effects are not prominently disclosed in the high-level description, so a user may trigger the skill expecting mere template generation but instead receive instructions that change their machine state and trust settings.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill gives conflicting instructions about parameter handling: it says all user-customizable parameters must be explicitly confirmed, but later tells the agent to default region values and avoid asking by converting uncertainty into template parameters. In a cloud automation context, ambiguity about scope and targets can cause the agent to generate orchestration templates against unintended regions or resources, increasing the chance of unsafe or unauthorized operations.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill first instructs the agent to extract uncertain values as template parameters, but later forbids adding parameters the user did not request. This contradiction can lead to unpredictable agent behavior, including omission of necessary safety-critical parameters or unauthorized insertion of extra parameters that change template behavior. In infrastructure automation, such ambiguity is dangerous because parameter lists define the control boundary of the generated operation.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

The skill performs an external HTTP request to api.aliyun.com to retrieve OpenAPI metadata. Even if the sample request itself is static, external transmission from an agent workflow can expose operational context, requested services, or future user-supplied parameters if the pattern is generalized, which matters in enterprise environments with data egress restrictions.

Content

Scanner excerpt · SKILL.md (reported line 167)May include surrounding context.

Step 3 (ACS::ExecuteAPI scenario): Query OpenAPI parameters via OpenMeta:

bash
curl -s --connect-timeout 10 --max-time 30 \
  'https://api.aliyun.com/meta/v1/products/Ecs/versions/2014-05-26/apis/DescribeInstances/api.json' \
  | jq '.parameters'

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This markdown explicitly requires that descriptions include both English and zh-cn content, and marks single-language content as incorrect. That is a natural-language locale policy constraint that forces a specific language set without indicating user choice or a clearly documented regional/compliance justification in the file.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This file is a broad Aliyun CLI installation and credential-management guide, which exceeds the skill's stated OOS template-generation purpose. In an agent skill context, unnecessary instructions for installing tooling, configuring credentials, and managing plugins expand the attack surface and can induce users or downstream agents to perform privileged or sensitive actions unrelated to template authoring.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/cli-installation-guide.md (reported line 30)May include surrounding context.

md
tar -xzf aliyun-cli-macosx-latest-amd64.tgz

# Move to PATH
sudo mv aliyun /usr/local/bin/

# Verify
aliyun version

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/cli-installation-guide.md (reported line 45)May include surrounding context.

md
tar -xzf aliyun-cli-macosx-latest-amd64.tgz

# Move to PATH
sudo mv aliyun /usr/local/bin/

# Verify
aliyun version

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/cli-installation-guide.md (reported line 58)May include surrounding context.

md
tar -xzf aliyun-cli-macosx-latest-amd64.tgz

# Move to PATH
sudo mv aliyun /usr/local/bin/

# Verify
aliyun version

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/cli-installation-guide.md (reported line 71)May include surrounding context.

Extract and install

tar -xzf aliyun-cli-linux-latest-arm64.tgz sudo mv aliyun /usr/local/bin/

text

### Windows

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The document introduces general-purpose cloud credential acquisition, storage, profile management, and authentication modes that are not justified for a template-generation skill. In this context, teaching broad account-access workflows makes the skill materially more dangerous because a compromised or overly-helpful agent could steer users into provisioning reusable credentials beyond the minimum needed for authoring templates.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

The guide recommends passing access keys directly on the command line and via non-interactive automation without warning that secrets may be exposed in shell history, process listings, CI logs, agent traces, or persisted configuration. In an agent-driven environment, this is especially risky because tools often capture command arguments and outputs for observability, making credential leakage much more likely.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

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.

Content

Scanner excerpt · references/cli-installation-guide.md (reported line 118)May include surrounding context.

md
1. Log in to Aliyun Console: https://ram.console.aliyun.com/
2. Navigate to: AccessKey Management
3. Create a new AccessKey pair
4. Save the secret immediately — it's only shown once

### Configuration Modes

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The sample configuration file includes an access key secret and does not directly warn that the CLI stores credentials in plaintext on disk. Even if the values are illustrative, normalizing this pattern encourages unsafe storage of long-lived credentials and may lead users to leave highly sensitive secrets in readable files on shared systems or agent hosts.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/cli-installation-guide.md (reported line 404)May include surrounding context.

bash
# Restrict permissions
chmod 600 ~/.aliyun/config.json

Troubleshooting

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The file is for an OOS template generation skill, but it documents an extended policy that includes template creation, deletion, update, and execution permissions far beyond the minimum needed to list actions and validate content. Even though presented as optional, embedding these broader privileges in the skill guidance can normalize over-permissioning and lead users or operators to grant execution-capable access to a generation-only workflow.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/related-commands.md (reported line 158)May include surrounding context.

md
When using `ACS::ExecuteAPI` to call cloud product APIs, query available APIs and their parameter definitions via the Alibaba Cloud OpenMeta API.

**Base URL**: `https://api.aliyun.com/meta/v1`

### URL Patterns

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/related-commands.md (reported line 164)May include surrounding context.

md
When using `ACS::ExecuteAPI` to call cloud product APIs, query available APIs and their parameter definitions via the Alibaba Cloud OpenMeta API.

**Base URL**: `https://api.aliyun.com/meta/v1`

### URL Patterns

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/related-commands.md (reported line 165)May include surrounding context.

md
When using `ACS::ExecuteAPI` to call cloud product APIs, query available APIs and their parameter definitions via the Alibaba Cloud OpenMeta API.

**Base URL**: `https://api.aliyun.com/meta/v1`

### URL Patterns

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/related-commands.md (reported line 166)May include surrounding context.

md
When using `ACS::ExecuteAPI` to call cloud product APIs, query available APIs and their parameter definitions via the Alibaba Cloud OpenMeta API.

**Base URL**: `https://api.aliyun.com/meta/v1`

### URL Patterns

Static analysis

No suspicious patterns detected.