Back to skill

Security audit

Alibabacloud Sas Install Agent

Security checks for vulnerabilities and agentic risk

Overview

This skill is purpose-aligned for Alibaba Cloud Security Center work, but it asks for high-impact cloud and host authority with unsafe installer and dependency-update patterns that users should review carefully.

Install only if you are comfortable with a skill that can affect Alibaba Cloud Security Center state, run commands on ECS hosts, install or uninstall endpoint agents, and change paid protection settings. Prefer verified Aliyun CLI and agent installation methods, avoid global auto-plugin updates, use least-privilege temporary credentials or RAM roles, and require explicit confirmation for any remote install, uninstall, scan dispatch, or billing-affecting change.

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

Unverified Remote Installation Script Is Piped Directly into 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 install/update, > or see `references/cli-installation-guide.md` for installation instructions. > Then [MUST] run `aliyun configure set --auto-plugin-install true` to enable automatic plugin installation. ``` ### Technical Analysis The command streams the current response from an external URL directly into Bash. The downloaded content is not inspected, pinned to a version, authenticated with a package signature, or checked against a published cryptographic digest before execution. Although the hostname appears related to Alibaba Cloud, repository content alone does not establish endpoint ownership or guarantee that the response will remain unchanged. The effective executable payload can change after the Skill has been reviewed. Compromise of the publishing account, CDN, origin server, DNS resolution, TLS trust chain, or release process could therefore turn this instruction into an arbitrary-code-execution channel. The command runs with all privileges available to the invoking shell. If a user invokes the Skill from a privileged account, the remote script receives those elevated privileges. Installing a CLI is legitimate for the declared functionality, but executing a mutable response without verification is not the minimum-risk installation method. ### Attack Path 1. An attacker compromises the script publishing process, origin server, CDN, DNS path, or another component capable of controlling the HTTPS response. 2. The user invokes the Skill on a system where the Aliyun CLI is absent or below the required version. 3. The Skill instructs the user or Agent to execut ...[truncated 818 chars]
Remediation
View remediation

T03 · Remote Payload Retrieval and Execution

Error
Location
references/agent-install-guide.md:64
Finding

Security Agent Installers Are Downloaded and Executed Without Integrity Verification

Content
View full analysis
``` ```bash wget "https://aegis.alicdn.com/download/install/2.0/linux/AliAqsInstall.sh" && chmod +x AliAqsInstall.sh && ./AliAqsInstall.sh -k= ``` ```powershell powershell -executionpolicy bypass -c "(New-Object Net.WebClient).DownloadFile('https://update2.aegis.aliyun.com/download/install/2.0/windows/AliAqsInstall.exe', $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath('.\AliAqsInstall.exe'))"; "./AliAqsInstall.exe -k=" ``` ```powershell powershell -executionpolicy bypass -c "(New-Object Net.WebClient).DownloadFile('https://aegis.alicdn.com/download/install/2.0/windows/AliAqsInstall.exe', $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath('.\AliAqsInstall.exe'))"; "./AliAqsInstall.exe -k=" ``` The overseas and leased-line variants repeat the same unsafe retrieval-and-execution model: ```bash wget "https://update6.aegis.aliyun.com/download/install/2.0/linux/AliAqsInstall.sh" && chmod +x AliAqsInstall.sh && ./AliAqsInstall.sh "-j=jsrv-abroad.aegis.aliyuncs.com|jsrv.aegis.aliyun.com" "-u=aegis.alicdn.com|update6.aegis.aliyun.com|update.aegis.aliyun.com" -k= ``` ```bash wget "https://update2.aegis.aliyun.com/download/install/2.0/linux/AliAqsInstall.sh" && chmod +x AliAqsInstall.sh && ./AliAqsInstall.sh "-j=jsrv2.aegis.aliyun.com|jsrv3.aegis.aliyun.com|jsrv4.aegis.aliyun.com|jsrv5.aegis.aliyun.com| ...[truncated 2512 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:28
Finding

Mandatory Automatic Plugin Installation and Unscoped Plugin Updates Expand the Supply-Chain Surface

Content
View full analysis
Then [MUST] run `aliyun configure set --auto-plugin-install true` to enable automatic plugin installation. > Then [MUST] run `aliyun plugin update` to ensure that any existing plugins on your local machine are always up-to-date. ``` ### Technical Analysis The Skill mandates enabling automatic plugin installation and updating every existing local plugin. Neither command pins plugin versions or limits updates to the SAS and ECS components required by this Skill. Automatic installation permits future CLI invocations to fetch code that was not present during Skill review. Updating all existing plugins also modifies unrelated components in the user's CLI environment, which exceeds the minimum changes needed for Security Center onboarding and management. This behavior creates an avoidable supply-chain risk and can introduce compatibility changes into unrelated workflows. The project does not document signature or digest verification for plugins before they are installed or updated. ### Attack Path 1. A malicious or compromised plugin version is published through a source trusted by the CLI, or the plugin distribution infrastructure is compromised. 2. The Skill enables automatic plugin installation globally for the local CLI configuration. 3. A later product command causes the CLI to retrieve the compromised plugin automatically, or `aliyun plugin update` retrieves it during the pre-check. 4. The plugin executes within the CLI process under the invoking user's identity. 5. The plugin can access information and resources available to that CLI execution context, including active cloud credentials. ### Impact Assessment A compromised plugin could execute arbitrary local code as the invoking user and make authenticated Alibaba Cloud API requests ...[truncated 214 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

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

