Back to skill

Security audit

Agent Subtitle Translator

Security checks for vulnerabilities and agentic risk

Overview

The subtitle translator is mostly coherent, but its optional local visualizer exposes unauthenticated task APIs that can read, persist, disclose, and change subtitle task data on the same machine.

Prefer the CLI-only workflow unless you need the visualizer. If you use the visualizer, run it only on a trusted single-user machine, stop it when finished, and treat ~/.agent-subtitle-translator/visualizer as containing subtitle contents and task history. A safer release should add a per-session API token, Host/Origin validation, tighter file-path scoping, cleanup controls, and pinned Python dependencies.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
src/server.ts:183
Finding

Unauthenticated Loopback API Permits Unauthorized Local Subtitle File Disclosure

Content
View full analysis
{ const entry: EntrySnapshot = { id: asString(raw.id, String(index + 1).padStart(6, "0")), order: asNumber(raw.order, index + 1), sourceText: asString(raw.source_text), status: "pending", kind: raw.kind === "ass" ? "ass" : "srt", }; if (typeof raw.start_ms === "number") { entry.startMs = raw.start_ms; } if (typeof raw.end_ms === "number") { entry.endMs = raw.end_ms; } if (raw.degradation === "karaoke") { entry.degradation = "karaoke"; } return entry; }); ``` ### Technical Analysis The visualizer server binds to `127.0.0.1`, which limits direct network exposure but does not authenticate callers. The API does not require a bearer token, session credential, capability secret, or other proof that the caller is the authorized bridge. `POST /api/tasks` accepts a caller-controlled `filePath`. The task manager resolves that path and permits any regular file with an accepted subtitle extension. It ...[truncated 2341 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
requirements.txt:1
Finding

Python Dependency Installation Is Not Reproducibly Pinned

Content
View full analysis
=3.3,<4 ``` ```bash # SKILL.md:23-25 python3 -m pip install -r requirements.txt python3 scripts/subtitle_tool.py --help ``` ### Technical Analysis The Skill instructs users to install dependencies from `requirements.txt`, but the dependency is specified as a broad compatible range. Any future `charset-normalizer` release from version 3.3 up to, but excluding, version 4 can be selected by pip. No exact version, package hash, or locked transitive dependency set is supplied. Consequently, two installations of the same audited Skill revision can execute different third-party code. This weakens reproducibility and makes the installation dependent on the current state and integrity of the configured Python package index. There is no evidence that the currently referenced package is malicious. The finding concerns supply-chain hardening and the possibility that a future, compromised, or unexpectedly changed release could be installed without a corresponding review of this Skill. ### Attack Path 1. A user follows the documented prerequisite and runs `python3 -m pip install -r requirements.txt`. 2. pip queries the configured package index and resolves the newest release satisfying `>=3.3,<4`. 3. A later package version, or a package served by a compromised or attacker-controlled configured index, is selected. 4. The package is installed into the user's Python environment. 5. Its code executes when the subtitle tool imports `charset_normalizer` to decode legacy-encoded subtitle files. The practical likelihood depends on the security of the configured package index and the trustworthiness of future dependency releases. ### Impact Assessment A compromised dependency would execute with the privil ...[truncated 395 chars]
Remediation
View remediation
`. 2. Generate and commit a lock file containing SHA-256 hashes for every permitted distribution. 3. Require hash verification during installation, for example with `pip install --require-hashes -r requirements.lock`. 4. Review and deliberately update the locked version rather than automatically accepting all future 3.x releases. 5. Document the trusted package index and discourage installation from untrusted mirrors. 6. Consider keeping UTF-only operation dependency-free and clearly marking legacy-encoding support as an optional, separately locked dependency. 7. Add dependency vulnerability and integrity checks to continuous integration. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (35)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The documented behavior expands beyond subtitle processing into running an HTTP server, serving a UI, exposing task-management endpoints, and allowing file-oriented output retrieval. Even if bound to 127.0.0.1, these are materially different capabilities from the stated purpose and increase the local attack surface, particularly on multi-user hosts or when untrusted local software can access loopback services.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The documented behavior expands beyond subtitle processing into running an HTTP server, serving a UI, exposing task-management endpoints, and allowing file-oriented output retrieval. Even if bound to 127.0.0.1, these are materially different capabilities from the stated purpose and increase the local attack surface, particularly on multi-user hosts or when untrusted local software can access loopback services.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The documented behavior expands beyond subtitle processing into running an HTTP server, serving a UI, exposing task-management endpoints, and allowing file-oriented output retrieval. Even if bound to 127.0.0.1, these are materially different capabilities from the stated purpose and increase the local attack surface, particularly on multi-user hosts or when untrusted local software can access loopback services.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The documented behavior expands beyond subtitle processing into running an HTTP server, serving a UI, exposing task-management endpoints, and allowing file-oriented output retrieval. Even if bound to 127.0.0.1, these are materially different capabilities from the stated purpose and increase the local attack surface, particularly on multi-user hosts or when untrusted local software can access loopback services.

Content

No source excerpt is available for this finding.

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · tests/fixtures/styled.ass (reported line 1)May include surrounding context.

text
[Script Info]
Title: Styled fixture
ScriptType: v4.00+
PlayResX: 1920

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 · README.md (reported line 79)May include surrounding context.

md
| VTT/WebVTT | SRT | Convert locally to normalized SRT. |
| ASS | ASS | Preserve the document and event structure; replace only visible Dialogue text. |

Default output is `<stem>.<normalized-BCP47>.<ext>`, for example `movie.zh-Hans.srt` or `movie.pt-BR.ass`. Existing work directories, validated responses, subtitle outputs, and reports are not overwritten unless the corresponding explicit overwrite flag is used. SRT and ASS outputs use UTF-8 BOM.

The CLI recognizes UTF BOMs and UTF-8 directly. It uses `charset-normalizer` for common legacy encodings and stops when the result is too ambiguous to map safely. Preparation reports entry counts, time range, ordering, empty text, format conversion, and ASS-specific preservation facts.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This file presents the skill instructions entirely in Simplified Chinese, with only a one-way link to an English README and no indication that the user may choose their preferred language or locale. The stated policy flags language or locale constraints that are imposed without user opt-in, and this README does not justify the restriction as region-specific.

Content

No source excerpt is available for this finding.

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
85% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · README.md (reported line 39)May include surrounding context.

如果运行时要求使用自己的 Skill 目录,将其指向共享副本:

bash
mkdir -p ~/.codex/skills ~/.claude/skills
ln -s ~/.agents/skills/agent-subtitle-translator ~/.codex/skills/agent-subtitle-translator
ln -s ~/.agents/skills/agent-subtitle-translator ~/.claude/skills/agent-subtitle-translator

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
85% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · README.zh-CN.md (reported line 39)May include surrounding context.

如果运行时要求使用自己的 Skill 目录,将其指向共享副本:

bash
mkdir -p ~/.codex/skills ~/.claude/skills
ln -s ~/.agents/skills/agent-subtitle-translator ~/.codex/skills/agent-subtitle-translator
ln -s ~/.agents/skills/agent-subtitle-translator ~/.claude/skills/agent-subtitle-translator

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 · README.md (reported line 39)May include surrounding context.

如果运行时要求使用自己的 Skill 目录,将其指向共享副本:

bash
mkdir -p ~/.codex/skills ~/.claude/skills
ln -s ~/.agents/skills/agent-subtitle-translator ~/.codex/skills/agent-subtitle-translator
ln -s ~/.agents/skills/agent-subtitle-translator ~/.claude/skills/agent-subtitle-translator

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 · README.zh-CN.md (reported line 39)May include surrounding context.

如果运行时要求使用自己的 Skill 目录,将其指向共享副本:

bash
mkdir -p ~/.codex/skills ~/.claude/skills
ln -s ~/.agents/skills/agent-subtitle-translator ~/.codex/skills/agent-subtitle-translator
ln -s ~/.agents/skills/agent-subtitle-translator ~/.claude/skills/agent-subtitle-translator

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill requests and documents capabilities that include shell execution, file reads/writes, and local network access, but it does not declare any explicit tool scope such as permissions or allowed-tools. That weakens least-privilege controls and makes it easier for an agent runtime to grant broader access than is necessary, especially because the workflow includes starting services, reading arbitrary paths, and writing outputs.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
78% confidence
Finding

The visualizer workflow introduces persistent task history and a reusable local service, which creates session persistence beyond a single translation run. Persistent local state can expose prior task metadata, file paths, model identifiers, and progress history to later sessions or other local users/processes, making the optional visualizer more sensitive than the core one-shot CLI flow.

Content

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

md
1. **Check the environment.** Run from the Skill directory. Install or verify the Python dependency from `requirements.txt`, confirm Python can run `scripts/subtitle_tool.py --help`, confirm Node.js satisfies the package requirement (Node 20 or newer), install Node dependencies once with `npm install`, and run `npm run build` successfully.
2. **Check the Web service.** Request `http://127.0.0.1:4317/api/health`. Reuse the service only when the response is healthy, identifies `subtitle-visualizer`, and reports a compatible Skill version. Otherwise start the service after resolving any occupied-port conflict, then record the printed URL.
3. **Open the Web page when requested.** Navigate the selected browser to the printed local URL and report whether it loaded. Browser access is an observation step and does not grant the page task-input or translation permissions.
4. **Run the visualizer workflow.** Run `identify`, then create the task, start batches, submit and validate responses, and compose through `visualizer:bridge`. Keep reporting each meaningful operation in the Agent response.

