Back to skill

Security audit

Spotify Player

Security checks for vulnerabilities and agentic risk

Overview

The skill matches its Spotify-control purpose, but it should be reviewed because it stores Spotify session cookies locally and installs an unpinned external CLI that will use them.

Install only if you are comfortable giving the spogo CLI access to your Spotify session cookies. Prefer pinning spogo to a reviewed version instead of `@latest`, create the config and cookie files with restrictive permissions, avoid syncing or logging those cookie values, and revoke or refresh the Spotify session if the files may have been exposed.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:7
Finding
Mutable Unpinned Dependency Installed as an Executable<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 7 and 44 **Vulnerability Type**: Mutable third-party executable dependency **Risk Level**: Medium ### Vulnerable Code Line 7: ```yaml metadata: {"openclaw":{"emoji":"🎵","requires":{"anyBins":["spogo"]},"install":[{"id":"go","kind":"shell","command":"go install github.com/steipete/spogo/cmd/spogo@latest","bins":["spogo"],"label":"Install spogo (go)"}],"notes":"Cookies (sp_dc, sp_t) are stored locally in ~/.config/spogo/cookies/ and sent only to Spotify APIs. Browser automation fallback is optional and only used to start a playback session when no active device exists."}} ``` Line 44: ```bash go install github.com/steipete/spogo/cmd/spogo@latest ``` ### Technical Analysis The installation metadata and manual installation instructions both use the mutable Go version selector `@latest`. Consequently, the executable installed by the skill is not tied to the version that was reviewed during this audit. A future upstream release could introduce compromised, vulnerable, or simply incompatible code without requiring any modification to this repository. The source is a recognizable GitHub repository rather than an evident typosquat, but using a reputable source does not eliminate upstream-account compromise, malicious-release, or repository-takeover risks. Because the installed program receives access to Spotify authentication cookies, changes to the dependency have security significance. The repository contains no copy of the dependency source or checksum from which the installed executable can be independently verified. Claims that the program communicates only with Spotify therefore cannot be established from this project alone. ### Attack Path 1. An attacker compromises the upstream repository, its maintainer account, or its release process. 2. The attacker publishes a malicious version that becomes the version resolved by `@latest`. 3. A user or agent follows the skill installation ...[truncated 1050 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Replace `@latest` with a specifically reviewed semantic version: ```bash go install github.com/steipete/spogo/cmd/spogo@v0.2.0 ``` 2. For stronger immutability, document the reviewed upstream commit and ensure the selected release tag resolves to that commit. 3. Keep the metadata installer and manual installation instructions synchronized so neither path silently uses a mutable version. 4. Record the expected source revision and Go module checksums in the project documentation. 5. Establish an update process in which dependency upgrades are reviewed and tested before changing the pinned version. 6. If distributing prebuilt binaries, publish checksums or signed provenance and require users to verify them before execution. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:74
Finding
Spotify Authentication Cookies Stored Without Enforced Filesystem Permissions<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 74–108 **Vulnerability Type**: Insecure storage of plaintext authentication material **Risk Level**: Medium ### Vulnerable Code ```markdown Create `~/.config/spogo/config.toml`: ```toml default_profile = "default" [profile.default] cookie_path = "~/.config/spogo/cookies/default.json" market = "IL" language = "en" ``` ### 3. Create cookies file Create `~/.config/spogo/cookies/default.json`: ```json [ { "name": "sp_dc", "value": "USER_SP_DC_VALUE", "domain": ".spotify.com", "path": "/", "expires": "2027-01-01T00:00:00Z", "secure": true, "http_only": true }, { "name": "sp_t", "value": "USER_SP_T_VALUE", "domain": ".spotify.com", "path": "/", "expires": "2027-01-01T00:00:00Z", "secure": false, "http_only": false } ] ``` ``` ### Technical Analysis The skill instructs users to place Spotify authentication cookies directly into a plaintext JSON file. It does not instruct users or the installer to create the parent directories with restrictive permissions or set the cookie file to mode `0600`. The resulting permissions depend on how the file is created and on the user's active `umask`. In a permissively configured or multi-user environment, another local account or process may be able to read the cookie file. JSON fields such as `secure` and `http_only` describe browser-cookie behavior; they do not encrypt the file or impose operating-system access controls. The `sp_dc` value is explicitly described by the skill as the main authentication token. Its disclosure could allow an attacker to reuse the victim's authenticated Spotify session until the cookie expires or is invalidated. ### Attack Path 1. A user follows the documentation and creates `default.json` containing valid `sp_dc` and `sp_t` values. 2. The file is created under a permissive `umask`, inherited permissions, shared home-directory configuration, backup process, ...[truncated 1353 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Require private directory permissions before creating the files: ```bash install -d -m 700 "$HOME/.config/spogo/cookies" ``` 2. Create the cookie file with mode `0600`, or immediately enforce that mode: ```bash chmod 600 "$HOME/.config/spogo/cookies/default.json" chmod 600 "$HOME/.config/spogo/config.toml" ``` 3. Recommend a restrictive `umask` while creating secret-bearing files: ```bash umask 077 ``` 4. Prefer an operating-system credential store or secret-management facility over a long-lived plaintext JSON file where supported. 5. Avoid printing cookie values in terminal history, logs, command arguments, diagnostic output, or chat transcripts. 6. Document a rotation procedure: if exposure is suspected, invalidate the Spotify session, obtain fresh cookies, and securely replace the stored values. 7. Avoid synthetic long expiration dates unless required by the client; preserve the actual cookie expiration and minimize credential lifetime. 8. Add startup permission validation so `spogo` refuses to use a cookie file readable or writable by group or other users. ]]>
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (6)

