Back to skill

Security audit

Baidu File Translate

Security checks for vulnerabilities and agentic risk

Overview

This is a straightforward Baidu document translation helper with privacy and npm supply-chain caveats, but no hidden, destructive, or purpose-mismatched behavior in the artifact.

Install only if you are comfortable using Baidu's translation service for the documents you submit and exposing TRANS_API_KEY to the translation CLI. Avoid confidential, regulated, or highly sensitive files unless your policy allows Baidu processing, and prefer pinning or otherwise controlling the npm dependency in managed environments.

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
SKILL.md:5
Finding
Unpinned npm Dependency Permits Unreviewed Package Updates<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, line 5 **Vulnerability Type**: Unpinned third-party npm dependency **Risk Level**: Medium ### Vulnerable Code ```yaml metadata: '{"clawdbot":{"emoji":"📄","requires":{"bins":["trans"],"env":["TRANS_API_KEY"]},"install":[{"id":"npm","kind":"npm","package":"@bdtrans/trans-cli","bins":["trans"],"label":"Install trans-cli (npm)"}]}}' ``` ### Technical Analysis The installation metadata specifies `@bdtrans/trans-cli` without an exact version or package-integrity hash. Consequently, npm resolves the package version available under the applicable registry and dependency-resolution rules at installation time. The Skill's reviewed contents therefore do not fully determine the code that will be installed and executed. If the package publisher account, npm package, registry, or release process is compromised, a malicious new version could be delivered without any modification to this repository. npm lifecycle scripts may also run during package installation unless explicitly disabled, allowing package code to execute before the `trans` command is invoked. No evidence in the audited project proves that the current `@bdtrans/trans-cli` release is malicious. The confirmed issue is the unsafe, mutable dependency specification and the resulting supply-chain exposure. ### Attack Path 1. An attacker compromises the package publisher, package distribution channel, or another part of the dependency supply chain. 2. The attacker publishes a malicious version of `@bdtrans/trans-cli` under the legitimate package name. 3. A user or Agent installs the Skill dependency using the unversioned package declaration. 4. npm resolves and installs the attacker-controlled release. 5. Malicious lifecycle or CLI code executes with the permissions of the installation or Agent process. 6. The code can access resources available to that process, potentially including `TRANS_API_KEY`, documents selected for translation, downloa ...[truncated 969 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin `@bdtrans/trans-cli` to a specifically reviewed version rather than relying on the latest registry release, for example: ```json "package": "@bdtrans/trans-cli@<audited-exact-version>" ``` 2. Verify package provenance and integrity using an npm lockfile, registry integrity metadata, signed provenance where available, or an equivalent trusted manifest. 3. Re-audit the package and its transitive dependencies before changing the pinned version. 4. Use a trusted, explicitly configured npm registry and enforce package allowlisting in controlled environments. 5. Disable npm lifecycle scripts during installation where compatible with the package: ```bash npm install --ignore-scripts ``` 6. Run installation and translation under a dedicated, least-privileged account or sandbox with access restricted to the intended input and output directories. 7. Expose `TRANS_API_KEY` only to the translation process when needed, and avoid making unrelated credentials available in the same environment. 8. Apply outbound network restrictions so the CLI can communicate only with documented translation-service endpoints. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (3)

Missing User Warnings

High
Confidence
96% confidence
Finding
The skill handles uploaded documents and sends them to Baidu's external translation service, but the description does not clearly disclose that third-party transmission occurs. This can cause sensitive files to be exfiltrated outside the local agent environment without informed user consent, especially for confidential business, legal, medical, or personal documents.

Vague Triggers

Medium
Confidence
86% confidence
Finding
The manifest says to trigger when the user 'uploads or references a file and asks to translate it, or asks to convert a document's language,' which is broad and lacks negative examples or tighter constraints. This can cause unintended invocation for ordinary conversation about documents or translation requests that are not meant to use this specific skill.

Natural-Language Policy Violations

Medium
Confidence
72% confidence
Finding
The description mixes English with fixed Chinese phrasing ('文件翻译、文档翻译') and points to a Baidu-specific workflow, but it does not state that Chinese is optional or that locale handling is user-selectable. Under the stated policy, locale-specific behavior should be opt-in or clearly justified when constrained to a region or language.

Static analysis

No suspicious patterns detected.