The commands in the sections below describe the direct deterministic CLI workflow and the safety rules implemented by the bridge. During an Agent visualizer run, use the equivalent bridge commands after the local service is healthy. Do not compose the same task and output path through both workflows.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The generated translation prompt is entirely written in Chinese and instructs the downstream agent/LLM in that language regardless of user preference. This is a natural-language locale policy concern because the file hard-codes a specific language for operational instructions without any opt-in or documented justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The file emits user-facing errors and help text entirely in Chinese, including required-argument errors, validation messages, and the main usage banner. This creates a language/locale policy issue because the skill does not offer any opt-in or alternative language selection, and no justification for a Chinese-only interface appears in this file.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The formatDuration function always returns Chinese unit labels (小时, 分, 秒) in user-facing strings. This is a natural-language locale policy issue because the file does not offer user opt-in, configurability, or documentation justifying a Chinese-only output format.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The manifest describes deterministic local subtitle parsing/validation/compose behavior, but this file implements that by launching an external Python executable via execFile. Spawning an interpreter is a broader capability than ordinary file-based subtitle processing and is not explicitly justified by the manifest text, especially because the interpreter binary itself is configurable.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code returns user-facing error messages in Chinese only, such as when the request body is too large or JSON is invalid. The file also includes other user-visible Chinese responses and startup logs, but there is no opt-in, language selection, or documented justification for a Chinese-only locale policy.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Multiple API error responses and console messages are presented only in Chinese, including 404/405 errors and startup status output. Because the skill does not offer a locale choice or clearly document a region-specific requirement in this file, this appears to enforce a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The manifest describes an optional loopback-only visualizer in support of subtitle translation, but this file implements a full HTTP control plane: task creation, batch start/retry/response submission, cancellation, agent profile reporting, SSE progress streaming, and downloadable output files. That is materially more than simple visualization and makes the skill operate as a local orchestration service in addition to subtitle translation/validation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This file hardcodes Chinese strings for defaults, errors, and task event messages throughout the implementation, which forces a specific locale for user-facing interactions. There is no indication in this file that users can opt into this language or that the skill is intentionally restricted to a Chinese-only context.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

