T09 · Insecure Skill Coding Practices
- Location
scripts/mactl.py:35- Finding
Long-Lived Music Assistant Bearer Token Transmitted Over Plaintext HTTP
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a coherent Music Assistant controller, but it needs review because it uses a long-lived bearer token over a user-configured endpoint documented as plaintext HTTP and encourages broad direct API calls.
Install only if you trust the Music Assistant server endpoint and can protect the token. Prefer HTTPS or a trusted local-only connection, use a dedicated low-scope token if Music Assistant supports it, revoke and rotate the token if it may have crossed an untrusted network, and be aware that direct API commands and queue/playback actions can immediately change the active listening session.
scripts/mactl.py:35Long-Lived Music Assistant Bearer Token Transmitted Over Plaintext HTTP
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
)
try:
with urlopen(req, timeout=10) as resp:
data = resp.read().decode()
if not data:
return None
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
Finding your token:
Finding your player ID:
The skill requires environment variables and performs networked control of a music server, but it does not declare an explicit tool/permission scope. That creates a governance gap: an agent may be allowed to invoke network and environment-backed actions without a clear least-privilege contract, increasing the chance of unintended external actions or secret exposure.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
For operations not covered by the CLI, use the JSON-RPC API directly:
curl -s "http://YOUR_SERVER:8095/api" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $MA_TOKEN" \
-d '{"message_id":"1","command":"player_queues/all"}'
The bearer token is sent in an Authorization header to whatever URL is configured in MA_URL, including plain http endpoints shown in the setup example. If used over unencrypted transport, anyone on the network path can intercept the token and gain control over the Music Assistant server and associated media actions.
The pause command claims to pause playback but actually calls the play/pause toggle endpoint. In an agent context, this can cause the opposite of the requested action and unexpectedly start playback, which is a control-integrity issue because user intent is not reliably enforced.
The manifest describes playback control, volume, queue management, library search, checking status, and player control. The sync command triggers music/sync, which initiates a backend library synchronization task rather than controlling playback or searching the library, expanding behavior beyond the described user-facing scope.
This markdown file documents actions like clearing the queue and changing playback state, which can alter the user's current listening session, but it does not include any warning that these commands are disruptive or irreversible in the moment. Under the markdown-file criteria, behaviors affecting user data or system state should be disclosed clearly.
No suspicious patterns detected.