T09 · Insecure Skill Coding Practices
- Location
huawei-cloud-ces-list.py:130- Finding
Huawei Cloud credentials are exposed through process command-line arguments
- Content
View full analysis
Vulnerability Details
File Location:
huawei-cloud-ces-list.py, lines 130-140
Vulnerability Type: Sensitive credentials in process arguments
Risk Level: HighVulnerable Code
python cmd = [ "hcloud", service, operation, "--cli-access-key=" + ak, "--cli-secret-key=" + sk, ] + params try: proc = subprocess.run( cmd, capture_output=True, text=True, timeout=HCLOUD_TIMEOUT, )Technical Analysis
The Huawei Cloud access key and secret key are concatenated directly into the
hcloudprocess argument vector. Althoughsubprocess.runis safely invoked without a shell, this does not protect secrets passed through command-line arguments.Depending on the operating system and process-monitoring configuration, arguments may be observable through process listings,
/procinterfaces, endpoint monitoring tools, audit systems, crash diagnostics, or command-execution telemetry. The secret key is a long-lived authentication credential and should not be exposed through a process-visible channel.This behavior also conflicts with the Skill documentation's assertion that AK/SK credentials are not logged or exposed.
Attack Path
- A legitimate user configures Huawei Cloud AK/SK credentials and invokes the Skill.
- The Skill starts
hcloudwith both credentials embedded in its command-line arguments. - During the process lifetime, a local user, monitoring agent, diagnostic collector, or compromised process with sufficient process-inspection access reads the argument vector.
- The observer extracts the values of
--cli-access-keyand--cli-secret-key. - The credentials are reused outside the Skill to authenticate to Huawei Cloud APIs.
Impact Assessment
An attacker who captures the credentials can assume the permissions of the associated Huawei Cloud IAM identity. The immediate documented scope is read access to CES metr ...[truncated 383 chars]
- Remediation
View remediation
Remediation Suggestions
- Use an
hcloudauthentication mechanism that does not place secrets in the argument vector, such as protected environment variables, standard input, or a permission-restricted credential profile supported by KooCLI. - If a temporary configuration file is unavoidable, create it with owner-only permissions, avoid predictable paths, and securely delete it immediately after use.
- Prefer short-lived or federated credentials instead of long-lived AK/SK pairs.
- Ensure the IAM identity has only the required CES read permissions.
- Review process-monitoring, audit, and diagnostic systems for previously captured command lines.
- Rotate credentials that may already have appeared in process telemetry.
- Use an
