Back to skill

Security audit

alibabacloud-ecs-server-migration-on-cloud

Security checks for vulnerabilities and agentic risk

Overview

ClawScan rates this skill suspicious because scanners report that read-only queries can persistently enable unattended plugin installation, alongside other security and guidance concerns.

Consider the persistent plugin-install setting and the incomplete scan coverage before installing. The verdict is suspicious, meaning the scanners report real security or scope concerns; it does not establish that the author is malicious or that any downloaded plugin is harmful.

Vulnerability Patterns
  • 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
  • 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
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/axes/instance_relocation_guide/_cli.py:54
Finding

Read-only queries persistently enable unattended plugin installation

Content
View full analysis

Impact

The active CLI profile can remain configured to install missing executable product plugins without the normal interactive installation decision, including during later CLI use outside this Skill. The confirmed harm is an unauthorized persistent weakening of installation controls; the project does not establish that any downloaded plugin is malicious.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (47)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The cross-region image-copy and instance-recreation guidance matches the declared migration purpose. However, the intent table also exposes substantial incident, billing, and security guidance without requiring a migration connection. Those are distinct support capabilities not disclosed in the description, which explicitly excludes symptoms handled by the general high-frequency ECS skill. The mismatch is in the available guidance scope, not hidden execution: this file defines constants and text only, and does not itself query cloud resources, run guest commands, change security groups, or submit financial requests.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

The forced-migration guidance and instance-fact lookup support the declared purpose. However, the script also explicitly routes users to incident, billing, and security-exposure playbooks whose scope is not limited to migration. Those are additional troubleshooting capabilities beyond the declared relocation focus. The metadata lookup and optional identity probe are supporting implementation details, not separate mismatches. The imported playbook contents are not supplied, so this assessment concerns their explicitly exposed topics rather than any unseen actions.

Content

No source excerpt is available for this finding.

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

md
py --axis instance-clone-guide -- <args>` | query-only | [instance-clone-guide](references/axes/instance-clone-guide.md) |

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
80% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · scripts/_guardrails.py (reported line 1789)May include surrounding context.

python
match = _ARG_REQUIRED.search(line)
        if match:
            named = re.split(r"[ ,]+", match.group(1).strip())
            if any(token in _INSTANCE_TARGET_FLAGS for token in named):
                return True
        if _MISSING_INSTANCE_REASON.search(line):
            return True

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
100% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/axes/onmigration_assessment/assess_migration.py (reported line 862)May include surrounding context.

python
# ---- safe_path ------------------------------------------------------------
    check("sp_ok", safe_path("/boot/grub2", "linux"), "/boot/grub2")
    check("sp_win", safe_path("C:\\Windows", "windows"), "C:\\Windows")
    for bad, ost, why in (("/a;rm -rf /", "linux", "metachar"), ("/a|b", "linux", "pipe"),
                          ("$(id)", "linux", "subshell"), ("relative/path", "linux", "shape"),
                          ("Windows\\System32", "windows", "win-nodrive"),
                          ("C:\\a|b", "windows", "win-metachar")):

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
100% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/axes/site_migration_guide/site_migration.py (reported line 935)May include surrounding context.

python
# guest whitelist: inspection-only allowed, mutating/unknown/empty refused.
    expect("guest gate: inspection reading allowed, mutating/unknown/empty refused",
           validate_guest_command("df -h")[0] is True
           and validate_guest_command("rm -rf /")[0] is False
           and validate_guest_command("notarealtool")[0] is False
           and validate_guest_command("")[0] is False)
    return rc

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/axes/onmigration_assessment/assess_migration.py (reported line 862)May include surrounding context.

python
# ---- safe_path ------------------------------------------------------------
    check("sp_ok", safe_path("/boot/grub2", "linux"), "/boot/grub2")
    check("sp_win", safe_path("C:\\Windows", "windows"), "C:\\Windows")
    for bad, ost, why in (("/a;rm -rf /", "linux", "metachar"), ("/a|b", "linux", "pipe"),
                          ("$(id)", "linux", "subshell"), ("relative/path", "linux", "shape"),
                          ("Windows\\System32", "windows", "win-nodrive"),
                          ("C:\\a|b", "windows", "win-metachar")):

Chaining Abuse

High
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

Scanner excerpt · scripts/axes/onmigration_assessment/assess_migration.py (reported line 862)May include surrounding context.

python
# ---- safe_path ------------------------------------------------------------
    check("sp_ok", safe_path("/boot/grub2", "linux"), "/boot/grub2")
    check("sp_win", safe_path("C:\\Windows", "windows"), "C:\\Windows")
    for bad, ost, why in (("/a;rm -rf /", "linux", "metachar"), ("/a|b", "linux", "pipe"),
                          ("$(id)", "linux", "subshell"), ("relative/path", "linux", "shape"),
                          ("Windows\\System32", "windows", "win-nodrive"),
                          ("C:\\a|b", "windows", "win-metachar")):

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/axes/site_migration_guide/site_migration.py (reported line 935)May include surrounding context.

python
# guest whitelist: inspection-only allowed, mutating/unknown/empty refused.
    expect("guest gate: inspection reading allowed, mutating/unknown/empty refused",
           validate_guest_command("df -h")[0] is True
           and validate_guest_command("rm -rf /")[0] is False
           and validate_guest_command("notarealtool")[0] is False
           and validate_guest_command("")[0] is False)
    return rc

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, 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 79)May include surrounding context.

md
nstance-relocation-guide` | `python3 scripts/server-migration-on-cloud.py --axis instance-relocation-guide -- <args>` | query-only | [instance-relocation-guide](references/axes/instance-relocation-guide.md) |

