Back to skill

Security audit

alibabacloud-apsaradb-agent

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marks this skill suspicious because its setup guidance includes risky installer and credential-handling practices, and scanners report possible behavior outside database management; some referenced content was only partially analyzed.

Consider the verdict's suspicious Review status before installing. In particular, avoid following the unverified downloaded-installer instructions or entering real secrets in command-line arguments, and review the credential-disclosure and out-of-scope inventory reports. The scan was partial: 10 of 12 components were fully inspected, two were partially inspected, and no components were entirely uninspected.

Vulnerability Patterns
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Rogue AgentSelf-Modification, Session Persistence
Findings (28)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The supplied code exposes a cloud credential rather than performing a declared database-management operation. Using credentials for authentication could be a supporting implementation detail, but printing the secret is an undeclared disclosure capability. No network transmission is shown.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The commands target the ECS service, not a database service. ECS instance enumeration accesses resources outside the declared database-management scope. Selecting a CLI profile is a supporting implementation detail and is not independently a mismatch.

Content

No source excerpt is available for this finding.

Self-Modification

High
Category
Rogue Agent
Confidence
90% confidence
Finding

Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Content

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

md
**Pre-check: Aliyun CLI >= 3.5.0 required**
> [MUST] Verify: `aliyun version` — must be >= 3.5.0 before using DAS. In an authorized setup step, an older CLI must first get one `aliyun upgrade --yes` attempt and a version recheck; report an environment error only if upgrade fails or the active version remains insufficient.
> - **First install or major upgrade:** `/bin/bash -c "$(curl -fsSL --connect-timeout 10 --max-time 120 https://aliyuncli.alicdn.com/setup.sh)"`
> - **Routine update (CLI >= 3.3.5):** `aliyun upgrade --yes` — prefer this built-in self-update over re-running the install script.
> - See `references/cli-installation-guide.md` for the official installation reference.

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

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
> - See `references/cli-installation-guide.md` for the official installation reference.

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| [references/cli-installation-guide.md](references/cli-installation-guide.md) | CLI, plugin, jq, and credential setup |

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
5. Use `scripts/call_apsaradb_agent.sh` for every agent request, directly or through the local job tool. Inject the scoped session/version environment values; t

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
bash scripts/call_apsaradb_agent.sh \

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
bash scripts/call_apsaradb_agent.sh \

Self-Modification

High
Category
Rogue Agent
Confidence
90% confidence
Finding

Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Content

Scanner excerpt · references/cli-installation-guide.md (reported line 71)May include surrounding context.

aliyun version

text

### Self-Update (CLI >= 3.3.5)

Once the CLI is at version 3.3.5 or newer, routine updates can use the built-in self-update subcommand instead of re-running the install script:

Self-Modification

High
Category
Rogue Agent
Confidence
90% confidence
Finding

Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Content

Scanner excerpt · references/cli-installation-guide.md (reported line 73)May include surrounding context.

Self-Update (CLI >= 3.3.5)

Once the CLI is at version 3.3.5 or newer, routine updates can use the built-in self-update subcommand instead of re-running the install script:

bash
aliyun upgrade --yes

Self-Modification

High
Category
Rogue Agent
Confidence
90% confidence
Finding

Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Content

Scanner excerpt · scripts/prepare_apsaradb_agent.sh (reported line 56)May include surrounding context.

sh
exit 1
    fi
    printf '[Setup] CLI %s is below 3.5.0; attempting aliyun upgrade --yes.\n' "$cli_version"
    # Use the official self-update through PATH; do not bypass platform wrappers.
    # No sudo, identity changes, alternate binary or repeated upgrade attempts.
    if aliyun upgrade --yes </dev/null; then
        hash -r

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: file_read, file_write, network, shell.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

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

