Back to skill

Security audit

Alibabacloud Analyticdb Postgresql Ai Coaching Best Practice

Security checks for vulnerabilities and agentic risk

Overview

The skill has a coherent Alibaba Cloud setup purpose, but it uses unsafe installation guidance, broad cloud permissions, and risky password/session handling that should be manually reviewed before installation.

Install only if you intentionally want an agent to provision Alibaba Cloud ADBPG/Supabase coaching infrastructure. Use a verified, pinned Aliyun CLI install instead of curl-to-bash, avoid persistent auto-plugin installation and broad plugin updates, grant least-privilege temporary credentials, confirm every billable or network-exposing resource change, and do not paste live passwords, access keys, or namespace secrets into chat or saved scripts.

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

Unverified Remote Installation Script Is Piped Directly into Bash

Content
View full analysis
**IMPORTANT**: 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](references/cli-installation-guide.md) for installation instructions. ``` ### Technical Analysis The command downloads a mutable shell script from an external endpoint and passes its contents directly to Bash. It does not pin a script version, inspect the downloaded content, verify a cryptographic signature, or compare a checksum against a trusted value. Although `aliyuncli.alicdn.com` appears related to the expected vendor, the repository does not provide evidence sufficient to establish the integrity of every future response from that endpoint. The effective code executed by the Skill can therefore change after the Skill package has been reviewed. The behavior also exceeds the minimum privileges necessary for the declared cloud-provisioning workflow. Installing the CLI may be a prerequisite, but immediate execution of an unverified response is not necessary; a package manager or verified, version-pinned artifact would provide safer alternatives. ### Attack Path 1. The user invokes the Skill on a system where Aliyun CLI is absent or older than version 3.3.3. 2. The Skill directs the Agent or user to run the installation pipeline. 3. An attacker compromises the origin, CDN account, DNS path, TLS termination environment, or vendor release process. 4. The endpoint returns an attacker-controlled shell script. 5. `curl` streams the response directly into Bash without an integrity checkpoint. 6. The payload executes with the privileges of the Agent or user running the command. 7. The payload can access files and credentials available to that account or ins ...[truncated 677 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Error
Location
SKILL.md:26
Finding

Automatic Plugin Updates and Unpinned CLI Binaries Create Supply-Chain Exposure

Content
View full analysis
Then **[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 on your local machine are always up-to-date. ``` Representative binary installation instructions from `references/cli-installation-guide.md`: ```bash # Download wget https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-amd64.tgz # Extract and install tar -xzf aliyun-cli-linux-latest-amd64.tgz sudo mv aliyun /usr/local/bin/ # Verify aliyun version ``` The ARM64 variant uses the same pattern: ```bash # Download ARM64 version wget https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-arm64.tgz # Extract and install tar -xzf aliyun-cli-linux-latest-arm64.tgz sudo mv aliyun /usr/local/bin/ ``` ### Technical Analysis The Skill mandates a persistent automatic-plugin-install setting and updates all existing plugins rather than installing only the components required by the workflow. The downloaded CLI archive also uses a mutable `latest` URL and is installed without a checksum or signature check. These mechanisms make executable behavior dependent on upstream content that can change after audit. Updating all existing plugins unnecessarily mutates unrelated tools and broadens the supply-chain attack surface beyond the GPDB and VPC functionality required by this Skill. Moving the resulting binary into `/usr/local/bin` with `sudo` elevates the consequence of a compromised archive: an attacker-controlled executable could become a system-wide command available to all users. ### Attack Path 1. The Skill enables automatic plugin installation in the user’s persistent Aliyun CLI configuration. 2. It invokes `aliyun plugin update ...[truncated 1216 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
SKILL.md:96
Finding

Recommended Full-Access Cloud Policies Exceed Documented Operational Requirements

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
references/verification-method.md:342
Finding

Database and Namespace Passwords Are Exposed Through Process Arguments and Script Variables