Credential Guide Exposes Access Keys Through Command-Line Arguments and Conflicts with the Skill's Security Rules

Content
View full analysis
\ --access-key-secret \ --region cn-hangzhou ``` It also provides concrete-looking placeholder examples: ```bash aliyun configure set \ --mode AK \ --access-key-id LTAI5tXXXXXXXX \ --access-key-secret 8dXXXXXXXXXXXXXXXXXXXXXXXX \ --region cn-hangzhou ``` Temporary credentials and role-assumption examples repeat the pattern: ```bash aliyun configure set \ --mode StsToken \ --access-key-id LTAI5tXXXXXXXX \ --access-key-secret 8dXXXXXXXXXXXXXXXXXXXXXXXX \ --sts-token v1.0:XXXXXXXXXXXXXXXX \ --region cn-hangzhou ``` ```bash aliyun configure set \ --mode RamRoleArn \ --access-key-id LTAI5tXXXXXXXX \ --access-key-secret 8dXXXXXXXXXXXXXXXXXXXXXXXX \ --ram-role-arn acs:ram::123456789012:role/AdminRole \ --role-session-name my-session \ --region cn-hangzhou ``` The key-rotation guidance also places new secrets directly in arguments: ```bash aliyun configure set --access-key-id NEW_KEY --access-key-secret NEW_SECRET ``` This conflicts with the primary Skill instructions in `SKILL.md:34-36`: ```text - NEVER read, echo, or print AK/SK values - NEVER ask the user to input AK/SK directly in the conversation or command line - NEVER use `aliyun configure set` with literal credential values ``` ### Technical Analysis Supplying secrets as command-line arguments can expose them through shell history, terminal recording, process inspection, CI/CD logs, debugging output, audit tooling, or copied command transcripts. The guide's approach directly contradicts the stronger credential-handling requiremen ...[truncated 1640 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
  • Rogue AgentSelf-Modification, Session Persistence
Findings (33)

External Script Fetching

High
Category
Supply Chain
Confidence
98% confidence
Finding

The skill instructs users to execute a remote installer via curl ... | bash, which downloads code from the network and immediately executes it without integrity verification, review, or pinning. In this skill's context, that is especially dangerous because it is framed as a mandatory prerequisite, making users more likely to run high-trust shell code on local systems where compromise could expose cloud credentials, alter CLI behavior, or install malicious tooling.

Content

Scanner excerpt · SKILL.md (reported line 26)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` for installation instructions.
> Then [MUST] run `aliyun configure set --auto-plugin-install true` to enable automatic plugin installation.
> Then [MUST] run `aliyun plugin update` to ensure that any existing plugins on your local machine are always up-to-date.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
> Detailed API parameters: `references/api-reference.md`. RAM permissions: `references/ram-policies.md`. Full command list: `references/related-commands.md`.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
> Detailed API parameters: `references/api-reference.md`. RAM permissions: `references/ram-policies.md`. Full command list: `references/related-commands.md`.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
> Detailed steps and field mappings: `references/manage-scenarios.md#scenario-5-query-version-and-feature-info`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
> Detailed steps and field mappings: `references/manage-scenarios.md#scenario-5-query-version-and-feature-info`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
> Detailed steps and field mappings: `references/manage-scenarios.md#scenario-5-query-version-and-feature-info`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
> Detailed steps and field mappings: `references/manage-scenarios.md#scenario-5-query-version-and-feature-info`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
> Detailed steps and field mappings: `references/manage-scenarios.md#scenario-5-query-version-and-feature-info`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
> Detailed steps and field mappings: `references/manage-scenarios.md#scenario-5-query-version-and-feature-info`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
> Detailed steps and field mappings: `references/manage-scenarios.md#scenario-5-query-version-and-feature-info`

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill declares activation on vague phrases like "onboard to Security Center," "install security agent," and especially "deploy cloud security," which are broad enough to match many general support requests. The file does not provide negative examples or sharper scope boundaries for when this scenario should or should not activate, increasing the risk of unintended invocation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The guide instructs users to download and immediately execute installer binaries/scripts from remote URLs with elevated privileges, but does not include a clear security warning or integrity verification step. In an agent-installation skill, this is particularly risky because users are expected to run these commands as root/Administrator, so a compromised download source, DNS interception, or mistaken copy/paste could lead to full host compromise.

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/agent-install-guide.md (reported line 58)May include surrounding context.

