T09 · Insecure Skill Coding Practices
- Location
index.js:29- Finding
Emby API Token Disclosed to Unrelated TMDB Endpoints
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a coherent movie assistant, but it mishandles media-server credentials and stores personal viewing context with weak controls.
Install only after reviewing and fixing credential handling: remove hard-coded API keys, rotate exposed keys, require user-provided secrets, separate public API requests from Emby-authenticated requests, avoid sending Emby tokens in URLs, and prefer HTTPS. Users should also understand that the skill keeps local records of viewing history, ratings, mood, work status, and interests, and should have clear ways to review, delete, or disable that memory.
index.js:29Emby API Token Disclosed to Unrelated TMDB Endpoints
index.js:15API Credentials Hard-Coded in Source Code and Documentation
index.js:113Emby Credential Exposed in Query Strings over a Default Plaintext Connection
Referenced artifact was not completely inspected
- `SKILL.md` - 本说明文档
Referenced artifact was not completely inspected
- `index.js` - 主程序
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
*/
const path = require('path');
require('dotenv').config({ path: path.join(__dirname, '../../../.env') });
const EMBY_URL = process.env.EMBY_URL || 'http://192.168.0.151:8096';
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
*/
const path = require('path');
require('dotenv').config({ path: path.join(__dirname, '../../../.env') });
const EMBY_URL = process.env.EMBY_URL || 'http://192.168.0.151:8096';
YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).
{
"name": "movie-butler",
"displayName": "🎬 观影小管家",
"version": "1.0.0",
"description": "杜老师的专属观影助手,整合 TMDB + Emby,提供电影查询、媒体库管理、个性化推荐、每周观影计划等服务",
"author": "小暖阳",
"license": "MIT",
"tags": ["电影", "Emby", "TMDB", "推荐", "媒体库"],
"category": "娱乐",
"requirements": {
"env": [
"TMDB_API_KEY",
"EMBY_URL",
"EMBY_API_KEY",
"EMBY_USER_ID"
]
},
"features": [
"🌐 双源查询(TMDB + Emby)",
"🔗 一键播放链接",
"📊 精确年份匹配",
"🎯 智能推荐算法",
"👨👩👦 家庭电�
The skill explicitly states it will record the user's mood, work status, interests, and later use that information for recommendations, but provides no notice about storage, retention, sharing, or user control. This creates a privacy risk because it encourages collection of behavioral and potentially sensitive personal data without informed consent or clear limits.
The demo shows persistent storage of viewing history, ratings, and subjective feedback, but does not warn users that these become lasting personal records. Viewing habits and ratings can reveal preferences, routines, and potentially sensitive inferences, so silent persistence increases privacy and trust risks.
Referencing an Emby API key without warning about the scope of access understates the privacy impact of connecting to a media server. An API key may allow broad access to server content and metadata, so users should be informed that the skill may inspect their library and potentially infer household viewing behavior.
The skill advertises recording movie impressions, ratings, and background information, but it does not prominently warn users that these preferences and status signals will be persistently stored. Because the stored data includes mood, work state, interests, and media habits, inadequate disclosure creates a meaningful privacy and consent issue.
The README discloses a real TMDB API key and internal Emby server details including a private IP address, username, and service endpoint. Even if some values are incomplete, publishing live-looking credentials and internal infrastructure information can enable unauthorized API usage, service abuse, reconnaissance, and targeted attacks against the media server environment.
The example trigger phrases are very broad natural-language commands that can easily overlap with ordinary conversation, causing the skill to activate unintentionally. In a skill that queries external services and may reveal server availability or generate downstream actions like download suggestions, accidental invocation increases privacy and safety risk.
The background-recording examples use everyday statements like mood and work status without clear boundaries indicating that these will be stored as persistent memory. This can cause users to unknowingly save sensitive personal context, creating privacy risk and potentially influencing future recommendations in ways they did not intend.
Examples like '本周推荐什么电影?', '这周有什么好电影推荐', and similar everyday phrases are broad enough to be said in normal conversation and may invoke the skill unintentionally. Because the skill can query external services and access personal media-server data, accidental activation could disclose preferences or trigger unwanted network requests.
The background-recording examples are ordinary personal statements like mood or work status, but the documentation frames them as inputs that improve recommendations without strong opt-in boundaries. This creates risk that sensitive behavioral data is captured or persisted when the user does not clearly understand they are authorizing storage and profiling.
The file structure notes that 'movie-memory.md' is auto-created for viewing records and preferences, but the skill does not clearly warn users that reactions, ratings, and inferred tastes will be stored persistently. Persistent storage of entertainment history and emotional reactions can reveal personal preferences and habits, especially on shared systems.
The documentation exposes a real-looking TMDB API key and internal service configuration details, including a private LAN Emby URL and username. Hard-coded secrets and infrastructure identifiers can enable unauthorized API use, credential stuffing against related services, or reconnaissance of the user's environment, and this is unrelated to what end users need to invoke the skill safely.
The documentation describes configuration for TMDB, Emby, and Plex but does not clearly tell users that their search queries and media-related requests may be sent to those third-party or self-hosted services using configured credentials. That omission weakens informed consent and can surprise users who may not expect external transmission of interests, watch history context, or server queries.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
// 配置
const TMDB_API_KEY = process.env.TMDB_API_KEY || 'bd1ba3aa647fbaa7b35e93db5164a53f';
const TMDB_BASE_URL = 'https://api.themoviedb.org/3';
const OMDb_API_KEY = process.env.OMDB_API_KEY || '9e58a5e3'; // OMDb API (IMDb 数据)
const EMBY_URL = process.env.EMBY_URL || 'http://192.168.0.151:8096';
const EMBY_USERNAME = process.env.EMBY_USERNAME || '喜悦影音';
The inline documentation says the skill will only search movie and series libraries, but the subsequent Emby code explicitly includes musicvideos folders and MusicVideo item types in multiple queries. This is an active contradiction between stated intent in comments and implemented scope.
The skill hardcodes zh-CN in external API requests and uses only Chinese trigger terms, examples, and output text throughout the file. This enforces a specific language/locale without any opt-in or alternate language selection, which matches the stated policy-violation category.
The function comment states it retrieves specified libraries for movies, series, and concerts, and the following comment narrows this to 'movie, series, concert' libraries, but the implemented filter actually uses Emby's musicvideos collection type. That behavior is materially different from the natural-language description and broadens the content category accessed.
The code reads Emby watch history and persists it into a local markdown file without any consent, retention control, or disclosure in the code flow. Viewing history is personal behavioral data, and silently storing it increases privacy risk if the host is multi-user, backed up elsewhere, or later exposed through logs or file access.
The skill saves user ratings and free-form notes to disk without notifying the user that the information will be persisted locally. Because the notes can contain personal opinions or sensitive details, undisclosed storage creates a privacy issue and can lead to unintended disclosure on shared systems.
This code stores sensitive personal context such as mood, work status, and interests to a local file without explicit warning or consent. Such contextual data is more privacy-sensitive than movie metadata and could be harmful if accessed by other local users, backup systems, or later-integrated tooling.
All user-facing instructions and examples are presented only in Chinese, and the skill does not offer an alternative language or indicate that Chinese is an intentional region-specific requirement. Under the policy, forcing a specific language without user opt-in is a natural-language policy concern.