Back to skill

Security audit

Alibabacloud Sase Pa Network Diagnosis

Security checks for vulnerabilities and agentic risk

Overview

The skill performs a legitimate Alibaba Cloud SASE diagnosis workflow, but its installation and setup guidance creates avoidable supply-chain and credential-handling risk.

Install only after reviewing and replacing the unsafe setup steps. Prefer an official package manager or verified, pinned CLI release; do not pipe remote scripts into bash, do not globally update unrelated plugins, and do not paste Alibaba Cloud access keys or secrets into commands visible to the agent, shell history, logs, or chat. Use a least-privilege RAM identity limited to the three csas diagnosis permissions.

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:47
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 install/update, > or see [references/cli-installation-guide.md](references/cli-installation-guide.md) for installation instructions. ``` ### Technical Analysis The command downloads a mutable shell script from an external URL and sends its contents directly to Bash. There is no intermediate inspection, version pinning, cryptographic checksum verification, or signature validation. Although HTTPS provides transport authentication and integrity under normal conditions, it does not make the remote payload immutable or protect against compromise of the publisher, CDN, domain, DNS infrastructure, signing environment, or release process. The code ultimately executed by the Skill can therefore change after the Skill package has been reviewed. Installing Aliyun CLI may be necessary for the declared workflow, but direct remote script execution is not the minimum-risk installation method required to provide SASE network diagnosis. ### Attack Path 1. An attacker compromises the remote server, CDN, DNS path, release pipeline, or the content served at `https://aliyuncli.alicdn.com/setup.sh`. 2. The attacker replaces or modifies the installation script with a malicious payload. 3. A user or Agent follows the mandatory installation guidance. 4. `curl` retrieves the attacker-controlled response and pipes it directly into Bash. 5. The payload executes with the privileges of the user running the Skill. 6. The payload can access user-readable files, modify local configuration, install additional programs, or target Alibaba Cloud credentials available to that user. ### Impact Assessm ...[truncated 653 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:52
Finding

Mandatory Global Automatic Plugin Installation and Unscoped Plugin Updates

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. > > ```bash > aliyun configure set --auto-plugin-install true > aliyun plugin update > ``` ``` ### Technical Analysis The Skill mandates enabling persistent automatic plugin installation and updating all existing plugins before performing the diagnosis. This creates non-reproducible behavior because the plugin code used at execution time may differ from the code available when the Skill was audited. Updating every installed plugin is broader than the declared need to invoke the CSAS diagnosis commands. It can modify unrelated components and exposes the user to newly published, compromised, or defective plugin releases. Enabling automatic plugin installation also changes persistent CLI configuration and may affect future commands after this Skill has completed. The Skill does not pin an approved CSAS plugin version, verify a plugin checksum or signature, restrict the update to the required product, or restore the previous automatic-installation setting. ### Attack Path 1. An attacker compromises a plugin publication account, repository, distribution service, or release pipeline. 2. A malicious version is published for CSAS or another plugin already installed on the system. 3. The Skill requires the user or Agent to run `aliyun plugin update`. 4. The compromised plugin is downloaded and installed. 5. A later CLI invocation loads or executes the malicious component. 6. The component runs in the context of the credentialed CLI user and may access local data or interfere with cloud API requests. A ...[truncated 882 chars]
Remediation
View remediation

T08 · Insecure Dependencies

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

Unpinned Latest Binary Installed into a Privileged System PATH

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

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

Cloud Credentials Recommended as Plain Command-Line Arguments

Content
View full analysis
\ --access-key-secret \ --region cn-hangzhou ``` The guide repeats this pattern for AK, STS token, role, profile, rotation, and troubleshooting examples elsewhere in the file. ### Technical Analysis The installation guide recommends providing long-lived access keys and other credentials directly as command-line arguments. When placeholders are replaced with real values, sensitive data may be recorded in shell history, terminal logs, command auditing, process telemetry, debugging output, or automation logs. On some systems, command arguments may also be observable by other local processes or administrators while the command is running. This guidance contradicts the safer authentication rules in `SKILL.md`, which prohibit asking for AK/SK values in the conversation or using `aliyun configure set` with literal credential values. Because the reference is linked as the installation and configuration guide, users may follow the less secure instructions despite the primary Skill's restrictions. ### Attack Path 1. A user follows the configuration guide and replaces the placeholders with real Alibaba Cloud access credentials. 2. The shell records the command in history, or local monitoring and auditing systems capture the process arguments. 3. A local attacker, support operator, log reader, compromised process, or later automation job gains access to that record. 4. The attacker extracts the access key ID, access key secret, or STS token. 5. The attacker authenticates to Alibaba Cloud using the recovered credentials. 6. The attacker performs API operations allowed by the credential's RAM policies until the credential ...[truncated 936 chars]
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 (14)

