Back to skill

Security audit

仙宫云GPU管家

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed Xiangongyun cloud-management client, but it can perform destructive and billing-related actions while handling credentials in ways users should review carefully.

Install only if you intend to let an agent manage real Xiangongyun cloud resources. Use a least-privilege token if available, keep the token outside shared or version-controlled directories, verify the API base URL before use, avoid passing passwords or private keys on the command line, and require manual confirmation before any destroy, shutdown-destroy, save-and-destroy, GPU-release, deployment, or recharge-order action.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/xiangongyun_api.py:41
Finding

Unvalidated API Endpoint Can Receive Bearer Tokens and Deployment Credentials

Content
View full analysis
Dict[str, Any]: """发送 HTTP 请求""" url = f"{BASE_URL}{endpoint}" try: if method.upper() == "GET": response = requests.get( url, headers=self.headers, params=params, timeout=30 ) elif method.upper() == "POST": response = requests.post( url, headers=self.headers, json=data, timeout=30 ) ``` ```python # scripts/xiangongyun_api.py:138-141 if password: data["password"] = password return self._request("POST", "/open/instance/deploy", data=data) ``` ```yaml # config/config.yaml:4-7 api: base_url: "https://api.xiangongyun.com" # Replace the access_token below with the Xiangongyun API access token. access_token: "YOUR_ACCESS_TOKEN_HERE" ``` ### Technical Analysis The API destination is read directly from a mutable configuration file without validating its scheme, hostname, port, or origin. The same request logic attaches the bearer token to every request. Deployment requests can also carry a p ...[truncated 2239 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/xiangongyun_api.py:263
Finding

API Token, Password, and SSH Key Material Use Insecure Plaintext Input Channels

Content
View full analysis
str: """从 config.yaml 获取 API 令牌""" api_key = config.get("api", {}).get("access_token") if not api_key or api_key == "YOUR_ACCESS_TOKEN_HERE": raise ValueError( f"缺少仙宫云 API 令牌。请在 {CONFIG_FILE} 中配置有效的 access_token。" ) return api_key ``` ```python # scripts/xiangongyun_api.py:263-264 parser.add_argument("--ssh-key", help="SSH 密钥") parser.add_argument("--password", help="密码") ``` The documented invocation in `SKILL.md:34` directs users to provide these secrets as command-line values: ```bash python scripts/xiangongyun_api.py --action deploy_instance \ --name \ --gpu-count \ --image \ [--data-center ] \ [--ssh-key ] \ [--password ] ``` ### Technical Analysis The API token is expected to be placed directly in a project configuration file. Unless strict external permissions and repository exclusions are applied, that token can be exposed through source-control history, backups, artifact packaging, file sharing, or access by other local users. Passwords and SSH key material are accepted as command-line arguments. Command-line secrets can be retained in shell history, copied into terminal logs, captured by process-monitoring software, or exposed through process metadata to users with sufficient local visibility. This handling exceeds the minimum exposure necessary to submit deplo ...[truncated 1415 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/xiangongyun_api.py:355
Finding

Sensitive API Response Fields Are Printed Without Redaction

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (12)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill declares broad API-driven capabilities and references a Python script using network access, but it does not define any explicit tool scope such as allowed-tools or permissions. In an agent environment, this increases the chance the skill can be invoked with broader-than-necessary file or network access, making unintended outbound requests or local file reads more likely if the skill is misrouted or abused.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger condition is very broad: any user wanting to manage instances, images, or account operations may activate the skill. Because the skill supports destructive and billing-related actions, an overly permissive invocation description makes accidental or ambiguous activation more likely, especially in multi-skill agent routing where a casual infrastructure-related request could result in high-impact operations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documentation exposes destructive operations like destroying instances/images, releasing GPUs, and creating recharge orders, but does not require confirmation, preview, or user warning. In this context, that is more dangerous because the skill is designed for real cloud resource and payment management, so mistaken invocation could cause irreversible data loss, service disruption, or unauthorized charges.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The destroy-instance endpoint is documented as a routine operation without an explicit warning that it may irreversibly delete the instance and any unsaved data. In an agent skill context, this increases the chance that an LLM or user will invoke a destructive action without informed confirmation, leading to accidental data loss and service disruption.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The shutdown-and-destroy operation combines power-off and deletion but does not clearly state that the deletion is irreversible or that local instance state may be lost. For an autonomous or semi-autonomous agent, this ambiguity makes accidental destructive execution more likely.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Although the endpoint name implies saving an image before destruction, the documentation does not explicitly warn that the instance will still be destroyed after the save completes. Users or agents may focus on the backup aspect and miss the destructive consequence, causing unintended deletion of running resources.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The private-image destroy endpoint lacks a clear statement that image deletion is permanent and may remove a recovery or deployment artifact needed later. In this skill, deleting images can impair recovery, redeployment, or reproducibility of GPU workloads.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/xiangongyun_api.py (reported line 77)May include surrounding context.

python
if method.upper() == "GET":
                response = requests.get(url, headers=self.headers, params=params, timeout=30)
            elif method.upper() == "POST":
                response = requests.post(url, headers=self.headers, json=data, timeout=30)
            else:
                raise ValueError(f"不支持的 HTTP 方法:{method}")

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

deploy_instance includes ssh_key and password fields in the request body and transmits them to the remote API, but the script provides no user-facing warning that these sensitive values will be sent over the network. The code has generic docstrings, but no visible disclosure at the point of use or in the CLI help about handling credentials and secrets.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script exposes destructive operations such as destroy_instance and sends the API request immediately, but there is no confirmation prompt, warning print/log, or explicit caution in the CLI help for the irreversible effect. For a code file, destructive operations should include some form of user disclosure unless the warning is already clearly surfaced elsewhere in the skill documentation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The file’s natural-language comments are entirely in Chinese, including the instruction for replacing the access token. For a general configuration file, this imposes a specific language without offering user opt-in or documenting that the skill is intentionally region- or locale-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The file presents all natural-language documentation in Chinese and does not indicate that the user can choose another language or that the documentation is intentionally limited to a Chinese-speaking context. Per SQP-3, forcing a specific language without user opt-in can be a natural-language policy concern unless the locale restriction is clearly documented and justified.

Content

No source excerpt is available for this finding.