Back to skill

Security audit

PT Agent

Security checks for vulnerabilities and agentic risk

Overview

The skill has a coherent PT search/download purpose, but it needs Review because it can send private tracker or downloader credentials to broadly configured network endpoints and can start selected downloads without a final confirmation.

Install only if you are comfortable giving the skill access to your authorized private-tracker accounts, configured downloader, and local env:// credential references. Use official HTTPS tracker/API/RSS endpoints, avoid attacker-provided URLs, keep downloader endpoints local or explicitly trusted, and prefer adding downloads paused unless you want immediate starts.

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

Error
Location
scripts/pt_runtime.py:219
Finding

Unrestricted Configurable Endpoints Permit SSRF and Credential Disclosure

Content
View full analysis
tuple[int, str, bytes, dict[str, str]]: import urllib.error import urllib.request req = urllib.request.Request(url, method=method.upper(), data=data) req.add_header("User-Agent", USER_AGENT) for key, value in (headers or {}).items(): req.add_header(key, value) try: with urllib.request.urlopen(req, timeout=timeout) as resp: return resp.status, resp.geturl(), resp.read(), dict(resp.headers.items()) except urllib.error.HTTPError as exc: body = exc.read() return exc.code, exc.geturl(), body, dict(exc.headers.items()) except urllib.error.URLError as exc: raise RuntimeErrorJson("network_error", str(exc.reason)) from exc except TimeoutError as exc: raise RuntimeErrorJson("network_timeout", "The remote service did not respond before the timeout.") from exc ``` Tracker credentials are resolved from environment references and placed directly in request headers: ```python def tracker_headers(tracker: dict[str, Any]) -> dict[str, str]: headers: dict[str, str] = {} secret_refs = tracker.get("secretRefs") if isinstance(tracker.get("secretRefs"), dict) else {} cookie_ref = get_secret_ref(secret_refs, "cookie") or tracker.get("cookieRef") if tracker.get("authMode") == "cookie" or cookie_ref: cookie = resolve_r ...[truncated 7711 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
Findings (43)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill claims a narrow private-tracker workflow but also includes repository validation, linting, JSON/catalog checks, dynamic imports, and test execution. This expands the executable surface and can permit code paths unrelated to the user task, increasing the chance of unintended execution, supply-chain exposure, or abuse of local project files.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill claims a narrow private-tracker workflow but also includes repository validation, linting, JSON/catalog checks, dynamic imports, and test execution. This expands the executable surface and can permit code paths unrelated to the user task, increasing the chance of unintended execution, supply-chain exposure, or abuse of local project files.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill claims a narrow private-tracker workflow but also includes repository validation, linting, JSON/catalog checks, dynamic imports, and test execution. This expands the executable surface and can permit code paths unrelated to the user task, increasing the chance of unintended execution, supply-chain exposure, or abuse of local project files.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 60)May include surrounding context.

md
preflight inspection. Set terminal `workdir` to the directory containing this `SKILL.md`, then run exactly one matching command:

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 135)May include surrounding context.

md
preflight inspection. Set terminal `workdir` to the directory containing this `SKILL.md`, then run exactly one matching command:

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 200)May include surrounding context.

md
Use `scripts/pt_runtime.py` only when the host has no native PT tools and local execution is available. It resolves `env://NAME` locally; `secret://`, `profile:

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · scripts/benchmark_common.py (reported line 219)May include surrounding context.

python
server_thread = threading.Thread(target=server.serve_forever, daemon=True)
    server_thread.start()
    base_url = f"http://127.0.0.1:{server.server_port}"
    env = {**os.environ, "PYTHONDONTWRITEBYTECODE": "1", "PT_AGENT_BENCHMARK_COOKIE": "session=fixture"}

    try:
        with tempfile.TemporaryDirectory(prefix="pt-agent-benchmark-") as temp_dir:

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The module docstring states that the script stores only config records and secret references and never resolved secret values, but the migration path writes raw credential material into a .env file. This mismatch is dangerous because reviewers, operators, or higher-level policy engines may trust the documented behavior and permit the tool in contexts where writing resolved secrets to disk is disallowed, leading to accidental secret exposure or policy bypass.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/validate_skill.py (reported line 228)May include surrounding context.

python
legacy_store = module.empty_store()
        legacy_store["trackers"] = {"site-a": {"id": "site-a", "cookie": "session_id=unsafe-example-value"}}
        legacy_store["downloaders"] = {"qb": {"id": "qb", "username": "user", "password": "unsafe-password"}}
        migration = module.migrate_inline_secrets(legacy_store, Path(temp_dir) / ".env")
        try:
            module.reject_raw_secrets(legacy_store)
        except module.StoreError as exc:

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The README says users only need to 'tell Agent what they want' and gives natural-language examples like '看看我的 PT 数据' and '下载第 1 个', but it does not define a constrained invocation scope or negative examples. In a general assistant setting, such everyday phrasing could overlap with normal conversation and cause unintended activation of the PT skill.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

Phrases such as '配置 PT 站点', '检查 PT 配置', and '查看下载器状态' are presented as direct commands, but the README does not specify whether invocation is limited to this skill, a command palette, or a PT-only context. Without explicit scope constraints, these generic request forms may be interpreted too broadly by a host assistant.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill requests or implies powerful capabilities (environment access, filesystem read/write, network, and shell) but does not declare an explicit tool scope. That makes the effective privilege boundary unclear and increases the risk of over-broad execution in hosts that rely on manifest-style restrictions, especially because the skill also instructs shell execution of bundled scripts.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · SKILL.md (reported line 125)May include surrounding context.

md
## Safety Boundary

- Never ask the user to paste cookies, passkeys, passwords, API keys, authorization headers, private download URLs, magnet links containing private keys, or `.torrent` bytes into chat.
- Never store, print, log, or echo raw secret material. If the user exposes a secret, do not repeat it; recommend rotating it and ask for a secret reference.
- Accept persisted credentials only as `secret://`, `env://`, `profile://`, `proxy://`, or a documented host-native reference.
- Treat `api_token`, cookies, passkeys, RSS keys, browser sessions, and downloader credentials as different credential types. Validate each against the resolved adapter before enabling a configuration.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
85% confidence
Finding

