Back to skill

Security audit

Alibabacloud Sas Alert Handler

Security checks for vulnerabilities and agentic risk

Overview

The skill has a legitimate Alibaba Cloud security-alert purpose, but its setup and handling instructions give it high-impact authority with unsafe dependency and credential-handling guidance.

Review this skill carefully before installing. Use a least-privilege RAM role or read-only policy where possible, avoid root or administrator Alibaba Cloud credentials, do not paste long-lived access keys into shell commands, and do not run the curl-to-bash or latest-binary installation paths unless you independently verify the installer and CLI/plugin versions. Treat remediation actions such as block, quarantine, kill, ignore, whitelist, and disabling defenses as production-impacting changes that need explicit operator approval.

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

T03 · Remote Payload Retrieval and Execution

Error
Location
SKILL.md:27
Finding

Unverified Remote Installation Script Executed Directly by 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` for installation instructions. ``` ### Technical Analysis The Skill instructs the agent to retrieve a mutable shell script from an external URL and pipe it directly into Bash. The downloaded content is not pinned to a specific version, saved for review, or validated using a cryptographic checksum or signature before execution. HTTPS provides transport protection but does not establish that the script remains unchanged over time. Compromise of the hosting account, CDN, DNS infrastructure, certificate trust chain, or upstream release process could cause arbitrary attacker-controlled commands to be returned. Directly piping the response to Bash also removes the opportunity to inspect the effective payload before it executes. Installing the CLI is ancillary setup and does not require unrestricted execution of mutable remote shell content. ### Attack Path 1. The Skill is invoked on a host where Aliyun CLI is absent or older than version 3.3.3. 2. The agent follows the installation instruction. 3. An attacker compromises the referenced distribution endpoint or its release pipeline. 4. The endpoint returns a modified `setup.sh`. 5. `curl` passes the response directly to Bash without integrity verification. 6. The malicious commands execute with the privileges of the agent or user running the Skill. 7. The payload can access local files, modify user configuration, steal credentials, or install additional components. ### Impact Assessment Successful exploitation provides arbitrary command execution under the current local account. The effective scope includes all files and ...[truncated 393 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Error
Location
SKILL.md:31
Finding

Mutable CLI Binaries and Plugins Are Installed Without Integrity Pinning

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. ``` Representative installation instructions include: ```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/ ``` The plugin instructions include: ```bash aliyun plugin install --names ecs vpc rds # List all available plugins aliyun plugin list-remote ``` ### Technical Analysis The installation guide retrieves archives identified as `latest` and does not specify a version, expected cryptographic digest, or signature-verification procedure. The downloaded executable is then moved into `/usr/local/bin`, a system-wide executable search path. The Skill additionally requires automatic plugin installation and unconditional plugin updates. This means executable dependencies may change after the Skill itself has been reviewed. Automatically installing any plugin requested by future commands is broader than installing only the SAS component required by the declared alert-handling workflow. This creates a supply-chain trust gap: the effective code executed during authenticated cloud operations is determined by mutable external releases rather than by the audited Skill package. ### Attack Path 1. The Skill enables automatic plugin installation and requests plugin updates. 2. The CLI or a required plugin is fetched from an external release channel. 3. An attacker compromises the release channel, plugin repository, CDN, or publisher account. 4. A ...[truncated 1022 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

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

Cloud Credentials Are Passed Through Command Arguments and Environment Variables

