Back to skill

Security audit

Pve Automation

Security checks for vulnerabilities and agentic risk

Overview

This Proxmox automation skill is not malicious, but it needs Review because it handles privileged infrastructure credentials with unsafe TLS defaults and documents broad destructive admin operations.

Install only if you are comfortable letting an agent assist with privileged Proxmox administration. Use a least-privilege non-root API token, avoid passing secrets on the command line, enable proper TLS certificate verification before real use, and require explicit human confirmation for deletes, rollbacks, storage/IAM changes, upgrades, and other disruptive actions.

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

Error
Location
scripts/pve_client.py:55
Finding
TLS Certificate Verification Is Disabled for Authenticated API Requests<![CDATA[ ## Vulnerability Details **File Location**: `scripts/pve_client.py:32`, `scripts/pve_client.py:55-64`; additional insecure examples at `SKILL.md:77-86` and `SKILL.md:755-772` **Vulnerability Type**: Improper certificate validation **Risk Level**: High ### Vulnerable Code ```python urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) ``` ```python def request(self, method, endpoint, **kwargs): """Make an API request""" url = f"{self.base_url}/{endpoint}" response = requests.request( method, url, headers=self.headers, verify=False, **kwargs ) if response.status_code >= 400: ``` The Skill documentation also recommends commands that disable certificate validation: ```bash # 1. Get ticket and CSRF token curl -k -d 'username=root@pam' --data-urlencode 'password=secret' \ https://pve.example.com:8006/api2/json/access/ticket # Response: { "data": { "ticket": "...", "CSRFPreventionToken": "..." } } # 2. Use ticket in subsequent requests curl -k -b "PVEAuthCookie=<ticket>" \ -H "CSRFPreventionToken: <csrf_token>" \ https://pve.example.com:8006/api2/json/nodes ``` ### Technical Analysis The client uses HTTPS but explicitly passes `verify=False` to every request. This prevents `requests` from validating whether the server certificate is trusted and whether it belongs to the requested host. Suppression of `InsecureRequestWarning` further conceals this unsafe state from operators. Every request includes the PVE API token in the `Authorization` header: ```python self.headers = { 'Authorization': f'PVEAPIToken={self.user}!{self.token_id}={self.token_secret}' } ``` Consequently, an attacker who can intercept or redirect network traffic can present an arbitrary TLS certificate. The client will accept the certificate and send its authentication token to the attacker-controlled endpoint. The documented `curl -k` ticket-authentication workflow creates the same exposure for usernames, ...[truncated 2028 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove `verify=False` and rely on certificate validation by default: ```python response = requests.request( method, url, headers=self.headers, timeout=30, **kwargs ) ``` 2. Support a configurable CA bundle for self-signed or privately issued PVE certificates: ```python def __init__(self, host=None, user=None, token_id=None, token_secret=None, ca_bundle=None): # Existing initialization omitted self.ca_bundle = ca_bundle or os.environ.get("PVE_CA_BUNDLE", True) def request(self, method, endpoint, **kwargs): url = f"{self.base_url}/{endpoint}" return requests.request( method, url, headers=self.headers, verify=self.ca_bundle, timeout=30, **kwargs ) ``` 3. Distribute the PVE server certificate or private CA certificate through a trusted administrative channel and configure `requests` to use it. 4. Remove global suppression of `InsecureRequestWarning`. 5. Remove `curl -k` from documentation. Use normal certificate verification or `--cacert /trusted/path/pve-ca.pem`. 6. If an insecure development mode must exist, make it an explicit opt-in flag, reject it by default, and emit a prominent warning. Do not recommend it for production or credential-bearing requests. 7. Rotate any API tokens or passwords that may previously have traversed untrusted networks with verification disabled. 8. Continue applying least-privilege ACLs so compromise of one token does not grant cluster-wide administration. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/pve_client.py:234
Finding
API Token Secret Can Be Exposed Through Command-Line Arguments<![CDATA[ ## Vulnerability Details **File Location**: `scripts/pve_client.py:234-238`, `scripts/pve_client.py:286-291`; documented usage at `README.md:136-139` **Vulnerability Type**: Sensitive credential exposure through process arguments **Risk Level**: Medium ### Vulnerable Code ```python # Global options parser.add_argument('--host', help='PVE host') parser.add_argument('--user', default='root@pam', help='PVE user') parser.add_argument('--token-id', help='API token ID') parser.add_argument('--token-secret', help='API token secret') ``` ```python client = PVEClient( host=args.host, user=args.user, token_id=args.token_id, token_secret=args.token_secret ) ``` The README explicitly recommends supplying the secret through the command line: ```bash python scripts/pve_client.py --host 192.168.1.10 --user root@pam --token-id automation --token-secret 'xxx' list-nodes ``` ### Technical Analysis Command-line arguments are not an appropriate channel for long-lived authentication secrets. Depending on operating-system configuration and execution context, arguments may be exposed through: - Process inspection tools and process metadata. - Shell history files. - Terminal session recording. - Audit frameworks and endpoint monitoring agents. - CI/CD logs and job metadata. - Diagnostic reports, command tracing, or copied support output. Quoting the secret only affects shell parsing; it does not prevent the secret from appearing in the executed process argument vector or shell history. The code already supports the `PVE_SECRET` environment variable, which avoids direct process-argument exposure but can still be inherited by child processes or captured by poorly configured diagnostics. A protected secret file, keyring, secret manager, or hidden prompt is preferable. ### Attack Path 1. An operator follows the documented example and supplies a real API token through `--token-secret`. 2. The complete command is saved in shell history, captured by proce ...[truncated 1190 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the `--token-secret` command-line option and its example from the README. 2. For interactive use, obtain the secret without terminal echo: ```python import getpass token_secret = os.environ.get("PVE_SECRET") if not token_secret: token_secret = getpass.getpass("PVE API token secret: ") ``` 3. For automation, support a permission-restricted secret file or file descriptor: ```python parser.add_argument( "--token-secret-file", help="Path to a file containing the PVE API token secret" ) if args.token_secret_file: with open(args.token_secret_file, "r", encoding="utf-8") as secret_file: token_secret = secret_file.read().strip() ``` Require restrictive file permissions and reject files accessible to unintended users where practical. 4. Prefer an operating-system keyring, container secret mount, or managed secrets service for production automation. 5. If environment variables remain supported, document their inheritance and diagnostic exposure risks and avoid printing the environment. 6. Redact token values from errors, logs, telemetry, and diagnostic output. 7. Apply least-privilege PVE roles to every API token rather than relying on broad `root@pam` administration. 8. Rotate tokens that have previously been placed in shell history, CI logs, or shared command transcripts, and remove retained copies where possible. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (30)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
The skill claims broad Proxmox automation coverage, but the concrete implementation/examples only partially cover that scope while the documentation expands into many sensitive admin actions. This mismatch increases the chance of over-trust by an agent or operator, who may authorize the skill for broad infrastructure control based on an inaccurate description.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
Authorization: PVEAPIToken=USER@REALM!TOKENID=UUID

# Example
curl -H 'Authorization: PVEAPIToken=root@pam!automation=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee' \
  https://pve.example.com:8006/api2/json/nodes
```
Confidence
86% confidence
Finding
The example uses a root-scoped API token in a header, normalizing direct use of highly privileged credentials for automation. If copied into real deployments, this encourages excessive privilege and increases the impact of token leakage or misuse to full cluster compromise.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
POST /nodes/{node}/qemu/{vmid}/status/reset

# Delete VM
DELETE /nodes/{node}/qemu/{vmid}
```

### LXC Container Operations
Confidence
94% confidence
Finding
The documented DELETE VM endpoint is inherently destructive and can cause irreversible service interruption and data loss if triggered without strong safeguards. In an agent skill, exposing deletion primitives without mandatory confirmation and authorization checks makes accidental or unauthorized destruction more likely.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
POST /nodes/{node}/lxc/{vmid}/status/stop

# Delete container
DELETE /nodes/{node}/lxc/{vmid}
```

### VM/Container Creation
Confidence
94% confidence
Finding
The container deletion endpoint can irreversibly remove workloads and data. Given this skill's automation framing, inclusion of direct deletion commands without prominent safeguards increases the risk of accidental or unauthorized destructive actions.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
POST /nodes/{node}/qemu/{vmid}/snapshot/{snapname}/rollback

# Delete snapshot
DELETE /nodes/{node}/qemu/{vmid}/snapshot/{snapname}

# Create backup
POST /nodes/{node}/vzdump
Confidence
91% confidence
Finding
Snapshot deletion removes recovery points and can hinder incident recovery or rollback after failed changes. In automation, exposing this operation without clear warnings and confirmation can silently reduce resilience and increase outage impact.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
- nofailback: 1 = stay on current node after recovery

# Delete HA group
DELETE /cluster/ha/groups/{group}
```

**HA Resources (VMs to protect):**
Confidence
89% confidence
Finding
Deleting HA groups can remove failover constraints and protection policies for production workloads, increasing availability risk across the cluster. In this context, that is a sensitive operational control that should not be casually exposed in a general VM automation skill.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
- max_relocate: Max relocate attempts (default: 1)

# Remove from HA
DELETE /cluster/ha/resources/{sid}
```

**HA Status and Control:**
Confidence
90% confidence
Finding
Removing HA-managed resources disables automated recovery for protected VMs/containers. This can directly reduce resilience and lead to prolonged downtime during node failures, making it a high-impact administrative action.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
GET /nodes/{node}/storage/{storage}/content/{backup-file}

# Delete backup
DELETE /nodes/{node}/storage/{storage}/content/{backup-file}
```

### 5. Scheduled Jobs
Confidence
93% confidence
Finding
Deleting backup artifacts is destructive and can permanently remove the ability to restore systems after compromise, corruption, or operator error. In infrastructure automation, exposing backup deletion without strict controls materially increases recovery risk.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
PUT /cluster/jobs/{id}

# Delete job
DELETE /cluster/jobs/{id}

# Get job execution log
GET /cluster/jobs/{id}/log
Confidence
86% confidence
Finding
Deleting scheduled jobs can silently disable backups or other recurring operational tasks, causing latent security and reliability issues. The danger is amplified because the impact may not be noticed until a recovery or maintenance event fails.

Context-Inappropriate Capability

High
Confidence
98% confidence
Finding
User, group, role, ACL, and pool administration are identity and authorization controls, not routine VM/container automation. If used improperly, these capabilities can create privileged accounts, alter access control, or remove protections across the cluster, leading to full administrative compromise.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
PUT /access/users/{userid}

# Delete user
DELETE /access/users/{userid}
```

**Groups:**
Confidence
97% confidence
Finding
Deleting users is an identity-management action with broad security implications, including denial of access, disruption of automation, and tampering with audit/accountability structures. In a skill not scoped to IAM administration, this materially expands abuse potential and blast radius.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
- comment: Description

# Delete group
DELETE /access/groups/{groupid}
```

**Roles:**
Confidence
95% confidence
Finding
Deleting groups can implicitly alter access for multiple users and services at once, causing privilege changes or outages. Because group membership is often foundational to authorization design, this is a sensitive administrative action outside the core VM-management use case.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
path: "/pool/production", groups: "developers", roles: "PVEVMUser"

# Remove ACL
DELETE /access/acl?path={path}&users={userid}&roles={role}
```

**Pools:**
Confidence
97% confidence
Finding
Deleting ACLs can abruptly remove or alter access controls on clusters, pools, or VMs, potentially locking out operators or disabling security boundaries. Since ACLs govern authorization, exposing direct removal in a broad automation skill creates severe misuse potential.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
- members: Array of objects with type and id

# Delete pool
DELETE /pools/{poolid}
```

### 7. Notifications (Webhooks)
Confidence
87% confidence
Finding
Pool deletion can disrupt organizational grouping, delegated access models, and automation that depends on pool membership. While not always directly destructive to VM data, it can create operational confusion and authorization side effects.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
POST /nodes/{node}/replication/{id}/run_now

# Delete replication job
DELETE /nodes/{node}/replication/{id}
```

### 9. Firewall
Confidence
85% confidence
Finding
Deleting replication jobs can silently remove disaster-recovery protections, increasing exposure to node or storage failures. This is a sensitive reliability control that should be explicitly treated as high-trust in automation.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
PUT /storage/{storage}

# Delete storage
DELETE /storage/{storage}

# Get storage status
GET /nodes/{node}/storage/{storage}/status
Confidence
96% confidence
Finding
Deleting storage configuration can sever access to disks, backups, templates, or images and may cascade into outages or data inaccessibility across many workloads. In a general-purpose automation skill, this is one of the highest-blast-radius operations documented.

Context-Inappropriate Capability

High
Confidence
95% confidence
Finding
Certificate management, host subscription handling, apt update/upgrade, and node diagnostics are host-administration capabilities outside the stated scope. These actions can affect trust boundaries, service availability, and host integrity, especially when upgrades or proxy restarts are triggered remotely.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
This markdown file lists operations such as stop, reset, delete, rollback, and create actions, plus examples for creating and starting VMs, but does not warn that these actions can interrupt services, remove resources, or revert state. Under the markdown-specific warning criterion, behavior that can affect user data or system integrity should be accompanied by clear cautions.

Missing User Warnings

Medium
Confidence
83% confidence
Finding
The file instructs users to set `PVE_SECRET` and also shows passing `--token-secret` directly on the command line, but it does not warn that secrets in shell history, process listings, or shared terminals may be exposed. Because this markdown describes behavior affecting privacy and credentials, a warning is expected.

Unsafe Defaults

Medium
Category
Tool Misuse
Content
## Production Notes

- Current implementation uses `verify=False` (SSL verification disabled), suitable only for trusted internal environments
- For production, use valid certificates and enable SSL verification
- Apply least-privilege principles to API tokens; avoid over-privileged root tokens
Confidence
99% confidence
Finding
The README explicitly states the implementation uses `verify=False`, which disables TLS certificate verification and permits man-in-the-middle interception of API traffic. In a Proxmox automation skill handling privileged infrastructure operations and API credentials, this materially increases the risk of credential theft, command tampering, and unauthorized VM or cluster actions.

Lp3

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding
The skill documents network/API usage and includes code that can read environment-derived configuration, but the manifest does not declare any tool scope or permissions. This creates a governance gap where an agent may invoke network-capable behavior without explicit review, making unintended external access and misuse harder to constrain.

Vague Triggers

Medium
Confidence
97% confidence
Finding
The activation text uses broad trigger phrases like generic VM management and virtualization automation, which can cause the skill to be selected for loosely related requests. Because the skill also documents highly privileged and destructive PVE operations, over-broad activation increases the chance of inappropriate invocation in sensitive contexts.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The skill advertises destructive capabilities such as delete, rollback, and storage/user removal without upfront safety warnings in the main description. In infrastructure automation, omission of prominent destructive-operation warnings increases the risk of accidental data loss, outage, or irreversible administrative changes.

External Transmission

Medium
Category
Data Exfiltration
Content
Authorization: PVEAPIToken=USER@REALM!TOKENID=UUID

# Example
curl -H 'Authorization: PVEAPIToken=root@pam!automation=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee' \
  https://pve.example.com:8006/api2/json/nodes
```
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Unsafe Defaults

Medium
Category
Tool Misuse
Content
response = requests.request(
            method, url,
            headers=self.headers,
            verify=False,
            **kwargs
        )
        response.raise_for_status()
Confidence
99% confidence
Finding
The example Python client disables TLS certificate verification with verify=False and suppresses related warnings. This permits man-in-the-middle interception of API traffic, exposing highly privileged Proxmox credentials and enabling command tampering against infrastructure-management requests.

Static analysis

Detected: suspicious.exposed_secret_literal, suspicious.insecure_tls_verification

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
SKILL.md:61

HTTPS certificate verification is disabled.

Warn
Code
suspicious.insecure_tls_verification
Location
scripts/pve_client.py:60