Back to skill

Security audit

Alibabacloud Elasticsearch Instance Manage

Security checks for vulnerabilities and agentic risk

Overview

This skill is for legitimate Alibaba Cloud Elasticsearch administration, but it needs Review because setup and some workflows allow risky local installs, broad cloud changes, and sensitive-data exposure.

Install only if you trust the publisher and are prepared to review setup manually. Do not pipe the remote installer into bash, avoid automatic plugin updates during normal skill use, prefer pinned and verified CLI/plugin versions, use least-privilege RAM permissions for only the modules you need, avoid public-readable OSS buckets for dictionaries when service-role access can work, and require explicit confirmation before password, billing, restart, plugin, YML, or upgrade changes.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
Findings (4)

T03 · Remote Payload Retrieval and Execution

Error
Location
SKILL.md:80
Finding

Unverified Remote Script Is Piped Directly into 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 update, > or see [references/cli-installation-guide.md](references/cli-installation-guide.md) for installation instructions. ``` ### Technical Analysis The instruction streams a mutable response from an external URL directly into Bash. Although HTTPS authenticates the remote endpoint under normal conditions, the workflow does not pin the script version, validate a cryptographic signature or checksum, preserve the script for inspection, or obtain explicit approval before execution. The effective code can consequently change after the Skill has been reviewed. Compromise of the publishing account, CDN, origin server, DNS or TLS infrastructure could turn this installation step into arbitrary command execution. Executing a remote installer is not required for the Skill's core Elasticsearch management functionality. The Skill can instead require a previously installed CLI or direct the user to a verified package-management process. ### Attack Path 1. An attacker compromises the script publication pipeline, origin server, CDN, or another trusted delivery component. 2. The attacker replaces `setup.sh` with a malicious script. 3. The Skill detects that Aliyun CLI is missing or outdated. 4. The documented `curl` command retrieves the attacker's current response. 5. Bash immediately executes the response without integrity verification or review. 6. The payload accesses local files, environment variables, Aliyun CLI profiles, or other resources available to the Agent's operating-system account. ### Impact Assessment Successful exploitation provides arbitrary code execution with the privileges of the user running the Agent. The pa ...[truncated 290 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Error
Location
SKILL.md:84
Finding

Mandatory Automatic Updates and Unverified Latest Binaries Create Supply-Chain Exposure

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 are always up-to-date. aliyun version aliyun configure set --auto-plugin-install true aliyun plugin update ``` The installation guide also retrieves mutable `latest` archives and places the extracted executable into a system-wide path without integrity verification: ```bash wget https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-amd64.tgz tar -xzf aliyun-cli-linux-latest-amd64.tgz sudo mv aliyun /usr/local/bin/ ``` Equivalent unverified workflows are provided for macOS, CentOS/RHEL, and ARM64. ### Technical Analysis The Skill requires automatic plugin installation and unconditional plugin updating. It also directs users to download archives identified only as `latest`, without a pinned release version, checksum, or signature. These dependencies can change after the Skill has been audited. A compromised repository, distribution endpoint, release process, or plugin account could therefore distribute modified executable content. Moving an unverified binary into `/usr/local/bin` with `sudo` magnifies the risk by replacing or introducing a system-wide executable. Automatic installation and updating exceed the minimum privileges necessary for an Elasticsearch management Skill. Updates should be a separate, explicitly approved administrative action. ### Attack Path 1. An attacker compromises the CLI or plugin publication channel. 2. The attacker publishes a modified `latest` archive or plugin update. 3. The Skill requires `aliyun plugin update` or retrieves the mutable archive. 4. No checksum, signature, or versi ...[truncated 643 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
references/config-manage.md:39
Finding

Dictionary Workflow Requires Publicly Readable OSS Storage

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
references/instance-manage.md:702
Finding

Elasticsearch Administrator Password Is Embedded in Command-Line Arguments

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
Findings (31)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
├── Instance Lifecycle --> references/instance-manage.md

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
├── Instance Lifecycle --> references/instance-manage.md

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
├── Instance Lifecycle --> references/instance-manage.md

External Script Fetching

High
Category
Supply Chain
Confidence
97% confidence
Finding

The skill instructs the agent or user to install/update software by piping a remotely fetched script directly into bash. This creates a supply-chain execution risk: if the remote endpoint, transport, DNS path, or hosting content is compromised, arbitrary code can execute on the local machine with the user's privileges before any integrity review occurs.

Content

Scanner excerpt · SKILL.md (reported line 81)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 update,
> or see [references/cli-installation-guide.md](references/cli-installation-guide.md) for installation instructions.

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

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The documented API allows modifying full Elasticsearch YML settings, including security, auth realms, CORS, remote reindex, watcher, and audit options. These are powerful cluster-administration capabilities that go well beyond the manifest's stated examples of snapshot backup and analyzer dictionaries, and beyond the listed triggers centered on instance lifecycle, snapshots, and dictionaries.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The document explicitly states that system/tool commands such as 'aliyun ram ...' must not include '--user-agent', but the sample RAM commands immediately do so anyway. This contradiction can cause automation failures, mislead operators during privileged IAM changes, and encourage copy-paste of invalid command patterns into security-sensitive workflows. In access-management documentation, incorrect command syntax is operationally dangerous because it can break policy attachment or undermine audit/observability assumptions.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest says the skill is for instance lifecycle management and instance-side config such as snapshot backup and analyzer dictionaries. However, the body of the skill also routes and documents plugin management, Kibana settings updates, ES cluster YML updates, admin password changes, instance renaming, charge-type conversion, and version-upgrade continuation flows, which are materially broader capabilities than the manifest description states.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill exposes service-impacting operations such as restart, upgrade/downgrade, plugin changes, cluster YML updates, and password changes without a prominent upfront warning that these actions may cause downtime, degraded availability, rolling restarts, or hard-to-reverse state changes. In an agent context, insufficient friction around destructive operations increases the chance of unsafe execution based on ambiguous user intent or incomplete understanding of operational consequences.

