T09 · Insecure Skill Coding Practices
- Location
SKILL.md:55- Finding
TLS Certificate Verification Disabled for Authenticated API Requests
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This Crafty Controller admin skill is coherent, but it needs review because its examples disable TLS checks while using powerful API keys and destructive controls.
Install only if you are comfortable reviewing and tightening the examples first: enable certificate verification or a trusted CA bundle, use a dedicated least-privilege API key, keep the key out of shared source, and require explicit confirmation before destructive or account-changing actions.
SKILL.md:55TLS Certificate Verification Disabled for Authenticated API Requests
SKILL.md:46Unpinned Third-Party Dependency Installation
The documentation prominently exposes destructive capabilities such as kill, delete, backup restore, file delete, and command execution without requiring confirmation or warning about irreversible effects. In an agent setting, this creates a real risk of accidental service disruption, data loss, or harmful command execution if the skill is used directly from user prompts.
The skill's trigger description is broad enough to match generic server-management or Minecraft administration requests, which can cause the agent to invoke this skill in contexts the user did not explicitly intend. Because the skill contains powerful server, file, backup, and user-management operations, unintended invocation raises the chance of accidental destructive or privilege-impacting actions.
User and role administration are high-sensitivity actions that can lock out administrators, create backdoor accounts, or grant excessive privileges, yet the documentation lacks warnings or confirmation guidance. In this skill context, those actions are especially dangerous because the API key may already belong to a privileged account, making changes immediately effective across the panel.
Using verify=False disables TLS certificate validation, allowing man-in-the-middle interception or impersonation of the Crafty Controller endpoint. Because the requests include a bearer API key and may carry administrative commands, file contents, and user-management actions, a network attacker could steal credentials or alter traffic to perform unauthorized operations.
def crafty_get(path, params=None):
"""GET request to Crafty API."""
url = f"{CRAFTY_BASE_URL}{path}"
resp = requests.get(url, headers=HEADERS, params=params, verify=False)
resp.raise_for_status()
return resp.json()
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
def crafty_post(path, payload=None):
"""POST request to Crafty API."""
url = f"{CRAFTY_BASE_URL}{path}"
resp = requests.post(url, headers=HEADERS, json=payload or {}, verify=False)
resp.raise_for_status()
return resp.json()
This POST helper disables TLS verification for all write and action requests, which is especially dangerous because it covers state-changing operations such as server control, file writes, user creation, and permission changes. An active attacker could tamper with requests or capture the bearer token and then issue arbitrary privileged API calls.
def crafty_post(path, payload=None):
"""POST request to Crafty API."""
url = f"{CRAFTY_BASE_URL}{path}"
resp = requests.post(url, headers=HEADERS, json=payload or {}, verify=False)
resp.raise_for_status()
return resp.json()
PATCH requests are used for updating sensitive configuration, user, role, backup, and schedule data, yet TLS verification is disabled. This creates the same interception and tampering risk as other helpers, with the added possibility of silently modifying administrative state in transit.
def crafty_patch(path, payload=None):
"""PATCH request to Crafty API."""
url = f"{CRAFTY_BASE_URL}{path}"
resp = requests.patch(url, headers=HEADERS, json=payload or {}, verify=False)
resp.raise_for_status()
return resp.json()
DELETE-capable helpers with verify=False allow destructive requests to be intercepted or redirected by a man-in-the-middle attacker. In this context that could lead to unauthorized deletion of servers, users, roles, or backup data, while also exposing the API token.
def crafty_delete(path): """DELETE request to Crafty API.""" url = f"{CRAFTY_BASE_URL}{path}" resp = requests.delete(url, headers=HEADERS, verify=False) resp.raise_for_status() return resp.json()
The file upload path disables TLS verification while transmitting bearer authentication and arbitrary file contents. That combination enables credential theft, upload tampering, or server compromise if malicious files are substituted during transit.
data = {"path": upload_dir} # Note: don't pass Content-Type header for multipart auth_headers = {"Authorization": f"Bearer {CRAFTY_API_KEY}"} resp = requests.post(url, headers=auth_headers, files=files, data=data, verify=False) resp.raise_for_status() return resp.json()
The notes section reinforces insecure transport as an accepted default by telling users the helpers pass verify=False and only suggesting secure verification for production later. This guidance increases the likelihood that insecure settings persist in real deployments, normalizing exposure of privileged API traffic.
## Notes
- **SSL:** Crafty uses a self-signed certificate by default. The helpers above pass `verify=False`. In production, provide your real cert path: `verify="/path/to/cert.pem"`.
- **API version:** This skill targets Crafty Controller **v4** (`/api/v2` routes). Crafty 3 uses a different API.
- **Permissions:** Your API key inherits the permissions of the user it belongs to. For full access, generate the key from a superuser account.
- **Rate limiting:** Crafty does not enforce rate limiting by default, but avoid hammering the stats endpoint — poll at most once per 5 seconds.
The guidance explicitly recommends generating API keys from a superuser account for full access, normalizing excessive privilege as the default operational model. If that key is leaked, misused, or the skill is invoked unexpectedly, an attacker or mistaken workflow gains complete control over servers, files, users, roles, and backups.
- **SSL:** Crafty uses a self-signed certificate by default. The helpers above pass `verify=False`. In production, provide your real cert path: `verify="/path/to/cert.pem"`.
- **API version:** This skill targets Crafty Controller **v4** (`/api/v2` routes). Crafty 3 uses a different API.
- **Permissions:** Your API key inherits the permissions of the user it belongs to. For full access, generate the key from a superuser account.
- **Rate limiting:** Crafty does not enforce rate limiting by default, but avoid hammering the stats endpoint — poll at most once per 5 seconds.