Back to skill

Security audit

huawei-cloud-cloudrobo-dispatch

Security checks for vulnerabilities and agentic risk

Overview

This skill is for real robot task dispatch, but its documented test script can submit a live movement task without explicit confirmation.

Review before installing or running this skill. Use it only with a dedicated test workspace, least-privileged CloudRobo credentials, and a known safe robot or simulator. Do not run scripts/test-cli-commands.sh with ROBOT_ID and EXEC_MODEL_ID set unless you intend to allow a real task to be created; prefer dry-run/read-only checks. Pin and verify the CLI package where possible, and avoid storing AK/SK secrets in shared shell profiles, scripts, or logs.

Vulnerability Patterns
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/test-cli-commands.sh:58
Finding
Functional Test Script Dispatches a Real Robot Task Without Affirmative Confirmation<![CDATA[ ## Vulnerability Details **File Location**: `scripts/test-cli-commands.sh`, lines 58-73 **Vulnerability Type**: Missing confirmation gate for a safety-critical operation **Risk Level**: High ### Vulnerable Code ```bash # Test 5: Create task (mutating, needs confirmation) if [ -z "$TASK_ID" ]; then if [ -n "$ROBOT_ID" ] && [ -n "$EXEC_MODEL_ID" ]; then echo "Test 5: Create task (mutating)" echo "WARNING: This creates a dispatcher task. Press Ctrl+C to cancel." sleep 2 CREATE_RESULT=$(cloudrobo dispatch create-task \ --session-id "$SESSION_ID" \ --name "test-task-$(date +%s)" \ --task "Move forward 1 meter and report position" \ --constraints-json "{\"model\":{\"exec_model_id\":\"$EXEC_MODEL_ID\"},\"robot_id\":\"$ROBOT_ID\",\"exec_constraints\":{\"max_run_time\":10,\"max_iter_num\":100}}") echo "$CREATE_RESULT" TASK_ID=$(echo "$CREATE_RESULT" | python3 -c "import sys, json; print(json.load(sys.stdin).get('task_id',''))" 2>/dev/null || echo "") echo "Task ID: $TASK_ID" echo "" ``` The script is recommended as a normal verification command in `SKILL.md`: ```bash bash scripts/test-cli-commands.sh ``` ### Technical Analysis The test script labels task creation as requiring confirmation, but it never requests or validates affirmative user consent. It only prints a warning, waits for two seconds, and proceeds automatically unless the user interrupts it. When `SESSION_ID`, `ROBOT_ID`, and `EXEC_MODEL_ID` are configured and `TASK_ID` is empty, running the documented test command submits the fixed instruction `Move forward 1 meter and report position` to the selected robot. This behavior contradicts the Skill's stated safety policy that mutating operations must be confirmed before execution. A short cancellation window is not equivalent to an explicit confirmation gate. It also fails open in unattended or non-interactive environments, wher ...[truncated 1820 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Make all automated tests non-mutating by default and use `--dry-run` for task creation. 2. Require an explicit opt-in flag, such as `--execute-mutating-tests`, before any real task can be submitted. 3. Add an affirmative interactive confirmation that displays: - Session and workspace ID - Robot ID - Execution model ID - Exact task instruction - Runtime and iteration limits 4. Require an exact response such as `CREATE TASK` rather than treating a timeout or lack of interruption as consent. 5. Fail closed when standard input is not an interactive terminal unless a separate, deliberate CI authorization mechanism is supplied. 6. Consider requiring the operator to re-enter the target robot ID to prevent accidental dispatch to the wrong robot. 7. Separate read-only smoke tests from physical lifecycle tests so the documented default command cannot activate hardware. 8. Update `SKILL.md` to clearly distinguish safe verification from explicitly authorized live-robot testing. A safer pattern would be: ```bash if [ "${EXECUTE_MUTATING_TESTS:-false}" != "true" ]; then cloudrobo dispatch create-task \ --session-id "$SESSION_ID" \ --name "dry-run-test" \ --task "Move forward 1 meter and report position" \ --constraints-json "$CONSTRAINTS_JSON" \ --dry-run exit 0 fi if [ ! -t 0 ]; then echo "ERROR: Live robot tests require an interactive terminal." exit 1 fi printf 'Type CREATE TASK to dispatch this instruction: ' read -r CONFIRMATION [ "$CONFIRMATION" = "CREATE TASK" ] || exit 1 ``` ]]>

T08 · Insecure Dependencies

Warning
Location
references/cli-installation-guide.md:13
Finding
Unpinned Privileged CLI Installation Creates a Supply-Chain Risk<![CDATA[ ## Vulnerability Details **File Location**: `references/cli-installation-guide.md`, lines 13-17 **Vulnerability Type**: Unpinned third-party dependency installation **Risk Level**: Medium ### Vulnerable Code ```bash ## 1. Install the CLI ```bash pip install hw-cloudrobo-dispatch ``` ``` ### Technical Analysis The installation guide instructs users to install `hw-cloudrobo-dispatch` without a fixed version, cryptographic hashes, a lock file, or an explicitly trusted package index. Consequently, the effective code installed by this instruction may change after the Skill has been audited. This risk is significant because the installed CLI is subsequently given access to Huawei Cloud AK/SK credentials and is authorized to submit commands that control physical robots. Python package installation may also execute package build hooks or install console entry points under the user's privileges. The audit found no evidence that the named package is currently malicious. The vulnerability is the mutable and insufficiently verified dependency acquisition process, which leaves the workflow exposed to a future compromised release, compromised transitive dependency, package-index compromise, or dependency-confusion condition. ### Attack Path 1. An attacker compromises the package, one of its transitive dependencies, or the package source used by pip. 2. The attacker publishes a malicious version that still satisfies the unconstrained installation command. 3. A user follows the guide and runs `pip install hw-cloudrobo-dispatch`. 4. Pip resolves and installs the malicious release or dependency. 5. Malicious installation or runtime code executes with the user's local privileges. 6. When the CLI is used, the code can access configured AK/SK credentials and task parameters. 7. The compromised component can exfiltrate credentials, manipulate API requests, retrieve task data, or submit unauthorized robot operations within the credential's permitted scope. ### Im ...[truncated 793 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin the CLI to a specifically audited version: ```bash python -m pip install "hw-cloudrobo-dispatch==<audited-version>" ``` 2. Publish a locked requirements file containing hashes for the package and every transitive dependency. 3. Install with hash enforcement: ```bash python -m pip install --require-hashes -r requirements.lock ``` 4. Explicitly document the trusted official package index and avoid relying on arbitrary user-level pip index configuration. 5. Verify release provenance through signed artifacts, trusted publishing, or an equivalent package-signing mechanism. 6. Recommend installation in an isolated virtual environment rather than the system Python environment. 7. Review dependency updates before changing the pinned version and repeat the security audit for new releases. 8. Use a dedicated, least-privileged AK/SK pair restricted to the required CloudRobo workspace and dispatch endpoints. 9. Avoid exposing credentials during package installation; configure them only after the verified package has been installed. 10. Document how users can verify the downloaded artifact's expected digest before installation. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (2)

Vague Triggers

Medium
Confidence
95% confidence
Finding
The trigger list is overly broad for a skill that can create and cancel real robot tasks, including generic phrases like 'dispatch', 'agent task', 'cancel task', and 'task result'. This increases the chance of accidental invocation from unrelated user requests, which is especially risky because the skill supports mutating operations that can cause physical-world effects on robots.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The guide instructs users to export long-lived AK/SK credentials directly into shell environment variables without any warning about persistence, shell history exposure, process inspection, or leakage into child processes and logs. In a CLI for robot/task dispatch against a cloud control plane, compromise of these credentials could allow unauthorized task creation, cancellation, or broader API access under the user's account.

Static analysis

No suspicious patterns detected.