Gated axes in this package: onmigration-assessment. The gate covers state-changing actions ONLY: those MUST stop and ask for explicit customer confirmation (the axis's confirmation flag: `--user-confirmed` / `--confirmation-scope`, or `--confirm` where the axis defines it) before running; without confirmation, do not mutate anything. Read-style in-guest probes also travel through Cloud Assistant RunCommand. They are NOT query-only from the customer's side: the command still executes inside their machine and leaves a task record there. ABSOLUTE PROHIBITION: never dispatch one without the customer's consent for that exact command in this turn. Ask first, then pass `--allow-guest-read` to the entry command. Without it the dispatcher strips the axis's guest flags, prints `CONSENT-REQ

Unrestricted Tool Access

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill grants unrestricted tool access without appropriate constraints. An agent with unfettered tool access can perform arbitrary actions including file modification, network requests, and code execution.

Content

Scanner excerpt · references/axes/forced-migration-guide.md (reported line 33)May include surrounding context.

md
- The ONLY cloud API this skill may invoke is `DescribeInstances` (see
  [references/ram-policies.md](references/ram-policies.md)). Any mutating ECS action is out of
  the allow-list and must never be emitted.
- The skill MUST NOT run any command inside a customer instance (no Cloud Assistant, no
  Workbench, no remote login). Where an in-guest reading is needed, it instructs the customer to
  run a **read-only** command themselves and paste the output back.
- The skill MUST NOT submit, approve, or promise any refund, adjustment, voucher, or

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/axes/instance-clone-guide.md (reported line 194)May include surrounding context.

md
## User Confirmation

- Running the read-only scripts needs no confirmation, but before executing
  any script restate the scope in one sentence: the account UID, the region,
  the instances involved, and what will be checked.
- Customer-side high-risk guided steps (replace operating system, snapshot

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/axes/instance-clone-guide.md (reported line 200)May include surrounding context.

md
- Customer-side high-risk guided steps (replace operating system, snapshot
  deletion, rebuilding from snapshot) MUST carry the rule 4 risk-notice gate
  with the customer's explicit acknowledgment before the next guided step.
- NEVER ask the user to confirm credential values; if credentials are
  missing, direct them to `aliyun configure`.

## Input Parameters

Network-configuration changes are recommended without warning about access loss or service disruption.

Medium
Category
Output Handling
Confidence
95% confidence
Finding

The guidance recommends changing administrative ingress rules, blocking addresses, and switching DNS resolvers without explaining lockout or name-resolution risks. These customer-executed changes could interrupt access or services, particularly if the office CIDR is wrong or the instance cannot reach the suggested VPC resolvers.

Content

No source excerpt is available for this finding.

Snapshot cleanup instructs deletion without warning that recovery points are permanently removed.

Medium
Category
Output Handling
Confidence
93% confidence
Finding

The checklist recommends deleting snapshots after verification without explaining that deletion removes recovery points or checking dependencies and retention obligations. A working clone alone does not establish that its source snapshots are dispensable, so following this advice can reduce recoverability despite manual execution.

Content

No source excerpt is available for this finding.

Requests migration and upgrade logs without warning users to redact sensitive information before sharing.

Medium
Category
Output Handling
Confidence
95% confidence
Finding

The source requests migration-client and upgrade log excerpts without instructions to remove sensitive data. Such logs can contain credentials, authenticated URLs, internal addresses, or customer information, creating an avoidable disclosure path into the conversation.

Content

No source excerpt is available for this finding.

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/_guardrails.py (reported line 2303)May include surrounding context.

python
# The deadline is enforced by the watchdog below (Popen has no timeout
        # parameter): it kills the child at timeout_s, so the call cannot hang.
        if split:
            proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,  # noqa: timeout
                                    stderr=subprocess.PIPE, bufsize=1,
                                    universal_newlines=True, errors="replace",
                                    env=env)

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/_guardrails.py (reported line 2308)May include surrounding context.

python
universal_newlines=True, errors="replace",
                                    env=env)
        else:
            proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,  # noqa: timeout
                                    stderr=subprocess.STDOUT, bufsize=1,
                                    universal_newlines=True, errors="replace",
                                    env=env)

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/axes/forced_migration_guide/_cli.py (reported line 135)May include surrounding context.

python
def _run(cmd):
    """Execute one CLI invocation with a hard per-call timeout. No shell."""
    return subprocess.run(
        cmd,
        stdin=subprocess.DEVNULL,
        stdout=subprocess.PIPE,

The claim that every customer step is read-only contradicts instructions to create, change, and release resources.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

In scripts/axes/forced_migration_guide/_constants.py, L73-L75 explicitly claim that every printed step is a customer-performed read-only action. The following guidance instead instructs customers to create images and instances, repoint DNS or EIPs, and irreversibly release the old instance at L85-L105; these remain mutating operations even though the skill does not execute them.

Content

No source excerpt is available for this finding.

The guidance includes general billing disputes and security incidents outside the declared ECS migration scope.

Medium
Category
Excessive Agency
Confidence
95% confidence
Finding

In scripts/axes/forced_migration_guide/_constants.py, L162-L198 implement guidance for downgrade refunds, burstable CPU credit charges, and fee disputes, while L200-L237 address suspected breaches, abusive traffic, and attribution disputes. These playbooks do not require a migration connection and extend beyond the manifest's migration assessment, troubleshooting, and cloning purpose.

Content

No source excerpt is available for this finding.

The entry point exposes standalone incident, billing, and security playbooks beyond migration troubleshooting.

Medium
Category
Excessive Agency
Confidence
94% confidence
Finding

In scripts/axes/forced_migration_guide/forced_migration_guide.py, L162-L170 advertise and dispatch playbooks for reboot availability impacts, general fee or refund disputes, and suspected breaches or abusive traffic. These branches have no migration prerequisite, so the executable workflow extends beyond the manifest's stated migration and cloning remit.

Content

No source excerpt is available for this finding.

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/axes/instance_clone_guide/_cli.py (reported line 438)May include surrounding context.

python
cmd += [_param_flag(product, key), esc(f"param {key}", value)]

    try:
        result = subprocess.run(
            cmd,
            capture_output=True,
            text=True,

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/axes/instance_relocation_guide/_cli.py (reported line 74)May include surrounding context.

python
product = argv[1] if len(argv) > 1 else ""
        needed = True
        try:
            listed = subprocess.run(["aliyun", "plugin", "list"],
                                    stdin=subprocess.DEVNULL,
                                    stdout=subprocess.PIPE,
                                    stderr=subprocess.PIPE, timeout=30)