Back to skill

Security audit

Baoyu Translate

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a coherent translation workflow, but it should be reviewed because it can execute an unpinned Bun runtime through npx and makes several local file changes during use.

Review before installing. Prefer using a trusted preinstalled Bun runtime instead of allowing `npx -y bun`, avoid translating sensitive documents unless you are comfortable with intermediate files being saved, and check output directories because existing results may be moved to timestamped backups.

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

T08 · Insecure Dependencies

Warning
Location
scripts/main.ts:19
Finding

Unpinned Bun Runtime Downloaded and Executed Through npx

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:35 and scripts/main.ts:19
Vulnerability Type: Unpinned runtime dependency retrieval and execution
Risk Level: Medium

Vulnerable Code

SKILL.md:35:

markdown
Scripts in `scripts/` subdirectory. `{baseDir}` = this SKILL.md's directory path. Resolve `${BUN_X}` runtime: if `bun` installed → `bun`; if `npx` available → `npx -y bun`; else suggest installing bun. Replace `{baseDir}` and `${BUN_X}` with actual values.

scripts/main.ts:4-20:

typescript
function formatScriptCommand(fallback: string): string {
  const raw = process.argv[1]
  const displayPath = raw
    ? (() => {
        const relative = path.relative(process.cwd(), raw)
        return relative && !relative.startsWith("..") ? relative : raw
      })()
    : fallback

  const quotedPath = displayPath.includes(" ")
    ? `"${displayPath.replace(/"/g, '\\"')}"`
    : displayPath

  return `npx -y bun ${quotedPath}`
}

Technical Analysis

The Skill directs the Agent to use npx -y bun whenever a locally installed Bun executable is unavailable. This command resolves and downloads the package currently identified as bun through the configured npm registry and immediately executes it.

No exact Bun package version or package integrity value is specified. The -y option also suppresses the normal installation confirmation. Consequently, the code that executes at runtime is not fully represented by the audited repository and can change independently after this Skill has been reviewed.

The lockfile pins the local markdown-it dependency and its transitive packages, but it does not constrain or authenticate the Bun runtime downloaded by this separate npx invocation. This creates a supply-chain trust boundary at execution time.

Attack Path

  1. A system invokes the Skill on a host where bun is not already installed but npx is available.
  2. Following SKILL.md, the Agent selects the fallback command npx -y bun ...[truncated 1453 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove the automatic npx -y bun fallback and require a trusted, preinstalled Bun executable.
  2. If automatic retrieval is necessary, pin an explicitly audited Bun package version rather than resolving the latest available version.
  3. Verify the downloaded runtime using an approved checksum, signature, or organization-controlled package provenance policy before execution.
  4. Do not suppress installation confirmation with -y; obtain explicit user approval before downloading and executing a missing runtime.
  5. Prefer a trusted internal package registry or an organization-managed runtime installation mechanism.
  6. Document the expected Bun version and validate it before running the chunking script.
  7. Consider eliminating the runtime download requirement by distributing a compiled, reproducible executable or rewriting the small chunking utility for a runtime already guaranteed by the host environment.
  8. Keep dependency installation separate from Skill execution so dependency review and approval occur before the Skill processes user files.
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (19)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description says this skill is for translating content with different translation quality modes and glossary support. The supplied code does not perform any translation or language processing of that kind. Its primary purpose is to chunk Markdown files into smaller files based on word count, preserving sections/frontmatter where possible. It uses filesystem access to read a Markdown file, create directories, and write chunk files, which is materially different from the declared purpose. This is a clear description-behavior mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared purpose centers on translation functionality, including multilingual translation, refined modes, and glossary support. The supplied code chunk does not perform translation; it serves as a command-line entry point that forwards to runChunkCli and exposes a 'chunk' command for splitting markdown into chunks. This is a materially different primary purpose from translation. While chunking could theoretically support a larger translation pipeline, this code chunk itself only implements chunk-oriented CLI behavior and lacks the declared translation capabilities.

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 39)May include surrounding context.

md
| `scripts/main.ts` | CLI entry point. Default action splits markdown into chunks; also supports explicit `chunk` subcommand |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| `scripts/main.ts` | CLI entry point. Default action splits markdown into chunks; also supports explicit `chunk` subcommand |

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The activation rule is broad enough to trigger on arbitrary URLs/files whenever the interaction is interpreted as having 'translation intent.' In agent environments, overly broad invocation increases the chance of this skill being applied to untrusted remote or local content, which can expand exposure to prompt injection in fetched documents and unnecessary file access/materialization workflows.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding

