Back to skill

Security audit

alibabacloud-maxcompute-cli

Security checks for vulnerabilities and agentic risk

Overview

This skill is an operational MaxCompute helper with real cloud-data and authentication authority, but the reviewed instructions are scoped, disclosed, and include user-authorization gates for sensitive actions.

Install this only if you intend to let an agent operate Alibaba Cloud MaxCompute through your local CLI. Review any requested login, project/session change, package install, upload, overwrite, DDL/DML, job cancel, or credential-helper action before approving it, and prefer pinned or isolated CLI installation where possible.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:173
Finding
Unpinned Third-Party CLI Package Installation## Vulnerability Details **File Location**: `SKILL.md:173-176` **Vulnerability Type**: Unpinned third-party dependency installation **Risk Level**: Medium ### Vulnerable Code ```markdown For the standalone Python entry, Python 3.9 or later is required. Install or upgrade only when the user authorizes changing the Python environment: ```bash python3 -m pip install --upgrade maxc-cli ``` ``` The same unsafe installation pattern also appears at `references/setup-install.md:42-48`: ```markdown Only after the user authorizes the package change: ```bash python3 -m pip install --upgrade maxc-cli maxc --version maxc --help ``` ``` ### Technical Analysis The Skill instructs the agent to install or upgrade `maxc-cli` without specifying an exact audited version or verifying artifact integrity with cryptographic hashes. The `--upgrade` option resolves a mutable package release and its transitive dependencies at execution time. Python package installation may execute package-controlled build or installation logic. Consequently, the effective code is not fully represented by the audited Skill and can change after this review. Requiring user approval reduces accidental environment modification but does not address package-index compromise, a malicious future release, compromised maintainer credentials, or a malicious transitive dependency. The documentation references official Alibaba Cloud resources and does not use a visibly suspicious package name or custom package index. Therefore, this is an insecure supply-chain pattern rather than evidence that the current package is malicious. ### Attack Path 1. The Alibaba Cloud CLI is unavailable or unsuitable, causing the standalone Python fallback to be selected. 2. The user authorizes the requested package installation or upgrade. 3. The agent runs: ```bash python3 -m pip install --upgrade maxc-cli ``` 4. Pip resolves the latest available package and transitive dependency versions from its configured index. 5 ...[truncated 1255 chars]
Remediation
## Remediation Suggestions 1. Pin `maxc-cli` to an explicitly reviewed version rather than resolving the latest release: ```bash python3 -m pip install "maxc-cli==<reviewed-version>" ``` 2. Use a lock file containing hashes for the package and all transitive dependencies. Install with hash enforcement: ```bash python3 -m pip install --require-hashes -r requirements.lock ``` 3. Obtain package artifacts from a verified official source or a trusted internal package mirror with provenance controls. 4. Verify package signatures, checksums, or attestations where the publisher provides them. 5. Install the package in an isolated virtual environment rather than the user's global Python environment: ```bash python3 -m venv <dedicated-environment> <dedicated-environment>/bin/python -m pip install --require-hashes -r requirements.lock ``` 6. Separate dependency-update approval from ordinary Skill execution. Review and update the pinned version through a controlled maintenance process. 7. Continue requiring explicit user authorization before installation, but clarify that authorization alone does not establish package integrity. 8. Apply the same hardened command consistently in both `SKILL.md` and `references/setup-install.md` to prevent the unsafe fallback from remaining in secondary documentation.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
Findings (12)

Vague Triggers

High
Confidence
95% confidence
Finding
The skill explicitly says it MUST be invoked even when the user did not mention the CLI and even when the request is diagnosis- or clarification-only. That broad trigger can override user intent and route unrelated or non-execution tasks into an operational cloud skill, increasing the chance of unnecessary command execution against live MaxCompute resources.

Ae1

High
Category
analysis-evasion
Content
- [red-lines.md](references/red-lines.md): mutation boundaries and recovery.
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Tool Parameter Abuse

High
Category
Tool Misuse
Content
- In a TTY, select from the project picker.
- In non-interactive mode, a `status="pending"` envelope can contain `data.identity.projects`. Present the entries, let the user select one, and rerun the same provider-specific login with that entry's `project_id` and verified `endpoint`, preserving applicable OAuth flags. If the endpoint is absent, stop and obtain it rather than guessing.
- In CI, pass `--project` and `--no-picker`, and set the verified endpoint with `MAXCOMPUTE_ENDPOINT`. Use an approved non-interactive identity source; do not enumerate its secret-bearing environment.
- Use `--no-validate` only when the user explicitly requests saving configuration without a remote check; verify the context with a low-risk metadata command afterward.