When base64 content is provided, the skill writes the uploaded subtitle file to a task-local input directory, and later persists full task state to task.json. In this file there is no confirmation prompt, user-facing disclosure, or explanatory comment/docstring warning that user-provided content and task metadata will be stored on disk.

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 · tests/test_subtitle_tool.py (reported line 31)May include surrounding context.

python
self.tmp = Path(self.temp.name)

    def run_cli(self, *args: str, ok: bool = True) -> subprocess.CompletedProcess[str]:
        result = subprocess.run(
            [sys.executable, str(SCRIPT), *map(str, args)],
            cwd=self.tmp,
            text=True,

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The assertion requires the bridge error message to match the Chinese phrase '不支持远程 URL', which enforces a specific language expectation in the skill's behavior. The file does not indicate any user opt-in or documented locale-specific justification for mandating Chinese output.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

Multiple assertions require Chinese strings such as '等待 Agent 自报', '等待模型自报', and '页面只展示任务状态、过程记录和翻译结果。', which indicates the skill is expected to present a fixed locale. There is no evidence in this file of user language choice or a clearly documented regional constraint.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.dangerous_exec, suspicious.dynamic_code_execution

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
src/python-cli.ts:64

Dynamic code execution detected.

Critical
Code
suspicious.dynamic_code_execution
Location
tests/test_subtitle_tool.py:21