Back to skill

Security audit

Alibabacloud Emr Spark Manage

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly coherent for Alibaba Cloud EMR Serverless Spark management, but it asks for risky installer, plugin update, credential, public endpoint, and broad cloud-permission behaviors that users should review carefully.

Install only if you are comfortable letting the agent operate Alibaba Cloud EMR Serverless Spark with cloud credentials. Use least-privilege RAM roles, avoid FullAccess for routine tasks, do not run the curl-to-bash installer without independent verification, keep CLI auto-plugin installation disabled unless you explicitly accept that supply-chain risk, avoid public Kyuubi endpoints unless network access is restricted, and never paste real Kyuubi tokens directly into command-line examples or chat transcripts.

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:75
Finding

Remote Alibaba Cloud CLI installer is executed without integrity verification

Content
View full analysis
= 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. ``` ### Technical Analysis The command streams the current response from an external URL directly into Bash. No fixed installer version, cryptographic checksum, signature verification, certificate pinning, or manual inspection step is required. Although the hostname appears associated with Alibaba Cloud, hostname appearance alone does not establish the integrity of the response. The effective code can change after the Skill has been reviewed. Compromise of the origin, CDN, DNS resolution, TLS trust chain, or release infrastructure could therefore turn this installation instruction into an arbitrary-code execution channel. Updating the Alibaba Cloud CLI may be a legitimate prerequisite, but direct pipe-to-shell execution is not necessary for the Skill's declared cloud-management functionality. ### Attack Path 1. The Skill checks the installed Alibaba Cloud CLI version. 2. The CLI is absent or older than version 3.3.3. 3. The Agent follows the documented update instruction. 4. `curl` retrieves the current contents of `setup.sh`. 5. Bash executes the response immediately without verifying its contents. 6. A compromised or unexpectedly modified response executes arbitrary commands with the privileges of the user running the Agent. ### Impact Assessment A malicious installer would receive the Agent user's local privileges. Depending on that user's access, it could: - Read or alter local files available to the user. - Access Alibaba Cloud CLI configuration and credentials av ...[truncated 462 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Error
Location
SKILL.md:79
Finding

Mandatory automatic plugin installation and unpinned updates create a mutable supply-chain channel

Content
View full analysis
[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. ``` ### Technical Analysis The Skill mandates enabling automatic plugin installation and updating every existing plugin. No required plugin name, approved version, checksum, signature, or trusted release manifest is specified. CLI plugins are executable dependencies. Enabling automatic installation means that later CLI commands may retrieve and execute components that were not present during the audit. Updating all existing plugins also changes unrelated components beyond the minimum needed for EMR Serverless Spark management. This behavior exceeds least-change requirements because the Skill could instead identify and install only the required EMR Serverless Spark plugin at a reviewed version. ### Attack Path 1. The Agent enables automatic plugin installation globally for the Alibaba Cloud CLI. 2. The Agent runs the unrestricted plugin update command. 3. The CLI contacts its configured plugin source and downloads current plugin releases. 4. A compromised repository, release account, network trust path, or malicious plugin update supplies executable content. 5. The plugin executes in the user's cloud-authenticated environment when the corresponding CLI command is invoked. 6. The compromised plugin can alter request parameters, collect accessible credentials, or run local commands with the user's privileges. ### Impact Assessment A malicious or compromised plugin could obtain: - Local execution under the Alibaba Cloud CLI user's account. - Access to environment-based, profile-based, or instance-role credential ...[truncated 333 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
references/ram-policies.md:5
Finding

Broad account-level RAM policies exceed workflow-specific least privilege

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
references/kyuubi-service.md:54
Finding

Kyuubi examples expose authentication tokens in process arguments and enable public network access

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (17)

External Script Fetching

High
Category
Supply Chain
Confidence
98% confidence
Finding

The skill instructs the agent/user to execute a remote script directly via curl ... | bash, which is a classic supply-chain and arbitrary code execution risk. If the remote endpoint, network path, or downloaded script is compromised, the command would execute attacker-controlled shell code immediately on the host with the user's privileges.

Content