External Script Fetching

High
Category
Supply Chain
Confidence
98% confidence
Finding

The documented command fetches a shell script from the network and immediately executes it via bash, which is a classic unsafe installation pattern. If the remote script or delivery path is tampered with, users could execute arbitrary code on their systems with their current privileges.

Content

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

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill instructs users to install or update the CLI by piping a remotely fetched script directly into bash. This bypasses review of the downloaded content and creates a supply-chain execution risk if the hosting endpoint, transport, or script content is compromised.

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 · SKILL.md (reported line 352)May include surrounding context.

md
| [references/verification-method.md](references/verification-method.md) | Verification method |
| [references/cli-installation-guide.md](references/cli-installation-guide.md) | CLI installation guide |
| [Official Docs: Network Diagnosis](https://help.aliyun.com/zh/sase/user-guide/network-diagnostics) | Alibaba Cloud official guide |
| [CreatePADiagnosisTask API](https://api.aliyun.com/document/csas/2023-01-20/CreatePADiagnosisTask) | Create diagnosis task API doc |
| [GetPADiagnosisTask API](https://api.aliyun.com/document/csas/2023-01-20/GetPADiagnosisTask) | Query diagnosis task API doc |

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 · SKILL.md (reported line 353)May include surrounding context.

md
| [references/verification-method.md](references/verification-method.md) | Verification method |
| [references/cli-installation-guide.md](references/cli-installation-guide.md) | CLI installation guide |
| [Official Docs: Network Diagnosis](https://help.aliyun.com/zh/sase/user-guide/network-diagnostics) | Alibaba Cloud official guide |
| [CreatePADiagnosisTask API](https://api.aliyun.com/document/csas/2023-01-20/CreatePADiagnosisTask) | Create diagnosis task API doc |
| [GetPADiagnosisTask API](https://api.aliyun.com/document/csas/2023-01-20/GetPADiagnosisTask) | Query diagnosis task API doc |

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This reference file is materially over-scoped for a SASE PA network diagnosis skill: it teaches generic Aliyun CLI installation, authentication setup, plugin management, and unrelated cloud-service usage. In an agent skill context, broad operational guidance increases the chance the agent will request, handle, or act on high-privilege credentials and unrelated cloud resources beyond the diagnosis task, expanding attack surface and enabling capability drift.

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

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The guide places access keys and secrets directly on the command line and later recommends environment-variable usage without prominently warning that secrets may be exposed via shell history, process listings, terminal scrollback, CI logs, or agent telemetry. In automation and agent contexts, this is particularly dangerous because credential material may be captured, replayed, or leaked across systems.

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

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The guide explicitly instructs users to install arbitrary Alibaba Cloud product plugins and explore unrelated service commands, which exceeds the stated purpose of a SASE PA diagnosis skill. In an agent-operated environment, this can normalize or facilitate expansion into unrelated cloud management functions, increasing the risk of unauthorized actions if the agent has credentials.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

SQP-3 applies to all file types, including markdown examples and embedded config. Setting "language": "en" in the sample config can be interpreted as forcing a specific language/locale, and the document does not indicate that this is optional or user-selectable.

Content

No source excerpt is available for this finding.