Content
View full analysis
--region \ --account-name --account-password '' \ --user-agent AlibabaCloud-Agent-Skills/alibabacloud-analyticdb-postgresql-ai-coaching-best-practice ``` Representative vector-database and namespace operations: ```bash aliyun gpdb init-vector-database --profile adbpg \ --biz-region-id --db-instance-id \ --manager-account --manager-account-password '' \ --user-agent AlibabaCloud-Agent-Skills/alibabacloud-analyticdb-postgresql-ai-coaching-best-practice aliyun gpdb create-namespace --profile adbpg \ --biz-region-id --db-instance-id \ --manager-account --manager-account-password '' \ --namespace --namespace-password '' \ --user-agent AlibabaCloud-Agent-Skills/alibabacloud-analyticdb-postgresql-ai-coaching-best-practice ``` The verification script instructs users to store secrets directly in the script: ```bash PROFILE="adbpg" REGION="cn-hangzhou" DB_INSTANCE="gp-xxxxx" MANAGER_ACCOUNT="admin_user" MANAGER_PASSWORD="" # Replace with actual password NAMESPACE="ns_coaching" NAMESPACE_PASSWORD="" # Replace with actual password COLLECTION="coaching_knowledge" ``` The namespace password is then embedded in a command-line JSON argument: ```bash aliyun gpdb chat-with-knowledge-base --profile $PROFILE \ --biz-region-id $REGION \ --db-instance-id $DB_INSTANCE \ --model-params '{"Model": "qwen-max", "Messages": [ ...[truncated 2841 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 (31)

External Script Fetching

High
Category
Supply Chain
Confidence
99% confidence
Finding

The skill instructs piping a remote script directly into bash, which bypasses integrity verification and grants arbitrary code execution to whatever content is served at that URL at runtime. In a security-sensitive agent workflow, this is especially dangerous because users may follow it verbatim on privileged systems, and the adjacent requirement to enable auto-plugin installation further expands the supply-chain risk.

Content

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

md
## Pre-check: Aliyun CLI >= 3.3.3 Required

> **IMPORTANT**: 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](references/cli-installation-guide.md) for installation instructions.
>
> Then **[MUST]** run `aliyun configure set --auto-plugin-install true` to enable automatic plugin installation.

Context Leakage

High
Category
Data Exfiltration
Confidence
85% confidence
Finding

Code or instructions that leak agent conversation context to external services, potentially exposing sensitive user interactions.

Content

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

md
| Scenario | Flow |
|----------|------|
| Workflow Coaching | Query `sales_workflow_coach` → Inject coaching persona + process KB → Guide learner through sales stages → Record session |
| Decision Support | Query `architecture_advisor` → Inject coaching persona + tech KB → Guide trade-off analysis → Document decision |
| Skill Development | Query `communication_coach` → Inject coaching persona + best practices KB → Practice scenarios → Provide feedback |
| Onboarding | Query `onboarding_mentor` → Inject coaching persona + tech docs KB → Progressive learning → Verify understanding |

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The example includes a realistic hardcoded password ('Coach3Acc#2x9K') for account creation, normalizing unsafe secret practices and creating a high risk that users will reuse the sample or commit similar credentials into scripts, chat logs, or repositories. Because this skill provisions privileged database accounts, leaked or reused credentials could enable unauthorized access to the ADBPG instance and downstream data exposure or modification.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The trigger list includes generic phrases such as "knowledge base" and "AI coaching," which are broad enough to appear in ordinary technical conversations outside the intended Alibaba Cloud ADBPG context. The manifest does not provide exclusion conditions or narrow activation constraints, increasing the chance of unintended invocation.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The instruction says to execute the workflow when the user says "Help me set up an AI coaching system" or similar, but does not define what counts as "similar." This leaves the activation boundary unclear and could cause the skill to run for requests that only loosely resemble the intended use case.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill explicitly instructs the agent to ask the user for an existing database account password, creating a direct secret-collection path in chat. Even though other parts of the skill warn against exposing secrets, this step undermines that guidance and can lead to credential disclosure, logging, retention, or reuse in unsafe contexts.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