Chaining Abuse

High
Category
Tool Misuse
Content
```bash
# Ubuntu/Debian
sudo apt update && sudo apt install -y golang-go

# Or download latest from https://go.dev/dl/
wget https://go.dev/dl/go1.23.4.linux-amd64.tar.gz
Confidence
75% confidence
Finding
Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

YARA rule 'backdoor_persistence': Backdoor persistence with malicious payloads (shell commands, SSH key injection, hidden root users) [malware]

High
Category
YARA Match
Content
host needed.

## Requirements
- Spotify Premium account
- Go 1.21+ installed
- User's Spotify browser cookies

## Installation (Linux)

### 1. Install Go (if not installed)

```bash
# Ubuntu/Debian
sudo apt update && sudo apt install -y golang-go

# Or download latest from https://go.dev/dl/
wget https://go.dev/dl/go1.23.4.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.23.4.linux-amd64.tar.gz
echo 'export PATH=$PATH:/usr/local/go/bin:~/go/bin' >> ~/.bashrc
source ~/.bashrc
```

### 2. Install spogo

```bash
go install github.com/steipete/spogo/cmd/spogo@latest
```

This installs to `~/go/bin/spogo`. Add to PATH if needed:
```bash
echo 'export PATH=$PATH:~/go/bin' >> ~/.bashrc
source ~/.bashrc
```

### 3. Verify

```bash
spogo --version
# spogo v0.2.0
```

## Setup (Cookie Auth)

Since OAuth requires localhost callback (impossible on remote servers), we use cookie auth instead.

### 1. Get cookies from browser

Have the user open DevTools → Application → Cookies → `open.spotif
Confidence
75% confidence
Finding
YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
```bash
# Ubuntu/Debian
sudo apt update && sudo apt install -y golang-go

# Or download latest from https://go.dev/dl/
wget https://go.dev/dl/go1.23.4.linux-amd64.tar.gz
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
```bash
# Ubuntu/Debian
sudo apt update && sudo apt install -y golang-go

# Or download latest from https://go.dev/dl/
wget https://go.dev/dl/go1.23.4.linux-amd64.tar.gz
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Session Persistence

Medium
Category
Rogue Agent
Content
- `sp_dc` - Main auth token (long string, required)
- `sp_t` - Device ID (UUID format, required for playback)

### 2. Create config

Create `~/.config/spogo/config.toml`:
```toml
Confidence
97% confidence
Finding
The skill instructs users to persist long-lived Spotify authentication cookies in a local JSON file under ~/.config/spogo/cookies/. These cookies function as bearer-style session secrets; if the file is read by another local user, included in backups, or exposed via logs or dotfile sync, an attacker could hijack the Spotify session and act as the user.

Natural-Language Policy Violations

Low
Confidence
84% confidence
Finding
The sample config sets `market = "IL"` and `language = "en"` as fixed defaults. This can steer the skill toward a specific region and language without presenting a user choice or clearly justifying why those locale settings are required for this skill.

Static analysis

No suspicious patterns detected.