T09 · Insecure Skill Coding Practices
- Location
main.py:128- Finding
M-Team API Key Forwarded to an Unvalidated Download URL
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill appears to do what it claims, but it can start local torrent downloads and handles credentials and remote download URLs too loosely for automatic installation.
Review before installing. Use environment variables or a secret manager instead of editing credentials into source, use a least-privileged Transmission account, pin dependencies, require a clear confirmation before adding any torrent, validate the returned download URL before fetching it, and remove or replace the Cloudflare bypass framing. Also confirm the M-Team and torrent-download use complies with your legal, privacy, and network policies.
main.py:128M-Team API Key Forwarded to an Unvalidated Download URL
main.py:110Predictable User-Influenced Temporary File Path Permits File Overwrite
main.py:6Credentials Are Configured Directly in Source Code
README.md:12Third-Party Dependencies Are Installed Without Version or Integrity Pinning
The README describes a workflow that searches for torrents and automatically pushes selected downloads into a local Transmission instance and NAS paths, but it does not warn users about network, storage, privacy, or legal impact. In this context, the skill bridges an external content indexer to a local downloader, so omission of user-consent and impact disclosures increases the chance of unintended downloads, storage misuse, and exposure of local infrastructure credentials.
The README explicitly advertises 'perfectly bypassing Cloudflare 502 interception,' which signals anti-protection or evasion behavior. Even if only marketing language, documenting a claimed ability to circumvent a service's protective controls is risky because it encourages abuse and may conceal undocumented network behavior not disclosed elsewhere in the skill.
The file is written as a Chinese-only role and response specification, including mandated Chinese phrasing and user interaction style, with no opt-in or alternative language path. Under the policy, forcing a specific language without user choice is a natural-language locale violation unless clearly justified as region-specific.
The skill directs the agent to initiate a download to a local Transmission/NAS environment after only a content-selection prompt, but it does not require any explicit user warning or confirmation about system-side effects such as disk writes, network activity, or storage location. This creates a real safety issue because the agent is authorized to cause persistent changes on the user's infrastructure, and users may not understand that selecting an item will immediately trigger local downloads.
The file hardcodes sensitive service configuration, including Transmission host, username, and password placeholders, encouraging credential storage in source code. In real deployments this often leads to secret exposure through source control, logs, backups, or accidental sharing, and the configured internal host reveals local network topology.
# ================= 1. 认证、服务与网络配置 =================
MTEAM_API_KEY = "在这里填入你真实的 M-Team API Key"
MTEAM_API_BASE = "https://api.m-team.cc/api"
# Transmission 配置
TRANS_HOST = '10.1.1.10'
The search function sends the user-provided keyword to an external M-Team API using an authenticated request, but there is no confirmation prompt, print/log disclosure, or explanatory comment warning that user input will be transmitted off-box. This is a safety-relevant network operation involving user data and credentials.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
try:
# 加入 headers 伪装和 proxies 代理
response = requests.post(
f"{MTEAM_API_BASE}/torrent/search",
headers=COMMON_HEADERS,
json=payload,
The download workflow performs a chain of privileged actions—remote token retrieval, file download to disk, and submission to a Transmission instance—without any confirmation, validation, or safety checks. In this context, the skill is designed to fetch and enqueue remote content, so an incorrect or manipulated torrent ID/category can trigger unintended downloads and resource consumption on a local service.
The code trusts a download URL returned by a remote API and immediately fetches it, creating a server-side request forgery style trust boundary issue. If the API response is compromised, misconfigured, or malicious, the skill could be induced to make unintended outbound requests through the configured proxy and process attacker-controlled content.
download_url = token_data.get('data')
# 2. 真实下载种子文件并写入临时文件 (走代理)
dl_resp = requests.get(
download_url,
headers=COMMON_HEADERS,
proxies=PROXIES,
The skill instructs the agent to push a selected torrent into a local Transmission instance, which changes the user's local system state and can trigger bandwidth, storage, and legal/privacy consequences. Although the tool requires an explicit user selection before download, the manifest does not warn about these side effects or require a clear confirmation step immediately before the system-modifying action.
The comment frames COMMON_HEADERS as browser impersonation for anti-blocking, but the actual headers also carry the x-api-key used for authenticated requests. This is not just incomplete wording: it describes the intent of the header block in a way that omits and softens its real purpose.
Docstrings, comments, and returned user-facing strings are entirely in Chinese, and the skill does not indicate that this locale restriction is optional or region-specific. Under the language policy, forcing a specific language without opt-in is a natural-language policy concern.
All user-facing manifest text is written as mandatory Chinese instructions, with no indication that the skill supports other languages or that Chinese-only behavior is intentional for a region-specific use case. This can violate language/locale policy when the skill implicitly constrains interactions to a single language without user opt-in.