Back to skill

Security audit

Huawei Cloud Swr Image Management

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent Huawei Cloud SWR management guide, but it needs review because it includes unsafe handling of long-lived registry credentials and high-impact cloud operations.

Review this skill before installing. Use read-only IAM unless you explicitly need management actions; avoid running the full verification checklist against production accounts; do not create one-year SWR secrets unless required; and use docker login --password-stdin or a secret manager instead of putting registry passwords on the command line.

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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:227
Finding

Registry Password Exposed Through Docker Command-Line Arguments

Content
View full analysis
| base64 -d → username:password docker login -u -p swr.cn-north-4.myhuaweicloud.com ``` ``` Equivalent insecure commands also appear in: - `references/task-auth-management.md:40-48` - `references/task-auth-management.md:113-120` - `references/task-auth-management.md:147-151` - `references/swr-api-guide.md:419-424` ### Technical Analysis The documentation instructs the agent or user to pass an SWR registry password to `docker login` using the `-p` command-line option. Secrets passed as command-line arguments can be exposed through process inspection, command tracing, shell history, terminal recordings, CI/CD logs, and execution telemetry. The preceding decoding instruction also converts the Base64-encoded authorization value into plaintext `username:password` material. Base64 is an encoding and provides no confidentiality. If the resulting value is inserted into the documented command, the password becomes visible in the process argument list and potentially in retained execution records. This conflicts with the project's separate instruction not to display full credentials in logs or conversations. ### Attack Path 1. An authorized user or agent invokes `hcloud SWR CreateAuthorizationToken` or `hcloud SWR CreateSecret`. 2. The returned Base64 authorization value is decoded into a plaintext username and password. 3. The documented `docker login -u ... -p ...` command is executed. 4. The plaintext password appears in the process arguments, shell history, CI output, tracing output, or command telemetry. 5. A local user, log reader, monitoring integration, or other party with access to those records captures the credential. 6. The captured creden ...[truncated 806 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
references/verification-method.md:112
Finding

Routine Verification Generates and Displays Long-Lived Registry Credentials

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (17)

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The documentation expands a temporary docker-login credential flow into guidance for creating long-term credentials via CreateSecret, which materially broadens the secret-management scope of the skill. Even though this is documentation, it can steer agents or users toward generating year-long credentials that increase persistence and blast radius if exposed, especially in CI/CD contexts where secrets are frequently replicated across systems.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The guide tells users to decode the returned base64 auth token and pass the decoded username/password directly on the command line with docker login -p. Decoding and handling credentials this way increases the chance of secret exposure via shell history, process listings, logs, screenshots, or copy/paste into insecure contexts.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The document recommends a 1-year login secret for CI/CD automation without warning about secure storage, least privilege, revocation, and rotation requirements. Long-lived registry credentials materially increase blast radius if compromised, especially in build systems where secrets are often broadly accessible and frequently logged or copied across environments.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
75% confidence
Finding

Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The workflow includes a destructive namespace deletion command in routine quota-cleanup guidance without an explicit confirmation step, backup check, or strong user-facing warning beyond a brief inline note. In this skill context, deleting an SWR namespace can remove all repositories under it, so an operator or agent following the guidance could cause irreversible service disruption or image loss during normal maintenance.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The tag cleanup workflow instructs users to delete old tags as part of quota management without clearly stating that tag removal is irreversible and may break deployments, rollbacks, or downstream automation that depends on those image versions. Because this is an image lifecycle management skill, users are likely to follow the example directly, making accidental deletion more plausible and operationally harmful.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
75% confidence
Finding

Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
75% confidence
Finding

Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
75% confidence
Finding

Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The repository creation workflow includes a public repository example without a user-facing warning about external exposure. In the context of SWR lifecycle management, this can lead users to create publicly accessible registries for internal workloads, increasing the risk of source disclosure, software reconnaissance, and accidental distribution of sensitive images.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill explicitly documents making repositories public and frames it as a normal workflow, but does not warn that public visibility can expose proprietary container images, tag names, repository metadata, and potentially vulnerable software components to anyone with access. In an image registry management skill, this omission is security-relevant because users may unintentionally publish internal artifacts without understanding the consequences.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

Lines L011-L014 use Chinese descriptions for core operations while the rest of the file is written in English. This can force a specific language experience on users without opt-in, which matches the language/locale policy violation category.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The verification guide explicitly instructs users to retrieve a long-term SWR login secret and presents successful output as a normal verification step, but it provides no warning about secure handling, storage, redaction, or avoiding logs and transcripts. In an agent-assisted or shared-terminal context, this increases the chance that durable credentials are exposed in chat history, shell history, CI logs, screenshots, or other observability systems, creating a reusable secret exposure risk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

SQP-3 applies to all file types and covers language or locale policy violations. Lines L011-L012 use Chinese descriptions in an otherwise English document, which can force a specific language on users without opt-in or justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The operation description uses Chinese text (获取配额信息) inside an otherwise English document, which imposes a language assumption without user opt-in. This can violate language or locale consistency expectations when no choice or justification is provided.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

Several operation descriptions are written in Chinese while the surrounding document is in English, which imposes a language assumption without user opt-in. The policy allows locale constraints only when they are clearly documented and justified, which is not present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The document repeatedly forces --cli-region=cn-north-4, which imposes a specific regional setting in natural-language usage instructions without indicating that users may choose another region or that the skill is intentionally region-specific. This can violate locale-policy expectations when no opt-in or justification is provided.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.