T09 · Insecure Skill Coding Practices
- Location
SKILL.md:113- Finding
Insecure plaintext handling of a Home Assistant bearer token and unvalidated endpoint
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 113–124
Vulnerability Type: Plaintext sensitive credential handling and insufficient endpoint validation
Risk Level: MediumVulnerable Code
powershell $config = Get-Content ".homeassistant-config.json" | ConvertFrom-Json $token = $config.token $url = $config.urlTechnical Analysis
The Skill instructs the Agent to load a Home Assistant API token directly from a plaintext JSON file. It also loads the destination URL from the same configuration without requiring HTTPS, validating the server identity, restricting the URL to an approved Home Assistant host, or defining appropriate file permissions.
Access to a Home Assistant token is relevant to controlling Hue lights, but plaintext storage and an unrestricted endpoint exceed the minimum safe implementation requirements. If the configuration file is readable or modifiable by another local user or process, the token may be stolen or the destination may be replaced with an attacker-controlled endpoint.
The actual
game-tracker.ps1implementation is absent from the project. Therefore, this audit cannot confirm that the token is transmitted, logged, or otherwise exposed by the referenced script. The confirmed issue is the insecure credential-management design prescribed by the Skill documentation.Attack Path
- An attacker or compromised local process obtains read or write access to
.homeassistant-config.json. - For credential theft through local access, the attacker reads the plaintext
tokenvalue directly. - Alternatively, the attacker changes the configured
urlto an endpoint under their control. - The user starts the tracker according to the documented workflow.
- If the absent tracker script authenticates to the configured URL without validating it, the Home Assistant bearer token may be sent to the attacker-controlled endpoint.
- The attacker reuses the token against ...[truncated 577 chars]
- An attacker or compromised local process obtains read or write access to
- Remediation
View remediation
Remediation Suggestions
- Store the token in an operating-system credential manager or another dedicated secret store rather than a plaintext project file.
- If a configuration file remains necessary, exclude it from version control and restrict its filesystem permissions to the owning user.
- Separate non-sensitive endpoint configuration from secret material.
- Require HTTPS for non-loopback connections and preserve certificate validation.
- Validate the configured URL against an explicit allowlist of approved Home Assistant hosts and ports.
- Use a dedicated, least-privileged Home Assistant account or token limited to the required light entities and service calls.
- Ensure the tracker never prints the token in logs, command lines, errors, or status messages.
- Document token rotation and revocation procedures.