Asking for an existing database password in plain language encourages the user to paste a live credential into the conversation. In an agent setting, that secret may be stored in transcripts, surfaced to tools, or mishandled by downstream systems, turning a setup workflow into a credential-harvesting point.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The skill directs storage of 'every coaching round' and session records without defining minimization, redaction, retention, or consent controls. Because coaching conversations can contain sensitive personal, business, or credential-like information, blanket persistence increases privacy and data-exposure risk if the datastore is later accessed or breached.

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 · references/acceptance-criteria.md (reported line 129)May include surrounding context.

md
--StorageSize 50
--StorageSize 100

# SecurityIPList (CIDR or IP, comma-separated)
--SecurityIPList "192.168.1.0/24,10.0.0.1"

# JSON parameters

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/acceptance-criteria.md (reported line 130)May include surrounding context.

md
--StorageSize 50
--StorageSize 100

# SecurityIPList (CIDR or IP, comma-separated)
--SecurityIPList "192.168.1.0/24,10.0.0.1"

# JSON parameters

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/acceptance-criteria.md (reported line 157)May include surrounding context.

md
--StorageSize 50
--StorageSize 100

# SecurityIPList (CIDR or IP, comma-separated)
--SecurityIPList "192.168.1.0/24,10.0.0.1"

# JSON parameters

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/acceptance-criteria.md (reported line 211)May include surrounding context.

md
# Get VSwitch CIDR
aliyun vpc describe-vswitch-attributes --biz-region-id cn-hangzhou --vswitch-id vsw-xxxxx --user-agent AlibabaCloud-Agent-Skills

# Create Enhanced NAT Gateway
aliyun vpc create-nat-gateway --biz-region-id cn-hangzhou --vpc-id vpc-xxxxx --vswitch-id vsw-xxxxx --nat-type Enhanced --user-agent AlibabaCloud-Agent-Skills

# Query EIP addresses

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 361)May include surrounding context.

❌ INCORRECT - Skipping Verification

bash
# Don't skip credential verification
aliyun gpdb CreateDBInstance ...  # Without checking if credentials exist

✅ CORRECT

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 393)May include surrounding context.

❌ INCORRECT - Assuming Values

bash
# Never assume user-specific parameters without confirmation
aliyun gpdb CreateDBInstance \
  --RegionId cn-hangzhou \  # Assumed default
  --InstanceSpec "4C32G" \  # Assumed default

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 397)May include surrounding context.

aliyun gpdb CreateDBInstance
--RegionId cn-hangzhou \ # Assumed default --InstanceSpec "4C32G" \ # Assumed default --VPCId vpc-xxxxx \ # Assumed without asking ...

text

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This guide materially exceeds the skill's stated ADBPG/Supabase/RAG coaching scope by teaching broad Aliyun CLI installation, credential setup, profile management, RAM role usage, and general service administration. In an agent skill context, overbroad infrastructure guidance expands the operational blast radius and can enable unintended account-wide actions unrelated to the declared use case.

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 shows direct command-line handling of access keys and secrets without adjacent warnings that shell history, terminal scrollback, process listings, CI logs, and copied snippets can expose credentials. In an agent or automation setting, this omission is especially risky because secrets may be persisted in transcripts or logs and then reused to access cloud resources.

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

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The documentation provides guidance for elevated and cross-account access patterns such as RamRoleArn and RamRoleArnWithEcs that are not clearly justified by the skill's narrow coaching/database scope. Including privilege-escalating and cross-account auth workflows increases the chance that users or agents adopt unnecessarily powerful credentials, making misuse or compromise more damaging.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Recommending debug logging for authenticated CLI calls without warning about sensitive output can expose request metadata, endpoints, account identifiers, tokens, or other credential context in logs. In shared terminals, CI systems, or agent execution traces, verbose logs may persist and become accessible to other users or systems.

Content

No source excerpt is available for this finding.

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 403)May include surrounding context.

bash
# Restrict permissions
chmod 600 ~/.aliyun/config.json

Troubleshooting

Static analysis

No suspicious patterns detected.