For CI or another non-interactive environment with an approved credential
helper, the CLI also supports an external provider:
Confidence
88% confidence
Finding
The documented allowance for '--no-validate' permits saving authentication or project context without a remote verification step. Even though the text limits this to explicit user request and advises a later low-risk check, skipping validation can leave the tool configured for the wrong principal, wrong endpoint, or a broken or attacker-influenced context, which is risky in a cloud data-plane skill. In this skill context, misconfiguration can lead to later commands running against unintended projects or trust being placed in unverified auth state.

Anti-Refusal Statement

High
Category
Anti-Refusal
Content
- `validation_status=verified`
- the reported principal is the intended identity
- the reported project and endpoint match the user's target
- no warning indicates an unexpected override

Then run a low-risk metadata check when remote access has not yet been verified:
Confidence
80% confidence
Finding
Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
Use AK/SK, STS, environment variables, or `auth login-external` only when the
user or runtime specifically requires that method. If a controlled workflow
requires `auth login --from-env`, use that exact method once and do not add an
OAuth login. Never ask the user to paste a secret into chat, and never echo
credentials in commands, logs, or errors.

Read [bootstrap-auth.md](references/bootstrap-auth.md) for advanced OAuth or
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.

Unbounded Resource Access

Medium
Category
Excessive Agency
Content
`data upload`,
   `data download --overwrite`, and `job cancel` are separate mutations and
   require authorization appropriate to their effect.
9. A failed command is not permission to retry indefinitely. Apply the
   suggested recovery once, then stop or ask when the target or authority is
   still unclear.
10. Treat signed LogView URLs and their tokens as credentials. Do not copy them
Confidence
75% confidence
Finding
Skill allows unbounded resource consumption (API calls, storage, compute). Without rate limits or quotas, a compromised or misbehaving agent can cause denial-of-service or cost overruns.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
network state. Retry once only after the endpoint, network, or service state
  changes.
- For `QUOTA_EXCEEDED`, use bounded exponential backoff with jitter or ask for
  an authorized quota. Never raise capacity or switch quotas without approval.

## SQL and partition guidance
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.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
Security rules:

- Do not ask the user to paste AccessKey credentials or tokens into the conversation.
- Do not place credentials directly in command arguments.
- Do not read or print credential files or secret-bearing environment variables.
- Obtain user authorization before changing a persistent identity or MaxCompute context.
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.

Session Persistence

Medium
Category
Rogue Agent
Content
aliyun configure list
```

Create a new Alibaba Cloud CLI OAuth profile only when the user chooses this
fallback:

```bash
Confidence
66% confidence
Finding
This guidance includes creating and using a persistent Alibaba Cloud CLI OAuth profile and later importing profile-derived credentials into the active MaxCompute configuration. Even though the file warns about user choice and short-lived credentials, it still directs the agent toward writing authentication state to disk, which can expand session persistence and leave sensitive auth context resident beyond the immediate task. In an operational auth bootstrap skill, that persistence is more dangerous because the whole purpose is to establish cloud access and project context.

Session Persistence

Medium
Category
Rogue Agent
Content
aliyun configure list
```

Create a new OAuth profile only when the user chooses that fallback:

```bash
aliyun configure --mode OAuth --profile "<profile>"
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.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding
Suspicious Unicode normalization or mixed-script content

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
| `list-tables` returns empty although the user expects tables | Candidate causes include wrong project/schema, permissions or catalog visibility, cache state, or a genuinely empty namespace | Verify the effective project and schema, inspect warnings/source metadata, and check access before concluding that no tables exist |
| `search` returns no matches | Candidate causes include keyword mismatch, search-source coverage, permissions, or wrong project/schema | Verify the context and search source, then try a broader targeted keyword |
| `cache build` reports 0 tables | Candidate causes include wrong project/schema, permissions, or an empty namespace | Verify the selected context and access before rebuilding |
| `describe` fails with `NOT_FOUND` | The name, namespace, permission, or catalog view can be wrong | Use targeted metadata discovery only within the user-named scope; do not switch project, schema, or table without confirmation |
| Commands hang or time out | Candidate causes include an OAuth callback or project picker awaiting input, network/endpoint failure, or backend delay | Inspect current stderr and interactive state first; then verify the effective endpoint and connectivity |
| `whoami` shows the wrong project | A session, file, or environment override is active | Inspect `session show --json` and `config_sources`; change persistent state only with user authorization |
| `whoami` shows `identity_source=mixed` | More than one identity source is active | Verify the effective principal and inspect source summaries without printing secrets |
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.

Static analysis

No suspicious patterns detected.