Back to skill

Security audit

Spotify Skill

Security checks for vulnerabilities and agentic risk

Overview

This Spotify skill does what it claims, but it asks for broad account powers and stores reusable Spotify tokens in a local config file without strong protection.

Review this before installing if you are not comfortable granting a local skill broad Spotify account access. Use a dedicated Spotify app credential, keep config.json private and out of version control, restrict its file permissions manually, and be careful with agent requests that could edit playlists, save tracks, transfer playback, or remove playlist items.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (2)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/auth.py:14
Finding

Unused Spotify Follow Permissions Violate Least Privilege

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/auth.py:45
Finding

OAuth Credentials and Reusable Tokens Are Stored Without Permission Hardening

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (7)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/auth.py (reported line 159)May include surrounding context.

python
print()
        print("  auth          Print auth URL, prompt for code")
        print("  auth <code>   Exchange an authorization code directly")
        print("  refresh       Refresh the access token")

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill advertises capabilities that involve environment variables, file writes, and network access, but it does not declare an explicit tool/permission scope. That creates a least-privilege gap: an agent or platform may invoke the skill without clear user-visible boundaries, increasing the chance of unintended access to secrets in env, modification of local files such as config.json, or outbound API activity.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger list includes broad phrases such as 'play music' and 'playlist', which can cause the Spotify skill to activate on ambiguous requests that are not clearly asking to use Spotify. In an agent setting, this can lead to unintended playback changes, playlist modifications, or exposure of listening/profile data when a different action was intended.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script persists sensitive OAuth material, including access tokens, refresh tokens, and potentially client secrets loaded from the same config file, to ../config.json without any protection, permission hardening, or user warning. If that file is readable by other local users, accidentally committed, backed up insecurely, or exposed by another component, an attacker could reuse the tokens to control the victim's Spotify account and access profile/playback data.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/spotify.py (reported line 15)May include surrounding context.

python
sys.path.insert(0, SCRIPT_DIR)
from auth import get_valid_token

BASE = "https://api.spotify.com/v1"


def api(method, path, data=None, params=None):

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The CLI exposes state-changing operations such as saving tracks, creating/editing playlists, and removing playlist items without any confirmation, dry-run mode, or guardrail at the command layer. In an agent-skill context, this increases the chance that a mistaken parse, prompt injection from surrounding workflow, or ambiguous user request will directly modify or delete user Spotify data.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The function always sends market="US" when requesting artist top tracks, which forces a specific locale-dependent result set. There is no opt-in, configuration option, or explanation that this skill is intentionally US-specific, so this is a natural-language/policy-style locale constraint issue.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.install_untrusted_source

Install source points to URL shortener or raw IP.

Warn
Code
suspicious.install_untrusted_source
Location
config.example.json:4