Content

No source excerpt is available for this finding.

Unrestricted Tool Access

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill grants unrestricted tool access without appropriate constraints. An agent with unfettered tool access can perform arbitrary actions including file modification, network requests, and code execution.

Content

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

md
> **CRITICAL: Handling User-Provided Credentials**
>
> If a user attempts to provide AK/SK directly (e.g., "My AK is xxx, SK is yyy"):
> 1. **STOP immediately** — do NOT execute any command
> 2. **Reject the request politely** with the following message:
>    ```
>    For your account security, please do not provide Alibaba Cloud AccessKey ID and AccessKey Secret directly in the conversation.

Scope Creep

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill advertises and routes operations such as UpdateAdminPassword, UpdateDescription, UpdateInstanceChargeType, UpgradeInfo, UpgradeEngineVersion, ListActionRecords, ContinueEsVersionUpgrade, Kibana settings updates, YML updates, and plugin management, but the RAM policy section lists only a smaller subset of permissions. This creates a permissions-scope mismatch between declared minimum actions and the broader operations the skill instructs the agent to perform.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This file substantially exceeds the stated Elasticsearch instance/config management scope by teaching general Alibaba Cloud CLI installation, authentication, profile management, ECS usage, proxying, and plugin exploration. In an agent skill, that scope expansion increases available capabilities and the chance an agent is induced to perform unrelated cloud actions with configured credentials, violating least-privilege and making misuse more dangerous.

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 56)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.

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 84)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 97)May include surrounding context.

Extract and install

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

text

### Windows

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 189)May include surrounding context.

Managing Multiple Profiles

Create Named Profiles

Use interactive mode to create profiles securely:

bash

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 337)May include surrounding context.

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

Troubleshooting

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The documentation explicitly encourages installing unrelated product plugins and exploring commands for services outside Elasticsearch, which broadens the operational surface of the agent beyond its declared purpose. In a credentialed environment, this can enable accidental or unauthorized actions against additional cloud services and undermines containment of the skill's permissions and behavior.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest describes lifecycle management plus instance-side config such as snapshot backup and analyzer dictionaries. This file explicitly adds 'Kibana settings' and 'ES cluster YML configuration', which are additional administrative capabilities not stated in the manifest description or triggers. That is a semantic scope expansion rather than an obvious implementation detail of snapshot/dictionary management.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This markdown documents UpdateKibanaSettings as supporting Kibana UI language changes, but the only concrete CLI example sets i18n.locale to zh-CN directly. Because the file does not pair this with an explicit instruction to ask the user which language they want or to preserve the current setting unless requested, it risks steering the agent to force a specific locale without user opt-in.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill documents a password reset operation for the built-in elastic admin account but does not require an explicit user confirmation or warning immediately before changing credentials. In an agentic context, this can cause accidental lockouts, break dependent automations, and disrupt access if the agent proceeds on an ambiguous request.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill describes conversion from postpaid to prepaid but does not require an explicit warning and confirmation for this billing-affecting, one-way operation. An agent could trigger an unintended financial commitment or service billing change from a loosely phrased request, which is especially risky because the reverse conversion is not supported by this API.

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/instance-manage.md (reported line 1184)May include surrounding context.

md
- [UpdateAdminPassword](https://next.api.aliyun.com/api/elasticsearch/2017-06-13/UpdateAdminPassword)
- [UpdateDescription](https://next.api.aliyun.com/api/elasticsearch/2017-06-13/UpdateDescription)
- [UpdateInstanceChargeType](https://help.aliyun.com/zh/es/developer-reference/api-updateinstancechargetype)
- [UpgradeInfo](https://api.aliyun.com/api/elasticsearch/2017-06-13/UpgradeInfo)
- [UpgradeEngineVersion](https://help.aliyun.com/zh/es/developer-reference/api-upgradeengineversion)
- [ListActionRecords](https://next.api.aliyun.com/api/elasticsearch/2017-06-13/ListActionRecords)
- [ContinueEsVersionUpgrade](https://next.api.aliyun.com/api/elasticsearch/2017-06-13/ContinueEsVersionUpgrade)

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The file adds plugin upload, install, and uninstall capabilities that materially expand the skill beyond the stated manifest scope of instance lifecycle/config management. Scope drift is dangerous because custom plugin handling can introduce arbitrary code into Elasticsearch nodes and restart clusters, increasing operational and security risk without users or policy layers expecting that power.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
85% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · references/plugin-manage.md (reported line 171)May include surrounding context.

md
> **Important Behaviors**
> - The instance must be in `active` status before calling this API.
> - Plugin installation may trigger a cluster restart depending on the plugin type. Perform during off-peak hours.
> - **[MUST] Confirmation gate**: Because this operation may trigger a cluster restart, you **MUST** first present the target instance ID, the plugin(s) to install, and the restart risk to the user, and obtain **explicit confirmation** before executing. Do NOT auto-execute. If the user has not clearly confirmed, **STOP and ASK**.
> - **Prerequisite**: Call `ListPlugins` first to query available system plugins. Only plugins with `state=UNINSTALLED` and `source=SYSTEM` can be installed.

**Parameters**

Static analysis

No suspicious patterns detected.