md
**Procedure**:
1. Obtain install command (via console or API `describe-install-codes` / `add-install-code`)
2. Select the corresponding command based on server OS and network access method
3. Log into the server and execute the command with admin privileges

> Install code (`-k=` parameter) is obtained via the describe-install-codes API. Different access methods correspond to different install codes.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This markdown file describes use of invoke-command/run-command to execute installation commands remotely on ECS instances, including fetching and executing a shell script. While it states the purpose, it does not warn the user about the safety implications of remote code execution on target servers or the impact of installing software remotely.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This section documents an operation that uninstalls the Security Center client from servers, which is a destructive change to endpoint protection state. Although a consequence is mentioned later in the constraints, there is no prominent user warning in the section header/purpose or invocation area alerting users before they perform the action.

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

Session Persistence

Medium
Category
Rogue Agent
Confidence
78% confidence
Finding

The guide strongly promotes creating long-lived AccessKey pairs and storing secrets for repeated CLI use, including examples that persist credentials in ~/.aliyun/config.json and environment variables. In an agent automation context, this increases the chance of credential persistence, accidental logging, reuse beyond intended scope, or theft from disk and process environments.

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

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The guidance to ignore intermediate error messages weakens normal operator caution and may cause users to overlook meaningful installation failures, security warnings, or signs of tampering. In a security-agent installation workflow, suppressing attention to errors is especially risky because users may falsely conclude the host is protected when onboarding actually failed or partially failed.

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

md
| Anti-virus | 6 | Virus scanning capabilities |
| Ultimate | 7 | Host and container comprehensive protection |

> If the user has already specified a version in conversation (e.g. "bind Ultimate"), use the corresponding version number directly without asking again.

#### 3b: Secondary Confirmation

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

md
| Anti-virus | 6 | Virus scanning capabilities |
| Ultimate | 7 | Host and container comprehensive protection |

> If the user has already specified a version in conversation (e.g. "bind Ultimate"), use the corresponding version number directly without asking again.

#### 3b: Secondary Confirmation

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
89% confidence
Finding

This flow instructs the agent to automatically execute a subscription authorization bind after a single confirmation, which enables a paid protection tier and triggers an irreversible 30-day unbind constraint. In an agent setting, a mis-scoped asset lookup, prompt confusion, or stale context could cause the wrong server to be bound, leading to unintended billing changes and operational lock-in.

Content

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

Confirm binding? (yes/no)

text

After confirmation, auto-execute:
```bash
aliyun sas bind-auth-to-machine --auth-version <version-number> --bind "<UUID>" --user-agent AlibabaCloud-Agent-Skills/alibabacloud-sas-install-agent

Static analysis

No suspicious patterns detected.