md
D` for related follow-ups; it is distinct from `SKILL_SESSION_ID`.
6. Prefer the matching product source below: PolarDB MySQL uses `polardb-console`, Tair/Redis uses `tair-console`, and RDS uses `yaochi-console`. Keep related follow-ups on the same source; never invent a route or use an unrelated product route to bypass throttling.
7. Answer in the user's language with the business conclusion, evidence, and limitations, then finish. A plan-only request ends with its plan and verification steps, without asking whether to execute it now. A request to list missing target information ends with that checklist; do not invent a target or wait for optional input to complete the checklist. A report file supplements this answer; a file list alone does not complete the task. Ask only for indispensable missing input, following the authentication and permission gates above.
8. In platform evaluation environments, preserve the platform's execution mode. If `ALIBABA_CLOUD_CLI_MOCK` is enabled, identi

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

md
usible interpretation. Confirm migration/online-expansion support for the actual engine, edition and storage type before making it the basis of a mandatory recommendation. If it remains unverified, put that condition directly on the recommendation, including priority tables, rather than only in a later caveat. Distinguish illustrative change windows and estimates from verified interruption guarantees; present no exact outage bound without applicable evidence. Provide a complete conditional plan without asking for approval to execute it.

Once the requested findings or plan are ready, return them directly and stop. Do not ask whether to execute a proposal the user only asked to review, offer another optional task as a question, or suspend the answer for deleting, renaming, comparing, or reorganizing report files. Leave duplicate or unfamiliar artifacts intact, identify the complete report if relevant, and finish the business answer. Lack of optional evidence is a stated limitation, not

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

md
## Readonly task completion

- Correct: return the requested analysis or capacity plan with evidence and unavailable-data caveats, then stop. Keep duplicate or unfamiliar output files intact and identify the complete report without asking the user to organize artifacts.
- Incorrect: finish with only a file list, ask whether to execute a proposal when only advice was requested, or block completion on deleting/renaming a report.
- Correct: a failed partial response retains its actual conversation UUID and is labeled incomplete; any focused continuation stays readonly and uses that same UUID.
- Incorrect: equate a returned SessionID or partial answer with successful completion, or fabricate an ID to recover a failed request.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
85% 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 · SKILL.md (reported line 206)May include surrounding context.

md
ir, a PolarDB backup, and enabling PolarDB deletion protection. Before preparing one of these plans, read the operation contract below for the exact API and argument names; do not infer write parameters from readonly response fields. See [the operation contract](references/related-commands.md#confirming-an-operation) for the exact allowed arguments and the corresponding readonly verification.

Decline destructive and very high-risk operations, even if the service offers them or the user asks to skip approval: deleting databases, clusters or nodes; dropping or truncating data; releasing resources; disabling deletion protection; and changing passwords, privileges or public access. Plan-only scenarios include instance provisioning, orders, resizing and other changes outside the execution contract. Do not substitute direct product writes, SQL or generic RPC.

Classify forbidden operations separately from permitted plan-only scenarios: procurement and resizing may receive a plan; destructiv

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% 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 · SKILL.md (reported line 279)May include surrounding context.

md
### Cross-region and cross-product inventory

An explicit request for “all regions” confirms that scope; do not ask the user to pick one region or silently substitute the CLI profile's region. The DAS endpoint is the agent service endpoint, not the target resource region. Ask the remote agent to enumerate accessible regions and paginate results, and report the regions actually covered. A permission error or an unsupported region is a coverage gap, not an empty region.

Scope completeness claims to the current identity, the enumerated regions and the sources actually queried. Agreement between product inventories and a resource index is corroboration, not proof that permission-invisible or unindexed resources cannot exist. If a billing or other source contains extra resource IDs, keep unresolved differences explicit: a bounded sample does not classify every unmatched ID, and a NotFound response alone does not prove deletion or exclude an endpoint, region or visibility mismatch. Do not

The recommended installer executes a downloaded script without warning about remote-code execution.

Medium
Category
Output Handling
Confidence
96% confidence
Finding

The recommended command immediately executes mutable network content without inspecting it or verifying an independently trusted signature or digest. HTTPS protects transport but does not prevent compromised release infrastructure from supplying code that could access local cloud credentials.

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

x86_64

bash
wget --connect-timeout=10 --read-timeout=120 --tries=3 -qO- https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-amd64.tgz | tar xz
sudo mv aliyun /usr/local/bin/

ARM64

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

ARM64

bash
wget --connect-timeout=10 --read-timeout=120 --tries=3 -qO- https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-arm64.tgz | tar xz
sudo mv aliyun /usr/local/bin/

Windows

Non-interactive credential commands are recommended without warning about shell-history and command-line exposure.

Medium
Category
Output Handling
Confidence
97% confidence
Finding

The guide recommends substituting real access-key secrets into command-line arguments, which can expose them through shell history, process inspection, and automation logs. The placeholders are not leaked credentials themselves, but following this recommendation can disclose credentials with substantial cloud-account privileges.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% 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/ram-policies.md (reported line 53)May include surrounding context.

md
Follow the mandatory permission-failure workflow in [SKILL.md](../SKILL.md#ram-policy).

Report the returned action and request ID when available. Never ask the user to paste an AccessKey, secret, or STS token.

For `Forbidden.RAM` without an action, verify `hdm:GetYaoChiAgent` first, then check read permissions for the target database product.

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 · references/related-apis.md (reported line 124)May include surrounding context.

md
succeeded. Read the original stream to its terminal event and verify the
resource state with a separate readonly request.

[Official DAS OpenAPI catalog](https://api.aliyun.com/document/DAS)

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/agent_job.py (reported line 49)May include surrounding context.

python
save(job, "status.json", result)
        if prepare:
            with (job / "setup.stdout").open("wb") as out, (job / "setup.stderr").open("wb") as err:
                code = subprocess.run(
                    ["bash", str(SCRIPTS / "prepare_apsaradb_agent.sh")],
                    stdin=subprocess.DEVNULL, stdout=out, stderr=err, check=False,
                ).returncode

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/agent_job.py (reported line 60)May include surrounding context.

python
result.update(phase="agent", query_started_at=now())
        save(job, "status.json", result)
        with query.open("rb") as inp, (job / "stdout").open("wb") as out, (job / "stderr").open("wb") as err:
            code = subprocess.run(
                ["bash", str(SCRIPTS / "call_apsaradb_agent.sh"), "-", *options],
                stdin=inp, stdout=out, stderr=err, check=False,
            ).returncode