Back to skill

Security audit

huawei-cloud-cloudrobo-asset

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent CloudRobo asset-management helper, but it handles cloud credentials and asset mutations while documenting unsafe TLS and credential-handling practices that users should review before installing.

Install only if you trust the CloudRobo client package source and can use a least-privileged AK/SK. Keep TLS verification enabled, avoid CLOUDROBO_VERIFY_SSL=false except in isolated debugging, protect any ~/.cloudrobo/config.yaml credentials, and require explicit confirmation before delete, batch-delete, import, export, or Action mutation commands.

Vulnerability Patterns
  • 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
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
Findings (3)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/test-cli-commands.sh:42
Finding
Overbroad Environment Credential Discovery<![CDATA[ ## Vulnerability Details **File Location**: `scripts/test-cli-commands.sh`, lines 42–56 **Vulnerability Type**: Excessive access to credentials in the process environment **Risk Level**: High ### Vulnerable Code ```bash scan_credentials() { local ak="" sk="" for var in $(env | grep -iE '^(HUAWEI|HW|HWC).*(_AK|ACCESS_KEY|_SK|SECRET_KEY)' | cut -d= -f1 | sort -u); do case "$var" in *_AK|*ACCESS_KEY) ak="${!var}" ;; *_SK|*SECRET_KEY) sk="${!var}" ;; esac done if [ -z "$ak" ] || [ -z "$sk" ]; then echo "ERROR: AK/SK not found in environment variables." echo "Set HUAWEI_CLOUD_AK and HUAWEI_CLOUD_SK environment variables." exit 1 fi echo "Credentials found in environment variables." } ``` ### Technical Analysis The script enumerates the complete process environment and searches for any variable with a Huawei-related prefix and a suffix resembling an access key or secret key. It then uses indirect expansion (`${!var}`) to retrieve the value of every matching variable. The test suite only requires the documented `HUAWEI_CLOUD_AK` and `HUAWEI_CLOUD_SK` variables. It does not need to discover alternative credentials or read their values merely to determine whether authentication is configured. Consequently, this implementation crosses a least-privilege boundary by accessing potentially unrelated Huawei credentials inherited by the process. The current script does not print or transmit these values, so direct credential exfiltration was not identified. Nevertheless, reading unrelated secrets unnecessarily exposes them to future script changes, debugging facilities, process inspection, or accidental logging. ### Attack Path 1. A user or automation system runs the verification script in an environment containing multiple Huawei credentials. 2. `scan_credentials` invokes `env` and identifies all matching access-key and secret-key variable names. 3. Indirect shell expans ...[truncated 683 chars]
Remediation
<![CDATA[ ## Remediation Suggestions Check only the presence of the two documented variables and avoid reading their values: ```bash scan_credentials() { if [ -z "${HUAWEI_CLOUD_AK:-}" ] || [ -z "${HUAWEI_CLOUD_SK:-}" ]; then echo "ERROR: Required CloudRobo credentials are not configured." >&2 exit 1 fi echo "Required credential variables are configured." } ``` Additional hardening measures: 1. Do not enumerate the complete environment. 2. Do not support ambiguous credential aliases unless each alias is explicitly documented and required. 3. Never print credential values or enable shell tracing around credential-handling code. 4. Run tests with a dedicated, least-privileged CloudRobo credential. 5. Remove unnecessary secrets from the test process environment before execution. ]]>

T08 · Insecure Dependencies

Warning
Location
references/cli-installation-guide.md:12
Finding
Unpinned Installation of an Executable Third-Party Package<![CDATA[ ## Vulnerability Details **File Location**: `references/cli-installation-guide.md`, lines 12–30 **Vulnerability Type**: Mutable third-party dependency installation **Risk Level**: Medium ### Vulnerable Code ```bash ### Install cloudrobo-core (CLI framework) 安装核心包 ```bash pip install hw-cloudrobo-client ``` This provides the `cloudrobo` main CLI entry point. ### Install cloudrobo-asset (asset commands) 安装资产包 ```bash pip install hw-cloudrobo-client ``` This registers the `asset` command group via entry points. ### Install all packages (recommended) 安装全部包 ```bash pip install hw-cloudrobo-client ``` ``` ### Technical Analysis The installation guide repeatedly instructs users to install `hw-cloudrobo-client` without a version constraint, artifact hash, lockfile, or authenticated private-index requirement. The audited project does not contain the dependency source, so the behavior of the installed CLI is outside the reviewed artifact and may change over time. Because the package provides the `cloudrobo` executable and SDK modules, installed package code later runs with the invoking user's filesystem and network privileges. It also operates in a process that receives Huawei AK/SK credentials. A compromised package account, malicious future release, package-index compromise, or dependency-resolution attack could therefore introduce code that was not present during this audit. ### Attack Path 1. An attacker compromises the package publisher, distribution account, package index, or an unpinned transitive dependency. 2. A malicious release becomes the version selected by `pip install hw-cloudrobo-client`. 3. A user follows the Skill's prerequisite instructions and installs the mutable latest release. 4. The malicious package is installed and registers or replaces the `cloudrobo` entry point. 5. When the user invokes `cloudrobo`, package code executes with the user's permissions and can access credentials supplied to the CLI. ### Impact Assessment ...[truncated 452 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin the dependency to a reviewed, immutable version: ```bash python -m pip install "hw-cloudrobo-client==<reviewed-version>" ``` 2. Publish a hash-locked requirements file and require hash verification: ```text hw-cloudrobo-client==<reviewed-version> \ --hash=sha256:<verified-wheel-hash> ``` ```bash python -m pip install --require-hashes -r requirements.txt ``` 3. Pin and hash all transitive dependencies, not only the top-level package. 4. Use the vendor's authenticated package repository where available. 5. Verify package signatures or provenance attestations before installation. 6. Install into an isolated virtual environment under an unprivileged account. 7. Document the exact reviewed package version and update it only through a new security review. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
references/cli-installation-guide.md:123
Finding
TLS Certificate Verification Can Be Disabled and Is Documented as Disabled by Default<![CDATA[ ## Vulnerability Details **File Location**: `references/cli-installation-guide.md`, lines 123 and 125–138; related guidance in `references/iam-policies.md`, lines 60–63 **Vulnerability Type**: Unsafe TLS configuration guidance **Risk Level**: High ### Vulnerable Code From `references/cli-installation-guide.md`: ```markdown | SSL verification errors | Set `CLOUDROBO_VERIFY_SSL=false` (debug only) | ``` ```markdown ## Environment Variables 环境变量 | Variable | Description | Default | |----------|-------------|---------| | `HUAWEI_CLOUD_AK` | Access key ID | — | | `HUAWEI_CLOUD_SK` | Secret access key | — | | `CLOUDROBO_SERVICE_CONFIG` | Custom config file path | `~/.cloudrobo/config.yaml` | | `CLOUDROBO_ENDPOINT_cloudrobo-asset-manager` | Override asset service endpoint | — | | `CLOUDROBO_ENDPOINT_cloudrobo-obs` | Override OBS endpoint (import/export) | — | | `CLOUDROBO_HTTP_PROXY` | HTTP proxy | — | | `CLOUDROBO_HTTPS_PROXY` | HTTPS proxy | — | | `CLOUDROBO_VERIFY_SSL` | SSL verification (true/false) | false | | `CLOUDROBO_LOG_TRAFFIC` | Traffic logging (true/false) | false | | `CLOUDROBO_DEBUG` | Verbose error output (1/0) | 0 | ``` Related guidance from `references/iam-policies.md`: ```markdown - **SSL verification** — Can be disabled for debugging (`CLOUDROBO_VERIFY_SSL=false`) but should be enabled in production - **Traffic logging** — `CLOUDROBO_LOG_TRAFFIC=true` enables request/response logging for debugging; disable in production to avoid credential leakage in logs ``` ### Technical Analysis The installation guide advises disabling TLS certificate verification as a response to SSL errors and states that the verification setting defaults to `false`. Certificate verification is what authenticates the remote HTTPS endpoint. Disabling it allows the client to establish encrypted connections to endpoints presenting untrusted or attacker-controlled certificates. APIG HMAC signing does not replace server authentication. It authenticates sign ...[truncated 1639 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Make certificate verification mandatory and default it to `true`: ```bash export CLOUDROBO_VERIFY_SSL=true ``` 2. Remove the recommendation to disable verification as a general troubleshooting step. 3. Resolve certificate failures by installing the correct system or enterprise CA certificate. 4. Support an explicit trusted CA bundle, for example: ```bash export SSL_CERT_FILE="/path/to/trusted-ca-bundle.pem" ``` 5. If an emergency insecure override must remain: - Require an explicit warning and user acknowledgment. - Restrict it to isolated non-production environments. - Refuse to use production credentials while verification is disabled. - Prevent import, export, and other sensitive operations in insecure mode. 6. Validate endpoint override schemes and require HTTPS. 7. Clearly warn that traffic logging must not be combined with production credentials or insecure TLS settings. ]]>
Vulnerability Patterns
  • 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
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (8)

Context-Inappropriate Capability

Medium
Confidence
92% confidence
Finding
The script enumerates environment variables matching Huawei access-key/secret-key patterns and automatically consumes them without explicit user selection or consent. While this appears intended to simplify test setup rather than steal secrets, auto-discovery of cloud credentials is sensitive behavior because it broadens secret exposure and can cause the script to operate under whichever credentials happen to be present in the environment.

Vague Triggers

Medium
Confidence
83% confidence
Finding
The trigger list is extremely broad and includes generic asset-management phrases in both English and Chinese without clear scoping constraints. That increases the chance the skill will activate in situations involving sensitive repository, import/export, deletion, or permission operations when the user intent is ambiguous, which can lead to over-broad tool use and accidental exposure or modification of assets.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The guide explicitly instructs users to place long-lived AK/SK credentials into `~/.cloudrobo/config.yaml` in plaintext, but does not warn that the file is highly sensitive or recommend safer storage mechanisms. If the host is shared, backed up, logged, or the file permissions are weak, the credentials can be exposed and used to access cloud resources.

Missing User Warnings

High
Confidence
98% confidence
Finding
The troubleshooting guidance tells users to disable SSL verification by setting `CLOUDROBO_VERIFY_SSL=false` without clearly describing the man-in-the-middle risk. This can cause users to transmit credentials and data over connections that no longer validate the server identity, enabling interception or tampering.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
| Command | Key Params | SDK Method | API |
|---------|-----------|------------|-----|
| show-asset | `--asset-id <id>` | `client.show_asset(asset_id)` | `GET /v1/assets/{asset_id}` |
| delete-asset | `--asset-id <id> [--dry-run]` | `client.delete_asset(asset_id)` | `DELETE /v1/assets/{asset_id}` |
| batch-delete-assets | `--asset-ids "id1,id2" [--dry-run]` | `client.batch_delete_assets({"asset_ids": [...]})` | `POST /v1/assets/batch-delete` |

### Version Management 版本管理
Confidence
91% confidence
Finding
The skill exposes a destructive delete-asset operation that can be driven by a single user-supplied asset ID, creating a clear path for parameter abuse if the agent acts on ambiguous, injected, or unverified identifiers. Although the document advises confirmation and supports dry-run, the command is still directly available and could irreversibly remove assets if the surrounding agent fails to enforce strong confirmation and authorization checks.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
| Command | Key Params | SDK Method | API |
|---------|-----------|------------|-----|
| show-version | `--asset-id <id> --version-id <vid>` | `client.show_asset_version(asset_id, version_id)` | `GET /v1/assets/{asset_id}/versions/{version_id}` |
| delete-version | `--asset-id <id> --version-id <vid> [--dry-run]` | `client.delete_asset_version(asset_id, version_id)` | `DELETE /v1/assets/{asset_id}/versions/{version_id}` |
| batch-delete-versions | `--asset-id <id> --version-ids "v1,v2" [--dry-run]` | `client.batch_delete_asset_versions(asset_id, {"version_ids": [...]})` | `POST /v1/assets/{asset_id}/versions/batch-delete` |

### Tag Management 标签管理
Confidence
90% confidence
Finding
The delete-version and batch-delete-versions commands expose irreversible destructive actions on asset versions based on user-controlled IDs. In an agent setting, this is dangerous because prompt injection, misunderstanding, or stale context could cause deletion of the wrong version set, potentially disrupting reproducibility, lineage, or production workflows.

Unsafe Defaults

Medium
Category
Tool Misuse
Content
| `OBS upload failed` | Check `cloudrobo-obs` endpoint configuration and DNS reachability |
| `FileNotFoundError` | `import-asset` requires `local_path` to exist |
| `No versions found` | `export-asset` requires at least one version |
| SSL verification errors | Set `CLOUDROBO_VERIFY_SSL=false` (debug only) |

## Environment Variables 环境变量
Confidence
97% confidence
Finding
The documented use of `VERIFY_SSL=false` represents an unsafe operational pattern because it normalizes running the client without TLS certificate validation. In the context of a cloud asset-management CLI that handles AK/SK credentials and import/export traffic, this materially increases the chance of credential theft and response tampering.

Unsafe Defaults

Medium
Category
Tool Misuse
Content
- **Signing mechanism** — APIG HMAC-SHA256 signs each request with a timestamp to prevent
  replay attacks
- **Proxy support** — Optional HTTP/HTTPS proxy can be configured for network isolation
- **SSL verification** — Can be disabled for debugging (`CLOUDROBO_VERIFY_SSL=false`) but
  should be enabled in production
- **Traffic logging** — `CLOUDROBO_LOG_TRAFFIC=true` enables request/response logging for
  debugging; disable in production to avoid credential leakage in logs
Confidence
90% confidence
Finding
The document explicitly advertises disabling SSL verification via `CLOUDROBO_VERIFY_SSL=false`, which can normalize insecure usage and lead operators to accept man-in-the-middle risk during real asset management operations. In this skill context, the same documentation also discusses AK/SK credentials and traffic logging, so TLS weakening could expose sensitive signed requests, service metadata, or imported/exported asset data if copied into production or shared environments.

Static analysis

No suspicious patterns detected.