T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/huawei_cloud/dispatcher.py:1443- Finding
Read-Only Event Skill Exposes Destructive Cloud and Kubernetes Operations
- Content
View full analysis
Optional[Dict[str, Any]]: """Attempt modular dispatch first and fall back to legacy dispatch when needed.""" try: script_dir = os.path.dirname(os.path.abspath(__file__)) if script_dir not in sys.path: sys.path.insert(0, script_dir) from huawei_cloud.dispatcher import dispatch_action, is_registered_action except Exception as exc: return { "success": False, "error": "Modular dispatcher unavailable", "error_type": type(exc).__name__, } if not is_registered_action(action): return None return dispatch_action(action, params) ``` The same dispatcher registers destructive and unrelated actions: ```python ACTION_SPECS: Dict[str, tuple[tuple[str, ...], Handler]] = { "huawei_list_ecs": (("region",), _list_ecs), "huawei_get_ecs_metrics": (("region", "instance_id"), _get_ecs_metrics), "huawei_list_flavors": (("region",), _list_flavors), "huawei_stop_ecs_instance": (("region", "instance_id"), _stop_ecs_instance_action), "huawei_start_ecs_instance": (("region", "instance_id"), _start_ecs_instance_action), "huawei_list_cce_clusters": (("region",), _list_cce_clusters), "huawei_create_cce_cluster": ( ("region", "cluster_name", "vpc_id", "subnet_id"), _create_cce_cluster ), "huawei_delete_cce_cluster": ( ("region", "cluster_id"), _delete_cce_cluster ), "huawei_delete_cce_node": ( ("region", "clust ...[truncated 4102 chars]- Remediation
View remediation
