Back to skill

Security audit

syself-autopilot-hetzner

Security checks for vulnerabilities and agentic risk

Overview

The skill matches its SySelf/Hetzner purpose, but its helper scripts can upload powerful cloud and SSH credentials or create infrastructure using whichever Kubernetes context is active.

Install only if you are comfortable reviewing and controlling the Kubernetes target yourself. Before running the helper scripts, set an explicit kubeconfig/context/namespace, verify the API server and organization namespace, avoid the default namespace unless intentional, and consider replacing the secret creation flow with a safer method that does not expose credentials in process arguments. Rotate Hetzner or SSH credentials if they may have been submitted to the wrong cluster.

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/02-create-management-secrets.sh:17
Finding

Sensitive Hetzner credentials are exposed through command-line arguments

Content
View full analysis
Creating or updating 'hetzner' secret..." kubectl create secret generic hetzner \ --from-literal=hcloud="$HCLOUD_TOKEN" \ --from-literal=robot-user="$HETZNER_ROBOT_USER" \ --from-literal=robot-password="$HETZNER_ROBOT_PASSWORD" \ --dry-run=client -o yaml | kubectl apply -f - ``` ### Technical Analysis The script expands the HCloud API token, Robot username, and Robot password directly into the argument list of the `kubectl` process. Although the resulting manifest is sent through standard output to another `kubectl` process, the original secret values are still present in the process arguments. Depending on operating-system process visibility and host security configuration, these values may be accessible through process inspection, audit or endpoint-monitoring systems, command tracing, debugging tools, or crash diagnostics. The use of `set -x` by a caller would create an additional disclosure risk. Creating Kubernetes Secrets is necessary for the Skill's declared SySelf Autopilot workflow. However, placing secret values in process arguments is not the minimum-exposure method required to implement that functionality. ### Attack Path 1. An operator exports `HCLOUD_TOKEN`, `HETZNER_ROBOT_USER`, and `HETZNER_ROBOT_PASSWORD`. 2. The operator runs `scripts/02-create-management-secrets.sh`. 3. The script expands those values into the `kubectl create secret` process arguments. 4. A local process observer, privileged user, monitoring agent, or audit collector records or reads the argument list while the command is running. 5. The observer extracts the HCloud token and Robot credentials. 6. The exposed credentials are used against the corresponding Hetzner services, subject to their assigned privileges. ### Impact Assessment Disclo ...[truncated 502 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/02-create-management-secrets.sh:5
Finding

Privileged Kubernetes writes use an unverified ambient cluster context

Content
View full analysis
Using context: $(kubectl config current-context 2>/dev/null || echo unknown)" : "${HCLOUD_TOKEN:?Must be set}" : "${HETZNER_ROBOT_USER:?Must be set}" : "${HETZNER_ROBOT_PASSWORD:?Must be set}" : "${SSH_KEY_NAME:?Must be set}" : "${HETZNER_SSH_PUB_PATH:?Must be set}" : "${HETZNER_SSH_PRIV_PATH:?Must be set}" [[ -f "$HETZNER_SSH_PUB_PATH" ]] || { echo "Missing public key: $HETZNER_SSH_PUB_PATH" >&2; exit 1; } [[ -f "$HETZNER_SSH_PRIV_PATH" ]] || { echo "Missing private key: $HETZNER_SSH_PRIV_PATH" >&2; exit 1; } echo "==> Creating or updating 'hetzner' secret..." kubectl create secret generic hetzner \ --from-literal=hcloud="$HCLOUD_TOKEN" \ --from-literal=robot-user="$HETZNER_ROBOT_USER" \ --from-literal=robot-password="$HETZNER_ROBOT_PASSWORD" \ --dry-run=client -o yaml | kubectl apply -f - echo "==> Creating or updating 'robot-ssh' secret..." kubectl create secret generic robot-ssh \ --from-literal=sshkey-name="$SSH_KEY_NAME" \ --from-file=ssh-privatekey="$HETZNER_SSH_PRIV_PATH" \ --from-file=ssh-publickey="$HETZNER_SSH_PUB_PATH" \ --dry-run=client -o yaml | kubectl apply -f - ``` `scripts/04-register-baremetal-hosts.sh`: ```bash echo "==> Using context: $(kubectl config current-context 2>/dev/null || echo unknown)" echo "==> Applying bare metal host manifests..." kubectl apply -f "$MANIFEST_PATH" echo "==> Current HetznerBareMetalHost objects:" kubectl get hetznerbaremetalhost ``` `scripts/05-apply-cluster.sh`: ```bash echo "==> Using context: $(kubectl config current-context 2>/dev/null || echo unknown)" echo "==> Applying ClusterStack objects..." kubectl apply -f "$S ...[truncated 3471 chars]
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (84)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/01-validate-access.sh (reported line 17)May include surrounding context.