Scanner excerpt · SKILL.md (reported line 76)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.

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

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The description says to use the skill when users want to perform broad actions like viewing status or logs, and includes open-ended examples followed by 'etc.' without clear boundaries or negative examples. In a markdown skill description, this can make invocation scope ambiguous and increase the chance of unintended activation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The token creation and update sections instruct users to supply raw token material but do not warn that this is sensitive credential data that must not be logged, echoed, stored in chat history, or reused insecurely. In an agent context, this increases the risk of secret exposure through transcripts, tool logs, screenshots, or accidental disclosure to other users or systems.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The API reference exposes permission-management operations such as adding members and granting roles, but the skill metadata describes only workspace, job, SQL, and queue management. This capability mismatch can mislead downstream policy enforcement or users, enabling privilege changes through a skill that appears narrower in scope than it actually is.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The manifest describes managing EMR Serverless Spark workspaces, jobs, Kyuubi interactive queries, resource queues, and status/log retrieval, but does not mention session cluster lifecycle operations. This file adds create/start/stop/delete capabilities for session clusters, which are distinct resource-management actions not clearly justified by the declared purpose.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The documentation includes an example that enables publicEndpointEnabled: true for a Kyuubi service but does not clearly warn that this exposes a JDBC endpoint to the public internet and can materially increase attack surface. In this skill context, the danger is higher because the service is an interactive SQL gateway and the same document also describes token-based access, so users may deploy an internet-reachable data access path without understanding exposure, brute-force, credential leakage, or misconfiguration risks.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The examples show tokens supplied directly on the command line (for example via beeline -p {your-token}), but do not warn that command-line secrets may be exposed through shell history, audit logs, terminal recording, or process listings visible to other users on the host. In this skill context, that is particularly sensitive because the token grants access to a Kyuubi SQL service, potentially enabling unauthorized query execution or data access if the secret is captured.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The permission set includes full session-cluster lifecycle operations even though the manifest emphasizes workspaces, jobs, Kyuubi queries, queue scaling, and status/log viewing rather than session-cluster administration. This creates unnecessary privilege breadth, increasing the blast radius if the skill or user workflow is abused.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

Kyuubi token creation, update, listing, and deletion permissions allow management of credentials or credential-like artifacts that can enable interactive access to Spark services. Because token administration is not called out in the skill manifest, users may unknowingly grant secrets-management capability broader than expected.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The documented required permissions include member management and role-granting actions (AddMembers, GrantRoleToUsers) that exceed the skill's stated Spark workspace/job management purpose and cross into IAM-style authorization changes inside the service. If a user follows this guidance, the skill could be used to expand access for additional principals, causing privilege escalation and unauthorized data or workload access.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The document provides direct commands to attach broad system policies, including full administrative access, without an explicit warning that these commands alter account authorization state and may exceed what is needed. This can nudge users into over-privileged setups that make later abuse of the skill or account more damaging.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The developer policy is labeled as read-only for workspace permissions while including EditWorkspaceQueue, which is a modifying action. This mismatch can mislead users and reviewers into granting write privileges under the false assumption they are harmless, enabling unauthorized scaling or resource allocation changes.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The manual service-linked role creation command changes account authorization state and enables cross-service access for EMR Serverless Spark, yet the document does not warn users about that security significance. In the context of an agent skill, such omission increases the chance that users will execute high-impact IAM changes without informed consent.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The documented member-management and role-granting operations expand the skill from Spark workspace/job lifecycle management into IAM-style access administration. That creates a privilege-management path not reflected in the declared scope, increasing the risk that an agent could add principals or assign powerful roles such as Owner without users or reviewers understanding that the skill can modify access control.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
68% confidence
Finding

The manifest explicitly frames SQL execution as 'via Kyuubi', but this file documents SQL statement submission and termination through session clusters using create-sql-statement APIs without referencing Kyuubi. That introduces a SQL execution path that is not clearly covered by the declared intent.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The skill's stated purpose is EMR Serverless Spark workspace and job lifecycle management. This file additionally instructs creation of a service-linked role via Resource Manager, which introduces IAM-role provisioning behavior outside the user-facing scope described by the manifest.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

Line L076 contains mixed-language instructional text (confirm change生效), which reflects inconsistent locale handling in the skill documentation. Under the language/locale policy, user-facing instructions should not implicitly force or assume a specific language without opt-in or clear justification.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.