T09 · Insecure Skill Coding Practices
- Location
scripts/truenas-ws.mjs:46- Finding
TrueNAS API key transmitted without server certificate verification by default
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill appears purpose-built for homelab administration, but it gives an agent broad, high-impact control with unsafe credential-transport defaults and weak confirmation boundaries.
Install only if you are comfortable giving an agent administrative access to your NAS and related homelab services. Use least-privilege API keys, prefer HTTPS with certificate validation enabled, avoid plaintext Dockge credentials, review every mutating command before it runs, and do not use the bulk stack update or recursive ACL examples without adapting them to your environment.
scripts/truenas-ws.mjs:46TrueNAS API key transmitted without server certificate verification by default
scripts/dockge-list.mjs:30Dockge username and password can be transmitted over plaintext WebSocket connections
references/app-installation.md:74Application dataset ACL template grants recursive modify access to everyone
references/downloads.md:37Service API keys are embedded in URL query strings
scripts/dockge-update.mjs:35Bulk Dockge updates restart all running stacks without confirmation or result validation
The documentation promotes a generic curl pattern with a user-controlled base URL and disabled TLS verification via -k. Combined with a bearer API key, this creates a strong risk of credential interception, SSRF-like misuse toward arbitrary internal hosts, and unsafe invocation against attacker-influenced endpoints.
curl -sk "$TRUENAS_URL/api/v2.0/[endpoint]" \
-H "Authorization: Bearer $TRUENAS_API_KEY"
Updating Dockge stacks will pull images and restart services, which can cause downtime, configuration drift, or deployment of unreviewed upstream changes. Omitting a clear warning and confirmation step is especially dangerous because the operation affects running workloads and potentially Internet-fetched artifacts.
The lockfile pins engine.io-client's nested ws dependency to 8.18.3, which is flagged for uninitialized memory disclosure and memory-exhaustion denial of service. Because this skill manages a NAS and uses real-time network communication, an exploitable WebSocket client bug could expose sensitive data in memory or let a malicious endpoint degrade availability of the automation handling storage and service operations.
socket.io-parser 4.2.5 is flagged for memory-exhaustion issues involving zero or unbounded binary attachments. In a TrueNAS management skill that may maintain long-lived API or event connections, a malicious or compromised server, proxy, or peer could trigger excessive memory consumption and disrupt monitoring or administrative workflows.
The top-level ws dependency is locked to 8.19.0 and is also flagged for memory disclosure and memory-exhaustion denial-of-service vulnerabilities. Given this skill's role in managing storage, snapshots, services, and container stacks, loss of availability or leakage from a network-facing component increases operational risk and could interrupt or expose sensitive homelab administration activity.
The finding identifies ws 8.19.0 as having advisories for uninitialized memory disclosure and memory exhaustion DoS. In a TrueNAS management skill that interacts with remote services over sockets/WebSockets, these flaws are more concerning because an attacker may be able to trigger resource exhaustion or extract unintended memory contents from a long-running automation component.
The README explicitly states that the skill can create, list, and delete ZFS datasets but provides no warning about destructive impact. In the context of a NAS-management skill, deletion operations can cause immediate and irreversible data loss, so presenting them without safety guidance increases the risk of accidental destructive use by users or autonomous agents.
The README claims capabilities for media requests, downloads, and broad monitoring that extend beyond the declared TrueNAS/Dockge/bookmark scope. In an agent skill, overstated scope can mislead operators and downstream agents into trusting or invoking integrations that are undocumented in the manifest, increasing the chance of unintended access to additional services or execution paths.
The skill declares access to sensitive environment variables but does not define an explicit tool or permission scope. That increases the chance an agent can invoke the skill more broadly than intended and use secrets without clear least-privilege boundaries.
The activation text is broad enough to match generic requests about storage, backups, containers, bookmarks, or homelab services. In an agent environment, overly broad routing increases the odds this skill is selected for requests involving unrelated systems, secrets, or destructive actions.
The skill expands from TrueNAS management into a wide set of unrelated homelab services, each with separate endpoints and API keys. This scope creep materially enlarges the attack surface and makes accidental or unauthorized operations against non-TrueNAS systems more likely.
Dataset creation is a state-changing administrative operation, but the guidance does not require explicit user confirmation or present consequences such as namespace changes, ACL implications, or quota/mount effects. In an autonomous agent context, missing confirmation controls can lead to unintended infrastructure changes.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
curl -sk -X POST "$TRUENAS_URL/api/v2.0/pool/dataset" \
-H "Authorization: Bearer $TRUENAS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "pool/path/new-dataset"}'
Snapshot creation changes the state of user storage and may affect retention, replication, and operational workflows. Without an explicit warning or confirmation requirement, an agent may perform storage-management actions the user did not intend.
The reference section operationalizes support for multiple broad homelab categories outside the manifest's core purpose. That mismatch can cause over-activation and lead the agent to handle unrelated services and credentials under a misleading TrueNAS label.
The common-task shortcut for taking a snapshot encourages direct execution of a state-changing operation without any gating. In a skill meant for agent use, shortcuts like this make accidental execution more likely than in ordinary documentation.
This guide contains authenticated, state-changing API calls that create datasets, alter ACLs, install applications, and modify existing app configuration, but it does not prominently warn that these actions change the NAS state and can affect availability, permissions, and storage layout. In an agent skill context, such examples can be copied or operationalized automatically, increasing the risk of unintended destructive or security-relevant changes.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
# Main app folder
curl -sk -X POST "$TRUENAS_URL/api/v2.0/pool/dataset" \
-H "Authorization: Bearer $TRUENAS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "apps/config/APP_NAME"}'
This API call changes filesystem ACLs and grants broad rights, including FULL_CONTROL and MODIFY entries affecting owner, group, everyone, and specific groups. In the TrueNAS context, incorrect ACL application can overexpose app data, weaken isolation between services, and create persistent privilege or data access issues across mounted datasets.
CRITICAL: Use user: "apps" and group: "apps" as STRINGS, not numeric uid/gid.
curl -sk -X POST "$TRUENAS_URL/api/v2.0/filesystem/setacl" \
-H "Authorization: Bearer $TRUENAS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
| jq '.[0] | {name, state, portals, volumes: .active_workloads.volumes}'
# Verify ACL
curl -sk -X POST "$TRUENAS_URL/api/v2.0/filesystem/getacl" \
-H "Authorization: Bearer $TRUENAS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"path": "/mnt/apps/config/APP_NAME"}' \
This API call updates an existing app's configuration through an authenticated management endpoint. Without strong warnings, validation, and confirmation, an agent or user could apply unsafe settings that alter networking, storage mappings, privileges, or app behavior, causing exposure or service disruption.
curl -sk -X PUT "$TRUENAS_URL/api/v2.0/app/id/APP_NAME" \
-H "Authorization: Bearer $TRUENAS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"values": {"section": {"option": "value"}}}'
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
# Verify auth
curl -s "$KARAKEEP_URL/api/v1/users/me" \
-H "Authorization: Bearer $KARAKEEP_API_KEY"
The document instructs the agent to trigger AI summarization and notes that AI tagging runs automatically on new bookmarks, but it does not warn that bookmark content, notes, URLs, and extracted page text may be processed by an AI subsystem. In a bookmark manager, this can expose sensitive user data to additional processing or external model providers without informed user consent, especially when notes or saved links contain private material.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
# Health check
curl -s "$AUDIOBOOKSHELF_URL/healthcheck"
# Verify auth
curl -s -X POST "$AUDIOBOOKSHELF_URL/api/authorize" \
This documentation materially expands the skill from TrueNAS administration into controlling external download clients and related services. That broader capability can let an agent manipulate torrent/usenet activity, add new downloads, and interact with systems not clearly covered by the declared scope, increasing the chance of unintended or unauthorized actions.
No suspicious patterns detected.