sh
fi

if [[ ! -f "$KUBECONFIG_PATH" ]]; then
	echo "Kubeconfig file not found: $KUBECONFIG_PATH" >&2
	exit 1
fi

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

md
echo "Usage: $0 <workload-kubeconfig-path>" >&2
}

WORKLOAD_KUBECONFIG="${1:-${KUBECONFIG:-}}"

if [[ -z "$WORKLOAD_KUBECONFIG" ]]; then
	usage

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

md
echo "Usage: $0 <workload-kubeconfig-path>" >&2
}

WORKLOAD_KUBECONFIG="${1:-${KUBECONFIG:-}}"

if [[ -z "$WORKLOAD_KUBECONFIG" ]]; then
	usage

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

md
echo "Usage: $0 <workload-kubeconfig-path>" >&2
}

WORKLOAD_KUBECONFIG="${1:-${KUBECONFIG:-}}"

if [[ -z "$WORKLOAD_KUBECONFIG" ]]; then
	usage

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/01-validate-access.sh (reported line 9)May include surrounding context.

sh
echo "Usage: $0 <workload-kubeconfig-path>" >&2
}

WORKLOAD_KUBECONFIG="${1:-${KUBECONFIG:-}}"

if [[ -z "$WORKLOAD_KUBECONFIG" ]]; then
	usage

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/01-validate-access.sh (reported line 11)May include surrounding context.

sh
echo "Usage: $0 <workload-kubeconfig-path>" >&2
}

WORKLOAD_KUBECONFIG="${1:-${KUBECONFIG:-}}"

if [[ -z "$WORKLOAD_KUBECONFIG" ]]; then
	usage

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/01-validate-access.sh (reported line 16)May include surrounding context.

sh
echo "Usage: $0 <workload-kubeconfig-path>" >&2
}

WORKLOAD_KUBECONFIG="${1:-${KUBECONFIG:-}}"

if [[ -z "$WORKLOAD_KUBECONFIG" ]]; then
	usage

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/01-validate-access.sh (reported line 17)May include surrounding context.

sh
echo "Usage: $0 <workload-kubeconfig-path>" >&2
}

WORKLOAD_KUBECONFIG="${1:-${KUBECONFIG:-}}"

if [[ -z "$WORKLOAD_KUBECONFIG" ]]; then
	usage

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/01-validate-access.sh (reported line 33)May include surrounding context.

sh
echo "Usage: $0 <workload-kubeconfig-path>" >&2
}

WORKLOAD_KUBECONFIG="${1:-${KUBECONFIG:-}}"

if [[ -z "$WORKLOAD_KUBECONFIG" ]]; then
	usage

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/01-validate-access.sh (reported line 34)May include surrounding context.

sh
echo "Usage: $0 <workload-kubeconfig-path>" >&2
}

WORKLOAD_KUBECONFIG="${1:-${KUBECONFIG:-}}"

if [[ -z "$WORKLOAD_KUBECONFIG" ]]; then
	usage

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/03-prepare-management-kubeconfig.sh (reported line 10)May include surrounding context.

sh
echo "Usage: $0 <workload-kubeconfig-path>" >&2
}

WORKLOAD_KUBECONFIG="${1:-${KUBECONFIG:-}}"

if [[ -z "$WORKLOAD_KUBECONFIG" ]]; then
	usage

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/03-prepare-management-kubeconfig.sh (reported line 12)May include surrounding context.

sh
echo "Usage: $0 <workload-kubeconfig-path>" >&2
}

WORKLOAD_KUBECONFIG="${1:-${KUBECONFIG:-}}"

if [[ -z "$WORKLOAD_KUBECONFIG" ]]; then
	usage

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/03-prepare-management-kubeconfig.sh (reported line 14)May include surrounding context.

sh
echo "Usage: $0 <workload-kubeconfig-path>" >&2
}