The skill instructs the runtime to fall back to npx -y bun when bun is not installed, which fetches and executes a package at runtime without pinning an exact version or integrity. That creates a supply-chain risk: behavior can change over time or a compromised upstream package/version could be executed in the agent context.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest and most of the document present this skill as a full translation workflow supporting quick/normal/refined translation modes. However, the only concrete scripts listed are main.ts and chunk.ts, and both are described solely as markdown chunking tools, which does not match the claimed core translation functionality.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The table under Script Directory labels scripts/main.ts as the CLI entry point whose default action is splitting markdown into chunks, and scripts/chunk.ts as chunking implementation. This directly conflicts with the surrounding documentation that frames the skill as performing translation workflows, creating an intent/documentation divergence within the file itself.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The document specifies target_language: zh-CN as the default and labels it as the default target language, which imposes a specific locale choice in the skill configuration. The policy requires offering a language or locale choice, or clearly justifying the constraint; this file does not do either.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The workflow explicitly instructs saving analysis, prompts, drafts, critiques, and revisions to disk without any warning, minimization, or cleanup guidance. For a translation skill, source material may contain confidential documents, proprietary text, PII, or regulated data, so persistent storage of multiple derived artifacts materially increases exposure surface and retention risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The workflow explicitly instructs the system to fetch arbitrary URL content and to rename existing output directories, but it provides no requirement for user consent, trust validation, or confirmation before performing network and filesystem side effects. In an agent setting, this can lead to unexpected outbound requests, exposure to untrusted content, and unintended modification of local data, especially when translation can be triggered from a URL or file input.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding

The CLI constructs and displays a command using npx -y bun, which references a package/runtime without an explicitly pinned version. If a user copies and runs that command, npx may fetch the latest available artifact, creating a supply-chain risk where behavior can change unexpectedly or a compromised upstream package/version could be executed. In a developer-facing translation skill, this is more dangerous because users are likely to copy-paste setup or usage commands directly.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill explicitly instructs the agent to create and write an EXTEND.md file in either the user's home directory or the current project without an explicit warning, confirmation boundary, or discussion of file-modification side effects. In this translation-skill context the write is expected configuration behavior rather than obviously malicious, but it still creates a file-system side effect that could surprise users and overwrite local preferences if handled carelessly.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The manifest describes a translation/localization skill with multiple quality modes and glossary support, but this workflow document states that all intermediate results are saved as files in an output directory. Persisting analysis, prompts, critiques, and revisions is not mentioned in the manifest and goes beyond the plain description of translating content, even though it may be an implementation choice.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

This markdown file instructs subagents to save translation output to draft files, which is a file-write operation affecting user data. The template does not include any warning, confirmation, or user-facing disclosure that files will be created or overwritten as part of execution.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The non-chunked mode explicitly tells the subagent to save the translation to an output path, which is a file-write action. The surrounding markdown does not warn the user that executing this skill will create or modify files, so the behavior lacks disclosure.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
76% confidence
Finding

The workflow examples consistently use the zh target language suffix, which can imply a fixed language/locale behavior in the skill documentation. Because the file does not clarify that the target language is user-selected or configurable, this may conflict with language-choice policy expectations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

This code creates an output directory and writes multiple markdown files, including frontmatter and chunk files, but provides no explicit warning that it will modify the filesystem beyond returning a JSON result afterward. For a code file, safety-relevant file writes should include some visible disclosure such as a log message, confirmation, or explanatory comment/docstring unless clearly warned elsewhere.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: markdown-it==14.1.1 — 1 advisory(ies): CVE-2026-48988 (markdown-it: Quadratic complexity DoS in smartquotes rule via replaceAt string o)

Low
Category
Supply Chain
Confidence
97% confidence
Finding

The package pins markdown-it to 14.1.1, and the reported advisory indicates a quadratic-complexity denial-of-service issue in the smartquotes processing path. In a translation skill that may ingest attacker-controlled or arbitrary external text/URLs/files, malformed large inputs could trigger excessive CPU consumption during Markdown parsing, making this a real availability risk even if it does not directly enable code execution.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.