The workflow repeatedly emphasizes skipping confirmation for selected-result downloads and resuming the user's task automatically after setup. In a skill with downloader control and persistent state, reducing human confirmation around externally visible actions increases the risk of unintended downloads or actions triggered from stale context.

Content

Scanner excerpt · SKILL.md (reported line 157)May include surrounding context.

md
7. Present one redacted confirmation summary before enabling or changing configuration. After confirmation, run a harmless health check when the host can resolve the reference; otherwise mark it `pendingHealthCheck`.
8. Fetch and persist sanitized account statistics after successful tracker validation when supported. Record a redacted repair status when refresh fails.
9. Present search results as a numbered, paginated list with title, size, seeders, publish time, and discount state when available. Keep private URLs and passkeys hidden.
10. When the user selects a search result to download, execute immediately with the default downloader and `--start`. Skip confirmation, dry-run, and paused mode unless the user explicitly asked to queue paused. Report `added` / `already_present` / `resumed` with progress when available.
11. Finish with the outcome, current usable state, and the next natural action. Resume the user's original task automatically after setup when possible.

For download handoff on an already-selected result, run one real `download-torrent --start` command immediately. No confirmation step. No dry-run gate. Prefer `--start` unless the user requested a paused add. The runtime returns `already_present` or auto-`resumed` for duplicates/paused items; surface that directly. Keep confirmation only for configuration changes, deletions, or bulk/ambiguous destructive actions.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
88% confidence
Finding

The skill explicitly instructs automatic download handoff with no confirmation once a result is selected. Even if intended as convenience, this authorizes an external side effect—starting downloads on a configured client—without a final consent checkpoint, which can lead to unwanted transfers, policy violations, or resource consumption if selection state is mistaken or manipulated.

Content

Scanner excerpt · SKILL.md (reported line 160)May include surrounding context.

md
10. When the user selects a search result to download, execute immediately with the default downloader and `--start`. Skip confirmation, dry-run, and paused mode unless the user explicitly asked to queue paused. Report `added` / `already_present` / `resumed` with progress when available.
11. Finish with the outcome, current usable state, and the next natural action. Resume the user's original task automatically after setup when possible.

For download handoff on an already-selected result, run one real `download-torrent --start` command immediately. No confirmation step. No dry-run gate. Prefer `--start` unless the user requested a paused add. The runtime returns `already_present` or auto-`resumed` for duplicates/paused items; surface that directly. Keep confirmation only for configuration changes, deletions, or bulk/ambiguous destructive actions.

## Interaction Quality

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

This JSON manifest states that the catalog uses browser profiles, cookies, API tokens, and authenticated fetches for searching and downloading, but the descriptive text only says the file contains no secrets. For a manifest file, the omission of a warning about privacy-sensitive authenticated requests and credential use can leave users unaware that the skill may access or transmit authenticated session data as part of its behavior.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

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.

Content

Scanner excerpt · references/agent-contract.md (reported line 19)May include surrounding context.

md
- Standard Error Codes
- tracker.auth.validate
- tracker.user_stats
- tracker.config.create
- downloader.config.create
- tracker.search
- downloader.add

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The guidance explicitly instructs the agent to immediately initiate download-torrent --start without confirmation for ordinary downloads. In an agent context that can trigger external side effects on a downloader, this removes an important user-consent checkpoint and increases the risk of unintended or manipulated torrent additions, especially when search results, tracker state, or user intent are ambiguous.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The trigger description says to use this reference when the user 'is new, asks to initialize, or requests search/download/status without a usable tracker or downloader.' Phrases like 'is new' and broad request classes such as 'search/download/status' are not tightly scoped, which makes it unclear when this guide should activate versus normal handling.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The prescribed user-facing dialogue examples are entirely in Chinese and are presented as the default prompts to use, but the document does not offer the user a language choice or state that Chinese is required for a region-specific context. This can violate language/locale policy by implicitly forcing a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file instructs the agent to use a fixed Chinese confirmation gate phrase, which effectively forces a specific language in user interactions. Because the document does not offer opt-in language selection or justify a Chinese-only locale, this conflicts with the language/locale policy for natural-language content.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This section provides normative example prompts and warnings entirely in Chinese as the preferred interaction pattern. In the absence of an explicit locale restriction or user language choice, this constitutes a language policy issue rather than a mere illustrative example.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · references/interaction-design.md (reported line 337)May include surrounding context.

md
- Exposing internal script paths, CLI commands, cookie file paths, host/runtime details, capability names, or payload JSON as the user's next step.
- Asking for all fields in one message.
- Returning search counts without selectable results.
- Treating "确认" as global confirmation without checking `lastConfirmation`.
- Hiding partial failures until after the user tries to download.
- Retrying unrelated tracker endpoint families after 404/login redirect.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The file repeatedly prescribes user-facing assistant messages exclusively in Chinese, and this example directs the interaction format in Chinese without indicating that the user may choose another language. Because this reference governs conversational behavior, it creates a language/locale constraint that is not documented as optional or region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This setup template is entirely in Chinese and presented as the default opening interaction, with no accompanying instruction to adapt to user language preference. That constitutes a natural-language policy issue because it forces a specific language for core workflow interactions.

Content

No source excerpt is available for this finding.