T09 · Insecure Skill Coding Practices
- Location
scripts/shield-cli.js:50- Finding
Plex administrator token exposed through command-line arguments and request URLs
- Content
View full analysis
node scripts/shield-cli.js setup ``` Discovery similarly places the token directly in curl's argument list: ```javascript const discoverResult = spawnSync('curl', [ '-s', `https://plex.tv/api/resources?X-Plex-Token=${token}` ], { encoding: 'utf8', timeout: 15000 }); ``` ### Technical Analysis The Plex token is described by the project as a universal key granting full access to the account and associated servers. Nevertheless, the Skill accepts it as a command-line argument and subsequently embeds it in URLs passed to a child `curl` process. This creates two credential-disclosure channels: 1. The initial setup or discovery command can remain in shell history, terminal logs, automation logs, or command auditing records. 2. While `curl` is running, the complete URL—including `X-Plex-Token`—can be exposed through process inspection facilities such as `ps`, `/proc`, monitoring agents, or process telemetry available to other authorized local users and services. Using `spawnSync` ...[truncated 1386 chars]- Remediation
View remediation
