Back to skill

Security audit

跨境本地化 Cross-border Localize

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly fits e-commerce localization, but it needs Review because one provider can send API keys and uploaded images to an arbitrary environment-configured endpoint.

Install only if you are comfortable sending product prompts and reference images to the selected generation provider. Avoid using confidential assets with the Ark provider unless ARK_BASE_URL is unset or explicitly pinned to a trusted HTTPS Ark endpoint, and prefer a reviewed/pinned dLazy CLI installation over the unpinned global npm command.

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

Error
Location
scripts/lib/providers.mjs:294
Finding
Unrestricted Ark endpoint override can disclose API credentials and user images## Vulnerability Details **File Location**: `scripts/lib/providers.mjs:294-301` **Vulnerability Type**: Unvalidated sensitive-data destination **Risk Level**: High ### Vulnerable Code ```js const base = env.ARK_BASE_URL || 'https://ark.cn-beijing.volces.com/api/v3' const body = { model: ark.model(), prompt: req.prompt, size: req.size || '2K', response_format: 'url', watermark: false, } if (req.images?.length) body.image = await Promise.all(req.images.map(asDataUri)) const j = await postJson(`${base}/images/generations`, body, { authorization: `Bearer ${env.ARK_API_KEY}` }, req.timeoutMs) ``` ### Technical Analysis `ARK_BASE_URL` is taken directly from the process environment and used as the destination for an authenticated HTTP request. The value is not validated for: - An HTTPS scheme - An approved Ark hostname - Embedded URL credentials - Redirect or destination trust boundaries - Plaintext HTTP transport The request carries `ARK_API_KEY` as a bearer credential. It also includes the generation prompt and, when reference images are supplied, base64 or data-URI representations of local image files. Uploading prompts and selected images is necessary for cloud-based image generation. Allowing the same sensitive request to be redirected to an arbitrary endpoint is not required by the declared localization functionality and exceeds the minimum necessary trust boundary. ### Attack Path 1. An attacker influences the environment used to launch the Skill, such as through a poisoned shell configuration, CI variable, wrapper script, or deployment configuration. 2. The attacker sets `ARK_BASE_URL` to an attacker-controlled URL, potentially using plaintext HTTP. 3. The user invokes `scripts/gen.mjs` with the Ark provider, a valid `ARK_API_KEY`, and one or more proprietary reference images. 4. `asDataUri()` reads and encodes the selected local images. 5. The script sends the bearer API key, prompt, mode ...[truncated 763 chars]
Remediation
## Remediation Suggestions 1. Parse the configured endpoint using `new URL()` before making any request. 2. Require the `https:` scheme and reject plaintext HTTP. 3. Reject URLs containing embedded usernames or passwords. 4. Allowlist official Ark API hostnames by default. 5. If private gateways must be supported, require an explicit opt-in flag and a separate credential intended for that gateway. 6. Display the resolved hostname before uploading local files, especially when it differs from the official provider. 7. Disable automatic redirect following for authenticated requests, or validate every redirect destination before forwarding authorization headers. 8. Add automated tests confirming that HTTP URLs, malformed URLs, and unapproved hosts are rejected. 9. Document that prompts and reference images are uploaded to the resolved provider endpoint.

T08 · Insecure Dependencies

Warning
Location
scripts/lib/providers.mjs:108
Finding
Third-party CLI installation guidance permits execution of unreviewed package code## Vulnerability Details **File Location**: `scripts/lib/providers.mjs:108-115`; `references/provider-cli.md:66-71` **Vulnerability Type**: Unpinned or remotely retrieved executable dependency **Risk Level**: Medium ### Vulnerable Code Runtime installation guidance: ```js ps.on('error', (e) => { clearTimeout(timer) reject(new Error( e.code === 'ENOENT' ? `dlazy command not found. Install it with: npm i -g @dlazy/cli, or use another provider` : e.message)) }) ``` Provider documentation: ```bash npx @dlazy/cli@1.2.3 <command> ``` The original runtime message recommends `npm i -g @dlazy/cli` without an exact version. The documented `npx` alternative pins a version but still downloads and executes code that is not included in the audited project. ### Technical Analysis The default provider invokes an external `dlazy` executable through `spawn()`. If it is absent, the error guidance recommends installing the latest globally resolved version of `@dlazy/cli`. Because no exact version or integrity digest is specified in that path, the code ultimately executed can change after this Skill has been reviewed. npm package installation and `npx` execution may run package lifecycle or runtime code with the permissions of the invoking user. The external CLI may also access its local authentication configuration and receives user prompts and image paths as command-line arguments. The repository does not include a lockfile, package integrity value, vendored executable, or local source copy establishing that the downloaded CLI is the same code that was reviewed. The documentation names the dependency and uses an exact version for the `npx` alternative, which reduces ambiguity, but does not eliminate the remote package execution trust boundary. ### Attack Path 1. The `dlazy` executable is not installed. 2. The user follows the runtime recommendation and runs the unpinned global npm installatio ...[truncated 1193 chars]
Remediation
## Remediation Suggestions 1. Replace the unpinned global installation instruction with an exact, reviewed version. 2. Publish and verify an integrity digest or signed release artifact before execution. 3. Use a lockfile for the CLI and its transitive dependencies where practical. 4. Prefer a vendored, reviewed executable or a project-local dependency over a mutable global installation. 5. Disable npm lifecycle scripts during installation where compatible with the package. 6. Document clearly that the CLI is an external executable outside this Skill’s audit boundary. 7. Run the CLI with least privilege and isolate it from unrelated credentials and files. 8. Periodically review the pinned package version and its transitive dependency tree before upgrading.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (11)

