Back to skill

Security audit

Alibabacloud Elasticsearch Network Manage

Security checks for vulnerabilities and agentic risk

Overview

The skill is for Alibaba Cloud Elasticsearch network management, but its installation and permission guidance creates review-worthy supply-chain and overprivilege risk.

Review this skill carefully before installing. Use a verified package-manager or signed/pinned Aliyun CLI installation path instead of `curl | bash`, avoid global automatic plugin installation, scope RAM permissions to one confirmed instance and one approved action where possible, use temporary or role-based credentials, and require explicit confirmation before public exposure, allowlist replacement, SSO changes, or disabling HTTPS.

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 (4)

T03 · Remote Payload Retrieval and Execution

Error
Location
SKILL.md:29
Finding

Unverified Remote Installation Script Executed Directly by Bash

Content
View full analysis
**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` for installation instructions. ``` ```bash **[MUST] CLI Installation** (if not already installed or version < 3.3.3): ```bash curl -fsSL https://aliyuncli.alicdn.com/setup.sh | bash aliyun version ``` ``` ### Technical Analysis The Skill downloads a mutable shell script from an external URL and immediately sends the response to Bash. The downloaded content is neither included in the audited package nor pinned to an immutable version. There is no checksum validation, cryptographic signature verification, local inspection step, or content allowlist. HTTPS protects the connection in transit but does not guarantee that the current remote payload is the same payload that was reviewed. Compromise of the hosting account, CDN, DNS resolution, certificate infrastructure, or upstream release process could replace the installer after the Skill has passed review. The behavior is marked as mandatory when the CLI is missing or outdated. It is not necessary to pipe remote content directly into a shell to provide the declared Elasticsearch network-management functionality. ### Attack Path 1. An attacker compromises or redirects `aliyuncli.alicdn.com`, its CDN distribution, or the upstream installer publication process. 2. The attacker replaces `setup.sh` with a modified script. 3. The Skill detects that Aliyun CLI is missing or older than version 3.3.3. 4. Following the mandatory instruction, the agent or user runs the `curl | bash` pipeline. 5. Bash executes the attacker-controlled response with all privileges availabl ...[truncated 1003 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Error
Location
SKILL.md:51
Finding

Mandatory Unpinned Plugin Updates and Persistent Automatic Installation

Content
View full analysis
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
references/ram-policies.md:9
Finding

Account-Wide Wildcard Permissions for Security-Sensitive Elasticsearch Operations

Content
View full analysis
Remediation
View remediation
::instances/ ``` 2. Grant only `elasticsearch:DescribeInstance` and the specific write action required for the approved workflow. 3. Separate enable and disable workflows into different roles where operationally feasible. 4. Use temporary STS credentials with a short expiration for agent-driven changes. 5. Require explicit confirmation of account, region, instance ID, action, and intended final security state before obtaining write credentials. 6. Use wildcard resources only when Alibaba Cloud does not support resource-level restriction for a specific action, and clearly document that limitation. 7. Add policy conditions, organizational controls, and audit logging where supported. 8. Revoke the temporary role or session immediately after verification completes. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
references/cli-installation-guide.md:103
Finding

Long-Lived Cloud Credentials Passed Through Command-Line Arguments

Content
View full analysis
\ --access-key-secret \ --region cn-hangzhou ``` The guide then recommends this pattern for automation: ```text All `aliyun configure` commands support non-interactive flags, which is the recommended approach — it works in scripts, CI/CD pipelines, and agent-driven automation without hanging on stdin prompts. ``` Similar command-line secret examples appear at `references/cli-installation-guide.md:129-135`, `160-166`, and `260-271`. ### Technical Analysis Passing an AccessKey secret directly as a command-line argument may expose it through: - Shell history files. - Process listings or process-monitoring tools. - CI/CD job output. - Shell tracing such as `set -x`. - Terminal recording and audit systems. - Agent transcripts or command-execution logs. The recommendation is especially hazardous for scripts, CI/CD, and agent automation because those environments commonly retain command lines and execution logs. This guidance also conflicts with `SKILL.md:107-110`, which states that AK/SK values must never be requested on the command line and that only credential status should be checked. Conflicting guidance increases the probability that an agent or user follows the less secure reference instructions. ### Attack Path 1. A user or automation system follows the installation guide. 2. A long-lived AccessKey ID and secret are inserted into the `aliyun configure set` command. 3. The command is retained in shell history, process telemetry, CI logs, terminal capture, or an agent execution transcript. 4. Another local user, log reader, compromised dependency, or attacker retrieves the secret. 5. The attacker authenticates to Alibaba ...[truncated 840 chars]
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
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
Findings (37)

External Script Fetching

High
Category
Supply Chain
Confidence
99% confidence
Finding

Piping a remotely fetched script directly into bash executes unverified code from the network without integrity checking, review, or pinning. This is especially dangerous in a privileged setup path for a cloud-management skill because compromise of the distribution endpoint, DNS, TLS trust chain, or mirror could lead to arbitrary code execution on the operator’s machine.

Content

