T09 · Insecure Skill Coding Practices
- Location
scripts/ha.sh:20- Finding
Long-Lived Access Token Can Be Transmitted over Plaintext Connections
- Content
View full analysis
- Remediation
View remediation
&2 exit 1 ;; esac ``` 2. If plaintext HTTP must be supported for isolated development environments, require an explicit opt-in variable such as `HA_ALLOW_INSECURE_HTTP=1` and display a prominent warning. It should not be the documented default. 3. Replace the `http://` setup example in `SKILL.md` with an `https://` endpoint and explain that bearer credentials must not be sent over untrusted plaintext networks. 4. Replace `ws://` with `wss://` in `references/api.md` and state that WebSocket authentication tokens require TLS protection. 5. Preserve certificate verification. Do not add curl options such as `-k` or `--insecure`. For private Home Assistant deployments, document how to install or specify the appropriate trusted certificate authority instead. 6. Recommend creating a dedicated Home Assistant account with only the privileges required for the intended device operations. Avoid using a highly privileged administrator token where possible. 7. Protect the configuration file containing the token with restrictive permissions: ```bash chmod 600 ~/.config/home-assistant/config.json ``` 8. Revoke and replace any token that may previously have been transmitted over an untrusted plaintext connection. ]]>
