T09 · Insecure Skill Coding Practices
- Location
scripts/lastfm-api.sh:92- Finding
Sensitive Last.fm credentials exposed through command-line arguments
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This Last.fm skill is mostly coherent, but it can change your Last.fm account and handles long-lived write credentials in a locally exposed way.
Install only if you are comfortable giving the skill your Last.fm API key and, for love/unlove, a long-lived session key and API secret. Prefer read-only use unless you need write actions, and avoid using write credentials on shared or heavily monitored machines because the current script may expose them through local process arguments.
scripts/lastfm-api.sh:92Sensitive Last.fm credentials exposed through command-line arguments
Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.
Install on Ubuntu/Debian:
sudo apt-get update && sudo apt-get install -y jq curl
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
Install on Ubuntu/Debian:
sudo apt-get update && sudo apt-get install -y jq curl
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
### 1. Get a Last.fm API Key
1. Visit https://www.last.fm/api/account/create
2. Fill in the application details:
- **Name**: Your preferred name (e.g., "OpenClaw Integration")
- **Description**: "Personal OpenClaw skill for Last.fm"
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
env: {
LASTFM_API_KEY: "required",
LASTFM_USERNAME: "required",
LASTFM_SESSION_KEY: "optional, for write ops",
LASTFM_API_SECRET: "optional, for write ops"
}
}
The skill explicitly describes use of shell utilities (curl, jq) and outbound network access, but it does not declare any tool scope such as allowed tools or permissions. That creates an unnecessary trust gap: an agent or runtime may permit broader shell/network capability than the skill actually needs, increasing the blast radius if the skill is misused or later modified.
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
~/.openclaw/openclaw.json:Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
| Desktop Auth | Write operations (local app) | API key + secret |
| Web Auth | Write operations (web app) | API key + secret + callback URL |
This skill uses **Desktop Auth** for write operations.
---
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
url+="&${param}"
done
curl -s "$url"
}
make_write_request() {
The love and unlove commands perform authenticated POST requests that modify the user's Last.fm data, but the execution path contains no confirmation prompt and no explicit user-facing warning at the point of action. Although the usage text notes that a session key is required, it does not clearly warn that these commands will immediately change account state when invoked.
The skill supports state-changing operations (love and unlove) against the user's Last.fm account but does not present a prominent warning or confirmation requirement before describing those actions. This can lead to unintended account modifications, especially in agentic contexts where commands may be inferred or executed with limited user awareness.
This markdown file describes track.love and track.unlove, which change a user's Last.fm account state, but it does not include any warning that these are write operations affecting user data. Under the markdown-file criteria for missing user warnings, destructive or data-affecting behaviors should be explicitly disclosed.
No suspicious patterns detected.