Back to skill

Security audit

huawei-cloud-cci-instance-management

Security checks for vulnerabilities and agentic risk

Overview

The skill performs its advertised cloud-management tasks, but deletion approval depends on the agent following its confirmation instructions.

Use narrowly scoped credentials and verify that the CLI and helper target the intended account and project. Review the exact namespace, affected resources and charges before approval. Keep Secret values private and review network rules before enabling public access. Confirmation depends on agent behavior; live IAM permissions and runtime enforcement were not tested.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/cci_network_helper.py
Finding

Network deletion bypasses the documented confirmation gate

Content
View full analysis

Impact

A direct helper invocation can delete a Network before the required preview and explicit confirmation, disrupting connectivity for workloads using that Network.

Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Memory PoisoningPersistent Context Injection, Context Window Stuffing, Memory Manipulation
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (32)

Tainted flow: 'headers' from os.environ.get (line 242, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/cci_network_helper.py (reported line 244)May include surrounding context.

python
headers = sign_request("POST", host, resource_path, body, ak, sk, security_token, project_id)

    resp = requests.post(url, data=body.encode("utf-8"), headers=headers)
    try:
        result = json.loads(resp.text)
    except json.JSONDecodeError:

Tainted flow: 'headers' from os.environ.get (line 296, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/cci_network_helper.py (reported line 298)May include surrounding context.

python
headers = sign_request("POST", host, resource_path, body, ak, sk, security_token, project_id)

    resp = requests.post(url, data=body.encode("utf-8"), headers=headers)
    try:
        result = json.loads(resp.text)
    except json.JSONDecodeError:

Tainted flow: 'headers' from os.environ.get (line 363, credential/environment) → requests.get (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/cci_network_helper.py (reported line 365)May include surrounding context.

python
headers = sign_request("GET", host, resource_path, "", ak, sk, security_token, project_id)

    resp = requests.get(url, headers=headers)
    try:
        result = json.loads(resp.text)
    except json.JSONDecodeError:

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The delete command directly invokes delete_network(), which sends requests.delete() without a confirmation prompt, confirmation token, or other approval check. This contradicts the explicit two-step-confirmation guarantee. An external confirmation workflow might exist, but none is demonstrated in the supplied code. Direct API calls and credential/project lookup support the declared CCI-management purpose and are not separate mismatches. The other lifecycle features described may exist elsewhere; their absence from this helper chunk alone is not evidence of a mismatch.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

The commands target CCI resources covered by the description, so their resource scope and general purpose are consistent. However, the supplied code directly issues three destructive collection deletions without prompts, approval checks, or confirmation gates, contrary to the explicit two-step confirmation requirement. This finding is limited to the supplied chunk; an external confirmation mechanism is not shown.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

Namespace deletion is within the declared management scope, but the supplied code directly invokes deleteCoreV1Namespace without implementing the promised two-step confirmation. This is material because namespace deletion can cascade to resources within it. Confirmation elsewhere is possible but is not evidenced by this chunk.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

Deleting a CCI network is within the declared resource-management scope. However, the supplied shell chunk performs the deletion directly and contains no confirmation steps or guards, contrary to the stated requirement for all destructive operations. Confirmation might exist elsewhere, but it is not demonstrated in the supplied code.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
88% confidence
Finding

Pod inspection, ConfigMap inspection, and event retrieval reasonably support the declared CCI troubleshooting functionality. However, explicitly listing and reading Secret objects adds a materially sensitive resource-access capability beyond the described workload lifecycle, logs, and metrics operations. The chunk contains no destructive commands or external exfiltration, so it does not demonstrate a violation of the destructive-operation confirmation requirement.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
87% confidence
Finding

The CCI commands and resources match the declared management purpose. However, the supplied deletion command has no confirmation prompts or approval gating, contrary to the explicit promise of two-step confirmation for all destructive operations. A surrounding workflow could supply that safeguard, but none is shown in this chunk.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
84% confidence
Finding

The storage, pod, and event queries reasonably support the declared container-management and diagnostic purpose. However, retrieving the Secret object accesses sensitive credential material, a capability not disclosed in the description. No destructive operations are present, so the two-step confirmation requirement is not implicated. The chunk shows no external exfiltration.

Content

No source excerpt is available for this finding.

Memory Manipulation

High
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Content

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

md
| Delete Namespace | 🔴 Critical | Cascades — deletes ALL resources under this namespace (Network, Pods, Deployments, etc.) |
| Delete Network | 🟠 High | Disconnects namespace from VPC; running pods lose network |
| Delete Deployment | 🟠 High | Terminates all replicas of the workload |
| Delete StatefulSet | 🟠 High | Terminates all replicas; PVC data may be lost |
| Delete Pod | 🟠 High | Terminates the container instance |
| Delete EIPPool | 🟡 Medium | Releases public IPs allocated to pods |
| Delete PVC (StatefulSet cleanup) | 🟠 High | Destroys the claim and its volume; the data cannot be recovered. Preview with `listCoreV1NamespacedPersistentVolumeClaim` / `readCoreV1NamespacedPersistentVolumeClaim`, then delete one PVC at a time |

Memory Manipulation

High
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Content

Scanner excerpt · references/cci-operation-catalog.md (reported line 53)May include surrounding context.

md
| `readAppsV1NamespacedStatefulSetStatus` | Read StatefulSet status |
| `patchAppsV1NamespacedStatefulSet` | Update StatefulSet |
| `replaceAppsV1NamespacedStatefulSet` | Replace StatefulSet |
| `deleteAppsV1NamespacedStatefulSet` | Delete StatefulSet |
| `deleteAppsV1CollectionNamespacedStatefulSet` | Delete all StatefulSets in namespace |

## Pod (Core)

Memory Manipulation

High
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Content

Scanner excerpt · references/iam-policies.md (reported line 28)May include surrounding context.

md
| `cci:statefulset:get` | Read StatefulSet |
| `cci:statefulset:list` | List StatefulSets |
| `cci:statefulset:update` | Update StatefulSet |
| `cci:statefulset:delete` | Delete StatefulSet |
| `vpc:vpcs:list` | List VPCs (for Network creation) |
| `vpc:subnets:get` | Read subnet details (for Network creation) |

Memory Manipulation

High
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Content

Scanner excerpt · references/task-statefulset-management.md (reported line 106)May include surrounding context.


4. Delete StatefulSet — TWO-STEP CONFIRMATION

bash
hcloud CCI deleteAppsV1NamespacedStatefulSet --name=<sts-name> --namespace=<ns-name> --cli-region=<region>

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 168)May include surrounding context.

md
See [references/parameter-format.md](references/parameter-format.md) for complete CCI parameter format rules and examples.

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 486)May include surrounding context.

md
| [parameter-format.md](references/parameter-format.md) | CCI parameter format rules and examples |

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 176)May include surrounding context.