Scanner excerpt · SKILL.md (reported line 29)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` for installation instructions.

**[MUST] AI-Mode Configuration**

External Script Fetching

High
Category
Supply Chain
Confidence
99% confidence
Finding

This repeats the same unsafe installation pattern of executing a remote script directly from the network. Because the skill labels the step as "[MUST] CLI Installation," it materially increases the likelihood that users will run it without scrutiny, making arbitrary code execution a realistic risk.

Content

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

[MUST] CLI Installation (if not already installed or version < 3.3.3):

bash
curl -fsSL https://aliyuncli.alicdn.com/setup.sh | bash
aliyun version

Chaining Abuse

High
Category
Tool Misuse
Confidence
98% confidence
Finding

The | bash construct is a classic command-chaining pattern that turns fetched content into immediate execution, eliminating opportunities for validation and making downstream compromise trivial if the fetched content is malicious or tampered with. In this skill, it is embedded in operational guidance for administrators, amplifying the risk to cloud environments managed from that workstation.

Content

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

[MUST] CLI Installation (if not already installed or version < 3.3.3):

bash
curl -fsSL https://aliyuncli.alicdn.com/setup.sh | bash
aliyun version

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
**Parameters:** See [references/related-apis.md](references/related-apis.md) for full details.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
**Parameters:** See [references/related-apis.md](references/related-apis.md) for full details.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The documentation explains how to disable HTTPS for an Elasticsearch instance without warning that doing so reduces transport confidentiality and integrity. In the context of an Elasticsearch network-management skill, this is especially risky because it can expose credentials, session tokens, queries, and data to interception or manipulation over the network.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger phrase "white ip" is ambiguous and can refer to many unrelated allowlist tasks, increasing the chance this skill is invoked outside its intended Elasticsearch context. Because the skill can overwrite access control lists, accidental invocation could lead to disruptive or insecure network policy changes.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The trigger phrase "white ip" is ambiguous and can refer to many unrelated allowlist tasks, increasing the chance this skill is invoked outside its intended Elasticsearch context. Because the skill can overwrite access control lists, accidental invocation could lead to disruptive or insecure network policy changes.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill includes a workflow to disable HTTPS but does not present a prominent warning that this reduces transport security and may expose credentials, session data, or query traffic to interception if used over untrusted networks. In a network-management skill, normalizing a "close-https" action without explicit risk framing makes unsafe downgrades more likely.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This markdown file includes examples for modify-white-ips, open-https, and close-https, which can materially affect network access and security posture. The acceptance criteria focus on syntax correctness but do not warn users that these operations may alter exposure, interrupt access, or require validation before execution.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% 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/acceptance-criteria.md (reported line 270)May include surrounding context.

aliyun elasticsearch trigger-network --instance-id es-cn-xxx --body '{"nodeType":"WORKER","networkType":"PUBLIC","actionType":"OPEN"}' --user-agent AlibabaCloud-Agent-Skills

text

❌ **INCORRECT** — Execute without checking architecture type:
```bash
# Error: Did not check archType
aliyun elasticsearch trigger-network --instance-id es-cn-xxx --body '{"nodeType":"WORKER","networkType":"PUBLIC","actionType":"OPEN"}' --user-agent AlibabaCloud-Agent-Skills

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

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The guide demonstrates passing long-lived access keys directly on the command line and via environment variables, but does not warn that CLI arguments may be captured in shell history, process listings, CI logs, or persisted in local config files. In an automation-focused skill, this increases the chance that users operationalize insecure secret-handling patterns and unintentionally expose cloud credentials.

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

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

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The documentation provides a full-permission policy granting powerful network and security-modifying Elasticsearch actions on all resources using "Resource": "*" without prominent warnings about the risk of changing exposure, disabling HTTPS, altering IP allowlists, or modifying SSO settings. In the context of an agent skill specifically designed to manage Elasticsearch networking, this can encourage overprivileged deployments and make accidental or unauthorized weakening of access controls more likely.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% 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 · SKILL.md (reported line 296)May include surrounding context.

md
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| whiteIpList | Array<String> | Yes | IP whitelist, will update Default group |
| nodeType | String | Yes | Node type: WORKER (ES cluster) / KIBANA |
| networkType | String | Yes | Network type: PUBLIC / PRIVATE |

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% 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 · SKILL.md (reported line 308)May include surrounding context.

md
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| whiteIpList | Array<String> | Yes | IP whitelist, will update Default group |
| nodeType | String | Yes | Node type: WORKER (ES cluster) / KIBANA |
| networkType | String | Yes | Network type: PUBLIC / PRIVATE |

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% 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 · SKILL.md (reported line 316)May include surrounding context.

md
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| whiteIpList | Array<String> | Yes | IP whitelist, will update Default group |
| nodeType | String | Yes | Node type: WORKER (ES cluster) / KIBANA |
| networkType | String | Yes | Network type: PUBLIC / PRIVATE |

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% 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/related-apis.md (reported line 280)May include surrounding context.

md
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| whiteIpList | Array<String> | Yes | IP whitelist, will update Default group |
| nodeType | String | Yes | Node type: WORKER (ES cluster) / KIBANA |
| networkType | String | Yes | Network type: PUBLIC / PRIVATE |

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% 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/related-apis.md (reported line 308)May include surrounding context.

md
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| whiteIpList | Array<String> | Yes | IP whitelist, will update Default group |
| nodeType | String | Yes | Node type: WORKER (ES cluster) / KIBANA |
| networkType | String | Yes | Network type: PUBLIC / PRIVATE |

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% 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/related-apis.md (reported line 314)May include surrounding context.

md
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| whiteIpList | Array<String> | Yes | IP whitelist, will update Default group |
| nodeType | String | Yes | Node type: WORKER (ES cluster) / KIBANA |
| networkType | String | Yes | Network type: PUBLIC / PRIVATE |