Content
View full analysis
\ --access-key-secret \ --region cn-hangzhou ``` The guide also recommends environment variables: ```bash export ALIBABA_CLOUD_ACCESS_KEY_ID=your_access_key_id export ALIBABA_CLOUD_ACCESS_KEY_SECRET=your_access_key_secret export ALIBABA_CLOUD_SECURITY_TOKEN=your_sts_token export ALIBABA_CLOUD_REGION_ID=cn-hangzhou ``` Another example places credentials directly in command arguments: ```bash aliyun configure set --mode StsToken \ --access-key-id XXXX --access-key-secret XXXX \ --sts-token XXXX --region cn-hangzhou ``` ### Technical Analysis Passing secrets through command-line arguments may expose them through shell history, CI/CD logs, process inspection facilities, terminal recording, diagnostic output, or command auditing. Exporting credentials as environment variables makes them available to child processes and may expose them through debugging tools, process dumps, or improperly configured automation logs. This guidance conflicts with the safer rules in `SKILL.md`, which state that the agent must never ask users to enter or print access-key values. A user following the linked installation guide could nevertheless place real long-lived credentials directly into commands. The example values appear to be placeholders rather than confirmed active secrets; the vulnerability is the recommended handling mechanism, not a hardcoded credential in the repository. ### Attack Path 1. A user follows the linked CLI configuration guide. 2. The user substitutes a real access-key secret or STS token into a command or environmen ...[truncated 1013 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
  • Rogue AgentSelf-Modification, Session Persistence
Findings (23)

External Script Fetching

High
Category
Supply Chain
Confidence
97% confidence
Finding

The skill instructs users to execute a remote script directly via 'curl ... | bash', which bypasses verification, review, and integrity checks before code execution. If the remote host, CDN path, transport chain, or downloaded script is compromised, this becomes an immediate arbitrary code execution vector on the operator's machine.

Content

Scanner excerpt · SKILL.md (reported line 28)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
92% confidence
Finding

The trigger list includes broad phrases such as 'security alert', 'alert handling', and 'view alerts', which can match ordinary user requests and cause the skill to activate unexpectedly. Because this skill can progress from viewing alerts to executing state-changing actions like block, quarantine, or ignore, unintended invocation increases the chance of sensitive operations being proposed or performed in the wrong context.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The skill advertises actions like ignore, whitelist, block, and quarantine as core capabilities without a prominent upfront warning that these actions can suppress detections, alter protection state, or disrupt workloads. In a security operations context, operators may over-trust the automation and trigger impactful changes before understanding consequences, increasing the risk of disabling defenses or interrupting legitimate systems.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The workflow hard-codes --Lang zh in CLI examples, and this pattern recurs throughout the skill, effectively forcing Chinese-language output regardless of user preference. The file does not offer a language option or explain why this locale restriction is required for a region-specific compliance or operational reason.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The workflow hard-codes --Lang zh in CLI examples, and this pattern recurs throughout the skill, effectively forcing Chinese-language output regardless of user preference. The file does not offer a language option or explain why this locale restriction is required for a region-specific compliance or operational reason.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The workflow hard-codes --Lang zh in CLI examples, and this pattern recurs throughout the skill, effectively forcing Chinese-language output regardless of user preference. The file does not offer a language option or explain why this locale restriction is required for a region-specific compliance or operational reason.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The acceptance criteria document includes concrete alert-handling actions such as blocking IPs, killing processes, quarantining files, and disabling defenses, but it does not require any explicit user confirmation, warning banner, or acknowledgment before executing potentially disruptive operations. In a security-response skill, this omission can lead an agent to perform irreversible or availability-impacting actions based on ambiguous prompts or incomplete context, increasing the risk of accidental remediation against production systems.

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
95% confidence
Finding

The guide instructs users to pass long-lived cloud credentials directly on the command line via non-interactive flags. This can expose secrets in shell history, CI logs, and process listings, and it also stores them locally in ~/.aliyun/config.json without a nearby warning about those risks.

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

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The command example explicitly forces --Lang zh, which is a locale choice embedded in the skill instructions. This can violate language/locale policy because the document does not offer a user choice or explain why Chinese output is required for this workflow.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This second command also specifies --Lang zh, again requiring a specific locale in operational instructions. The document provides no opt-in mechanism or justification for enforcing Chinese, so the locale behavior is not user-choice-preserving.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This reference documents highly destructive actions such as blocking IPs, killing processes, quarantining files, stopping containers, and disabling defenses, but it does not consistently warn that these operations can disrupt production workloads or cause irreversible containment actions if chosen incorrectly. In a security-alert handling skill, presenting default recommendations like 'Block IP' or 'Kill and Quarantine' without prominent approval, validation, and consequence guidance increases the risk of accidental harmful remediation driven by an operator or upstream agent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This documentation includes high-impact alert-handling actions such as blocking IPs, killing processes, quarantining files, disabling defenses, ignoring alerts, and whitelisting without clear warnings, approval guidance, or operator safety constraints. In a security-alert handling skill, that omission is risky because an agent or user may execute disruptive actions directly from examples, potentially causing service interruption, loss of forensic data, weakened protection, or suppression of real alerts.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The markdown repeatedly specifies --Lang zh in user-facing command examples, which directs the skill toward a specific language/locale. The document does not offer an opt-in, alternative locale, or a clear region-specific justification, so it conflicts with the stated policy on language choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This command example again sets --Lang zh, reinforcing a fixed language requirement in the skill instructions. Because the file does not explain that the skill is region-specific or let users choose another locale, this is a natural-language policy issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The sample script includes --Lang zh in an end-to-end workflow, making the locale constraint part of the recommended operational path. The surrounding text does not provide opt-in language selection or explain a justified regional limitation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The sample config sets "language": "en", which is a natural-language locale preference embedded in the guide. Because the document does not present this as optional or explain why English is required, it can be read as forcing a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The file states that the Lang parameter defaults to zh, and the CLI examples also hard-code --Lang zh, which imposes a specific language setting in natural-language guidance. Because the documentation does not offer a language choice or explain a justified regional constraint, this appears to violate the language/locale policy criteria.

Content

No source excerpt is available for this finding.