WORKLOAD_KUBECONFIG="${1:-${KUBECONFIG:-}}"

if [[ -z "$WORKLOAD_KUBECONFIG" ]]; then
	usage

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/03-prepare-management-kubeconfig.sh (reported line 19)May include surrounding context.

sh
echo "Usage: $0 <workload-kubeconfig-path>" >&2
}

WORKLOAD_KUBECONFIG="${1:-${KUBECONFIG:-}}"

if [[ -z "$WORKLOAD_KUBECONFIG" ]]; then
	usage

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/03-prepare-management-kubeconfig.sh (reported line 20)May include surrounding context.

sh
echo "Usage: $0 <workload-kubeconfig-path>" >&2
}

WORKLOAD_KUBECONFIG="${1:-${KUBECONFIG:-}}"

if [[ -z "$WORKLOAD_KUBECONFIG" ]]; then
	usage

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/03-prepare-management-kubeconfig.sh (reported line 28)May include surrounding context.

sh
echo "Usage: $0 <workload-kubeconfig-path>" >&2
}

WORKLOAD_KUBECONFIG="${1:-${KUBECONFIG:-}}"

if [[ -z "$WORKLOAD_KUBECONFIG" ]]; then
	usage

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/03-prepare-management-kubeconfig.sh (reported line 29)May include surrounding context.

sh
echo "Usage: $0 <workload-kubeconfig-path>" >&2
}

WORKLOAD_KUBECONFIG="${1:-${KUBECONFIG:-}}"

if [[ -z "$WORKLOAD_KUBECONFIG" ]]; then
	usage

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/03-prepare-management-kubeconfig.sh (reported line 31)May include surrounding context.

sh
echo "Usage: $0 <workload-kubeconfig-path>" >&2
}

WORKLOAD_KUBECONFIG="${1:-${KUBECONFIG:-}}"

if [[ -z "$WORKLOAD_KUBECONFIG" ]]; then
	usage

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/03-prepare-management-kubeconfig.sh (reported line 61)May include surrounding context.

sh
echo "Usage: $0 <workload-kubeconfig-path>" >&2
}

WORKLOAD_KUBECONFIG="${1:-${KUBECONFIG:-}}"

if [[ -z "$WORKLOAD_KUBECONFIG" ]]; then
	usage

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/03-prepare-management-kubeconfig.sh (reported line 62)May include surrounding context.

sh
echo "Usage: $0 <workload-kubeconfig-path>" >&2
}

WORKLOAD_KUBECONFIG="${1:-${KUBECONFIG:-}}"

if [[ -z "$WORKLOAD_KUBECONFIG" ]]; then
	usage

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/06-verify-workload-access.sh (reported line 9)May include surrounding context.

sh
echo "Usage: $0 <workload-kubeconfig-path>" >&2
}

WORKLOAD_KUBECONFIG="${1:-${KUBECONFIG:-}}"

if [[ -z "$WORKLOAD_KUBECONFIG" ]]; then
	usage

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/06-verify-workload-access.sh (reported line 11)May include surrounding context.

sh
echo "Usage: $0 <workload-kubeconfig-path>" >&2
}

WORKLOAD_KUBECONFIG="${1:-${KUBECONFIG:-}}"

if [[ -z "$WORKLOAD_KUBECONFIG" ]]; then
	usage

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/06-verify-workload-access.sh (reported line 16)May include surrounding context.

sh
echo "Usage: $0 <workload-kubeconfig-path>" >&2
}

WORKLOAD_KUBECONFIG="${1:-${KUBECONFIG:-}}"

if [[ -z "$WORKLOAD_KUBECONFIG" ]]; then
	usage

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/06-verify-workload-access.sh (reported line 17)May include surrounding context.

sh
echo "Usage: $0 <workload-kubeconfig-path>" >&2
}

WORKLOAD_KUBECONFIG="${1:-${KUBECONFIG:-}}"

if [[ -z "$WORKLOAD_KUBECONFIG" ]]; then
	usage

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/06-verify-workload-access.sh (reported line 21)May include surrounding context.

sh
echo "Usage: $0 <workload-kubeconfig-path>" >&2
}

WORKLOAD_KUBECONFIG="${1:-${KUBECONFIG:-}}"

if [[ -z "$WORKLOAD_KUBECONFIG" ]]; then
	usage

Static analysis

No suspicious patterns detected.