Description-Behavior Mismatch

High
Confidence
94% confidence
Finding
The file implements a generic media-generation/router layer for image and video providers, which materially exceeds the skill’s declared purpose of cross-border localization, translation, sizing conversion, and compliance labeling. This capability mismatch is dangerous because it enables broad outbound content generation and third-party transmission of user prompts/images under a benign localization label, reducing user and reviewer awareness of the true behavior.

Context-Inappropriate Capability

Medium
Confidence
89% confidence
Finding
Support for video-style outputs is not justified by the stated localization use case and expands the attack surface beyond expected functionality. In context, this increases risk of covert misuse, unexpected data handling, and policy bypass because users invoking a localization skill would not reasonably expect video-generation pathways.

Description-Behavior Mismatch

Medium
Confidence
90% confidence
Finding
The skill metadata says cross-border localization should produce multilingual copy, size conversion tables, and regional compliance markings, which are primarily text/compliance outputs. Configuring the task as an image-generation job creates a capability mismatch that can cause the system to fabricate regulatory marks or compliance visuals as images instead of generating validated text/compliance data, increasing the risk of misleading or noncompliant output in cross-border commerce.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The configuration hard-codes a model as an 'East Asian woman' for all generated assets, which bakes a protected demographic attribute into the skill without any user choice, business justification, or locale-specific rationale. In a cross-border localization skill, this can systematically steer outputs toward a single ethnicity across regions, creating bias, exclusion, and potential discrimination or brand/legal risk when deployed at scale.

Missing User Warnings

Medium
Confidence
87% confidence
Finding
This helper performs outbound HTTP POST requests carrying request bodies that may include user prompts, images, and other task inputs, but the code contains no notice, consent flow, or minimization logic. In a localization-branded skill, undisclosed transfer of potentially sensitive product assets to external providers is a meaningful privacy and trust risk.

Natural-Language Policy Violations

Medium
Confidence
97% confidence
Finding
A task explicitly named remove-watermark enables removal of ownership or provenance marks without any stated authorization check, rights validation, or permitted-use restriction. In an image-processing skillset, this materially lowers the barrier to copyright circumvention, laundering third-party assets, and erasing attribution or usage controls.

External Transmission

Medium
Category
Data Exfiltration
Content
: await readFile(p)
        fd.append('image[]', new Blob([buf], { type: mimeOf(p) }), path.basename(p))
      }
      r = await fetch('https://api.openai.com/v1/images/edits', {
        method: 'POST', headers: { authorization: `Bearer ${key}` }, body: fd,
      })
    } else {
Confidence
91% confidence
Finding
This finding points to the same outbound OpenAI edit request that transmits user-supplied images and prompts to a third party. The danger comes from undisclosed off-platform processing of potentially sensitive commercial assets under a misleadingly narrow skill description.

External Transmission

Medium
Category
Data Exfiltration
Content
method: 'POST', headers: { authorization: `Bearer ${key}` }, body: fd,
      })
    } else {
      r = await fetch('https://api.openai.com/v1/images/generations', {
        method: 'POST',
        headers: { authorization: `Bearer ${key}`, 'content-type': 'application/json' },
        body: JSON.stringify({
Confidence
89% confidence
Finding
This is the same generation request path to OpenAI and represents real external transmission of user prompt content. The skill context makes it more concerning because broad media generation is not clearly disclosed by the declared localization functionality.

External Transmission

Medium
Category
Data Exfiltration
Content
: await readFile(p)
        fd.append('image[]', new Blob([buf], { type: mimeOf(p) }), path.basename(p))
      }
      r = await fetch('https://api.openai.com/v1/images/edits', {
        method: 'POST', headers: { authorization: `Bearer ${key}` }, body: fd,
      })
    } else {
Confidence
91% confidence
Finding
This finding points to the same outbound OpenAI edit request that transmits user-supplied images and prompts to a third party. The danger comes from undisclosed off-platform processing of potentially sensitive commercial assets under a misleadingly narrow skill description.

External Transmission

Medium
Category
Data Exfiltration
Content
method: 'POST', headers: { authorization: `Bearer ${key}` }, body: fd,
      })
    } else {
      r = await fetch('https://api.openai.com/v1/images/generations', {
        method: 'POST',
        headers: { authorization: `Bearer ${key}`, 'content-type': 'application/json' },
        body: JSON.stringify({
Confidence
89% confidence
Finding
This is the same generation request path to OpenAI and represents real external transmission of user prompt content. The skill context makes it more concerning because broad media generation is not clearly disclosed by the declared localization functionality.

External Transmission

Medium
Category
Data Exfiltration
Content
const input = { prompt: req.prompt, num_outputs: req.batch }
    if (req.images?.length) input.input_image = await asDataUri(req.images[0])
    const j = await postJson(
      `https://api.replicate.com/v1/models/${replicate.model(req)}/predictions`,
      { input },
      { authorization: `Bearer ${env.REPLICATE_API_TOKEN}`, prefer: 'wait' },
      req.timeoutMs,
Confidence
90% confidence
Finding
This postJson call sends prompts and possibly input_image data to Replicate, which is a real third-party data transfer. Given the skill’s localization framing, this expands hidden exposure of user assets and content to an external vendor without any visible trust boundary management in this file.

Static analysis

Detected: suspicious.dangerous_exec, suspicious.env_credential_access

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/lib/providers.mjs:104

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
scripts/gen.mjs:118

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
scripts/lib/providers.mjs:21