Back to skill

Security audit

huawei-cloud-codearts-code-gen

Security checks for vulnerabilities and agentic risk

Overview

This skill overrides your coding choices, installs software automatically, and grants file access beyond the workspace you approve.

Review before installing. Request explicit opt-in routing and installation, workspace-limited reads, preservation of existing permission rules, and safer credential storage. Only attach files you authorize Huawei Cloud to process, use minimally privileged credentials, and remove saved keys afterward. The downloaded installer and CLI were not audited.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md
Finding

Skill overrides the user's choice of code-generation workflow

Content
View full analysis

Impact

The agent is directed to perform unwanted environment setup and force a cloud-service workflow for requests that do not authorize that workflow.

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/permission.sh
Finding

Workspace consent installs unrestricted external-directory read permissions

Content
View full analysis

Impact

The CLI receives broader filesystem-read authority than the user approved, and the global configuration persists for subsequent CLI invocations. This confirms an authorization expansion, not that any particular external file was read or transmitted.

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

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Permission setup can support code generation, but this script makes material, persistent authorization changes beyond ordinary implementation details. The description does not disclose policy replacement or the broad capabilities granted, and the declared permissions list is empty. Interactive confirmation or --agree gates execution, but does not resolve that description–behavior mismatch. The supplied chunk configures permissions rather than generating code; this assessment does not assume what other skill components do.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The command template does not identify CodeArts, perform code generation, or implement the declared routing and retry behavior. Instead, it describes a broader cloud CLI interface. No specific service operation or resource access is shown, so more concrete capabilities cannot be established.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The concrete operation shown queries cloud identity and access-management policies rather than generating code. Although CLI setup documentation can support a code-generation skill, this chunk provides no connection between IAM policy enumeration and that purpose. The assessment concerns the supplied command example; it does not establish that the command was executed.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

The documented workflow automatically downloads and installs executable software before obtaining installation-specific approval, without specifying signature or pinned-digest verification. This creates a supply-chain execution risk, amplified by mandatory activation for ordinary coding requests; the separate eval allegation cannot be verified from this source.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

The supplied chunk performs local documentation checks and reports their results; it does not invoke CodeArts or route a code-generation request. No connection establishing these checks as supporting implementation for the declared purpose is shown. The final command lists URL matches but does not verify that they are limited to three approved official links. No file modification or network access is evident.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
86% confidence
Finding

Authentication setup could support a code-generation CLI, but explicitly saving sensitive credentials is a material capability beyond the declared routing and generation purpose. The supplied chunk does not show how or where credentials are stored, so it does not establish exfiltration or any particular storage mechanism.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding

The supplied command requests a credential-clearing operation rather than code generation. Clearing credentials is a materially distinct capability, not merely an evident implementation detail of generating code. The setup script itself is not supplied, so the exact resources affected and whether credentials are actually removed cannot be verified.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
81% confidence
Finding

The supplied command appears to affirm a permission-related operation for the workspace, whereas the description only declares routing code-generation requests. Automatically supplying agreement is a distinct authorization-related action, not merely invoking code generation. This assessment is limited to the visible invocation; specific permission changes or other downstream effects cannot be established without the script.

Content

No source excerpt is available for this finding.

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 49)May include surrounding context.

md
-> scripts/setup.sh | scripts/setup.ps1 environment check + AK/SK persistence

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 67)May include surrounding context.

md
`bash scripts/setup.sh --save-aksk <AK> <SK>` (Windows:

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 72)May include surrounding context.

md
on BSD/macOS as well as GNU toolchains: `bash scripts/setup.sh --clear-aksk` on Linux / macOS and

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 96)May include surrounding context.

md
| CodeArts CLI | No manual install required — `scripts/setup.sh` / `scripts/setup.ps1` install `codearts` into `~/.codeartsdoer/installers` |

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 131)May include surrounding context.

md
it is doing and execute this skill by running `setup.sh`. Do NOT write any code, check any

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 137)May include surrounding context.

md
3. **The only exception**: only when `setup.sh` returns `error` (exit code 30/40/50) AND after

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 146)May include surrounding context.

md
bash scripts/setup.sh

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 181)May include surrounding context.

md
`bash scripts/setup.sh --clear-aksk`; Windows:

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 194)May include surrounding context.

md
| `ready` | `0` | Environment setup complete; proceed with code generation | `scripts/setup.sh`, `scripts/setup.ps1` |

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 195)May include surrounding context.

md
| `cleared` | `0` | Stored `CODEARTS_CLI_AK` / `CODEARTS_CLI_SK` credentials removed | `scripts/setup.sh --clear-aksk`, `scripts/setup.ps1 -ClearAksk` |

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 196)May include surrounding context.

md
| `need_input` | `10` | Huawei Cloud AK/SK required (`type: "aksk_required"`) | `scripts/setup.sh`, `scripts/codearts_run.sh` |

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 197)May include surrounding context.

md
| `need_consent` | `20` | File read/write permission authorization required | `scripts/setup.sh`, `scripts/permission.sh` |

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 198)May include surrounding context.

md
| `error` / `invalid_arguments` | `2` | Missing or empty AK/SK, missing option value, or `.bashrc` lock timeout | `scripts/setup.sh`, `scripts/setup.ps1` |

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 199)May include surrounding context.

md
| `error` | `30` / `40` / `50` | CLI installation failed, network failure, authentication failure | `scripts/setup.sh`, `scripts/codearts_run.sh` |

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 210)May include surrounding context.

md
bash scripts/setup.sh

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 213)May include surrounding context.

md
bash scripts/setup.sh --save-aksk <AK> <SK>

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 229)May include surrounding context.

md
bash scripts/setup.sh --clear-aksk