md
| Create/query/update/delete/scale Deployment | [references/task-deployment-management.md](references/task-deployment-management.md) |

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 480)May include surrounding context.

md
| [task-deployment-management.md](references/task-deployment-management.md) | Deployment lifecycle operations |

Memory Manipulation

High
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Content

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

md
| Create/query/delete Namespace | [references/task-namespace-management.md](references/task-namespace-management.md) |
| Create/query/delete Network | [references/task-network-management.md](references/task-network-management.md) |
| Create/query/update/delete/scale Deployment | [references/task-deployment-management.md](references/task-deployment-management.md) |
| Create/query/update/delete StatefulSet | [references/task-statefulset-management.md](references/task-statefulset-management.md) |
| Create/query/delete Pod | [references/task-pod-management.md](references/task-pod-management.md) |
| Create/query/delete EIPPool | [references/task-eippool-management.md](references/task-eippool-management.md) |
| Query status, view logs, events | [references/task-logs-and-status.md](references/task-logs-and-status.md) |

Memory Manipulation

High
Category
Memory Poisoning
Confidence
85% confidence
Finding

Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Content

Scanner excerpt · references/cci-operation-catalog.md (reported line 52)May include surrounding context.

md
| `readAppsV1NamespacedStatefulSet` | Read StatefulSet |
| `readAppsV1NamespacedStatefulSetStatus` | Read StatefulSet status |
| `patchAppsV1NamespacedStatefulSet` | Update StatefulSet |
| `replaceAppsV1NamespacedStatefulSet` | Replace StatefulSet |
| `deleteAppsV1NamespacedStatefulSet` | Delete StatefulSet |
| `deleteAppsV1CollectionNamespacedStatefulSet` | Delete all StatefulSets in namespace |

The full-cleanup workflow does not require the two-step confirmation promised for every destructive operation.

High
Category
Excessive Agency
Confidence
90% confidence
Finding

The standalone cleanup workflow supplies bulk workload deletion and cascading Namespace deletion commands without explicit approval gates for those steps; only Network deletion mentions two-step confirmation. An agent following this sequence mechanically could terminate unrelated workloads or destroy persistent resources, and an existence pre-check does not establish user authorization.

Content

No source excerpt is available for this finding.

YARA rule 'agent_skill_mcp_tool_poisoning_metadata': MCP/tool metadata poisoning indicators in tool schemas or skill manifests [agent_skills]

High
Category
YARA Match
Confidence
80% confidence
Finding

YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).

Content

Scanner excerpt · scripts/cci_network_helper.py (reported line 10)May include surrounding context.

python
#!/usr/bin/env python3
"""
CCI Network Creation Helper Script

This script creates a CCI Network by directly calling the CCI OpenAPI,
bypassing hcloud CLI's limitation with annotation keys containing dots.

hcloud CLI treats dots in annotation keys as nested object delimiters,
making it impossible to pass 'network.alpha.kubernetes.io/default-security-group'
via CLI parameters or --cli-jsonInput (which also doesn't properly transmit
annotations in actual API requests, despite showing them in --dryrun).

Usage:
    python cci_network_helper.py create \
        --namespace <ns-name> \
        --name <network-name> \
        --vpc-id <vpc-id> \
        --subnet-id <neutron-subnet-id> \
        --network-id <neutron-network-id> \
        --security-group-id <sg-id> \
        --region <region>
        [--project-id <project-id>]

    python cci_network_helper.py delete \
        --namespace <ns-name> \
        --name <network-name> \
        --region <region>

Network deletion executes immediately without the manifest's promised two-step confirmation.

High
Category
Excessive Agency
Confidence
98% confidence
Finding

The delete command immediately issues an authenticated DELETE without checking confirmation, despite the skill's stated two-step confirmation requirement for destructive operations. In an agent-operated cloud-management context, a mistaken target or invocation can therefore delete a network without a locally enforced approval gate; an external confirmation workflow could mitigate this, but none is shown in the supplied file.

Content

No source excerpt is available for this finding.

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, network, shell.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

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

md
### Credential Security

- **Never expose AK/SK/SecurityToken values** in conversation, commands, or output
- **Never ask user to input AK/SK/SecurityToken directly** in conversation
- **Only use** `hcloud configure list` to check credential status (presence only, not values)
- **Prefer** profile mode or environment variables over explicit AK/SK parameters