Back to skill

Security audit

Tdl Download Notify

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly coherent, but it hardcodes a ServerChan notification key that can send Telegram download metadata and local paths to a fixed external channel.

Review this before installing. Use it only if you are comfortable with Telegram download details, filenames, file sizes, local output paths, timestamps, and failure output being sent to the ServerChan account tied to the embedded key. Safer use would require replacing the hardcoded SendKey with your own secret configuration and minimizing the notification payload.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
tdl_download_notify.py:20
Finding

Hard-Coded ServerChan SendKey Exposed in Source Code and Documentation

Content
View full analysis

Vulnerability Details

File Locations:

  • tdl_download_notify.py:20-21
  • SKILL.md:23-24

Vulnerability Type: Hard-coded service credential and plaintext secret disclosure
Risk Level: Medium

Vulnerable Code

tdl_download_notify.py:20-21:

python
SENDKEY = "sctp6765tcomfljakjcquc4e7mdaman"
SERVERCHAN_API = f"https://sctapi.ftqq.com/{SENDKEY}.send"

SKILL.md:23-24:

markdown
2. **Server 酱已配置**
   - SendKey: `sctp6765tcomfljakjcquc4e7mdaman`

Technical Analysis

The ServerChan SendKey is embedded directly in the executable source code and repeated in the public-facing documentation. A SendKey is a bearer credential: possession of the value is sufficient to submit notification requests to the associated ServerChan endpoint.

Anyone who can read the project package, source repository, build artifacts, backups, or documentation can recover and reuse this credential without authentication beyond the key itself. The key is also interpolated into the URL path. URLs may be retained in application diagnostics, HTTP traces, proxy logs, monitoring systems, or exception reports, creating additional disclosure opportunities.

During normal operation, the script transmits notification content to the ServerChan account associated with this fixed credential. That content can include:

  • Telegram chat and message identifiers
  • Local output directory paths
  • Downloaded filenames, sizes, and modification times
  • Download command error output
  • Task completion and failure timestamps

The implementation therefore binds every installation of the Skill to the same embedded notification credential rather than requiring each operator to supply an independently protected secret.

Attack Path

  1. An attacker obtains read access to the Skill package, repository, documentation, artifact, or a copy of either affected file.
  2. The attacker extracts the plaintext SendKey.
  3. The attacker con ...[truncated 1380 chars]
Remediation
View remediation

Remediation Suggestions

  1. Immediately revoke and rotate the exposed ServerChan SendKey. Removing it from the current files is insufficient because copies may remain in source history, distributed artifacts, logs, caches, or backups.

  2. Remove the real credential from both tdl_download_notify.py and SKILL.md.

  3. Load the key at runtime from a protected environment variable or secret-management service. For example:

    python
    SENDKEY = os.environ.get("SERVERCHAN_SENDKEY")
    if not SENDKEY:
        raise RuntimeError("SERVERCHAN_SENDKEY is not configured")
    
    SERVERCHAN_API = f"https://sctapi.ftqq.com/{SENDKEY}.send"
    
  4. Ensure secret files and local environment configuration are excluded from version control and distributed Skill packages.

  5. Replace the documentation value with an explicit placeholder such as YOUR_SERVERCHAN_SENDKEY.

  6. Avoid logging the complete ServerChan endpoint. Redact the key from exceptions, traces, proxy logs, and diagnostic output.

  7. Give each deployment its own independently revocable credential rather than sharing one key across all installations.

  8. Minimize notification data by omitting or redacting local filesystem paths, sensitive filenames, Telegram identifiers, and unfiltered command error output unless they are operationally necessary.

  9. Review ServerChan activity for unauthorized messages or quota consumption associated with the exposed key.

  10. Add automated secret scanning to source-control and release pipelines to prevent future credential commits.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (10)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The skill’s documented purpose is limited to post-download notification, but the content reveals materially broader behavior: it initiates Telegram downloads, enumerates local files, compares directory state, and sends detailed operational metadata to an external service. This mismatch reduces informed consent and makes the skill more dangerous in practice because users may authorize a simple notifier while actually granting a workflow that performs network actions, local filesystem inspection, and data exfiltration to Server 酱 using embedded credentials.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

Using and displaying a concrete Server 酱 SendKey without any sensitivity warning normalizes insecure secret handling and directly exposes reusable credentials. In this skill’s context, that is especially dangerous because the key is tied to an external notification channel that may receive download metadata, creating both account abuse and privacy risks.

Content

No source excerpt is available for this finding.

Lp1

High
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill launches an external executable, which is effectively command-execution capability, yet this is not reflected in declared permissions. This matters because spawning tools expands the attack surface and can have broad system effects, especially if the skill runs under a privileged account.

Content

No source excerpt is available for this finding.

Lp1

High
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill launches an external executable, which is effectively command-execution capability, yet this is not reflected in declared permissions. This matters because spawning tools expands the attack surface and can have broad system effects, especially if the skill runs under a privileged account.

Content

No source excerpt is available for this finding.

Lp1

High
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill launches an external executable, which is effectively command-execution capability, yet this is not reflected in declared permissions. This matters because spawning tools expands the attack surface and can have broad system effects, especially if the skill runs under a privileged account.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The documentation publishes a concrete Server 酱 SendKey, which is a live credential-like secret that can be reused by anyone reading the skill. Exposure of such a key enables unauthorized use of the notification service, spam, abuse of the associated account, and leakage of notifications or metadata through an attacker-controlled workflow.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

A live Server酱 SendKey is hardcoded directly in source, exposing a reusable credential to anyone who can read the file, repository, logs, or packaged artifact. Hardcoded secrets are dangerous because they can be abused to send unauthorized notifications, impersonate the service, and may indicate broader poor secret-handling practices.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The code uses a hard-coded notification credential without user-facing disclosure, meaning the skill silently routes notifications through a preconfigured third-party account or endpoint. This is dangerous because users may not realize their activity is tied to someone else's credential or that the credential owner can observe usage patterns.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · tdl_download_notify.py (reported line 96)May include surrounding context.

python
# 执行下载
    start_time = datetime.now()
    try:
        result = subprocess.run(
            tdl_cmd,
            capture_output=True,
            text=True,

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill transmits downloaded file metadata, including filenames, sizes, timestamps, source link, and local output directory, to an external HTTP endpoint without explicit prior disclosure or consent. Even without sending file contents, this metadata can reveal sensitive subjects, operational details, local filesystem layout, and user activity patterns.

Content

No source excerpt is available for this finding.