Back to skill

Security audit

Crossborder Ecom Hub

Security checks for vulnerabilities and agentic risk

Overview

This skill matches its e-commerce management purpose, but it gives broad business-data and credential handling power without enough safeguards or disclosure.

Review carefully before installing. Use least-privilege API keys, avoid passing secrets via command-line flags, restrict permissions on ~/.crossborder-ecom/config.json, and do not run bulk sync, pricing apply, inventory sync, Feishu upload, or exports until you have a dry-run/backup/approval process and understand exactly which platforms and records will be changed or shared.

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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
src/platforms/index.js:330
Finding
Platform API Credentials Stored in Plaintext with Unrestricted Default Permissions<![CDATA[ ## Vulnerability Details **File Locations**: - `src/platforms/index.js:330-354` - `bin/cli.js:132-157` - `commands/platform.js:60-72` **Vulnerability Type**: Plaintext credential storage and command-line secret exposure **Risk Level**: Medium ### Vulnerable Code `src/platforms/index.js:330-354`: ```js _getConfigPath() { const path = require('path'); return path.join(process.env.HOME || process.env.USERPROFILE, '.crossborder-ecom', 'config.json'); } _loadConfig() { const fs = require('fs'); try { if (fs.existsSync(this.configPath)) { return JSON.parse(fs.readFileSync(this.configPath, 'utf-8')); } } catch (e) { console.error('Failed to load config:', e.message); } return { platforms: {} }; } _saveConfig() { const fs = require('fs'); const path = require('path'); const dir = path.dirname(this.configPath); if (!fs.existsSync(dir)) { fs.mkdirSync(dir, { recursive: true }); } fs.writeFileSync(this.configPath, JSON.stringify(this.config, null, 2)); } ``` `bin/cli.js:132-157`: ```js const configDir = path.join(process.env.HOME || process.env.USERPROFILE, '.crossborder-ecom'); if (!fs.existsSync(configDir)) { fs.mkdirSync(configDir, { recursive: true }); } const configPath = path.join(configDir, 'config.json'); const defaultConfig = { platforms: {}, feishu: { enabled: false, appId: '', appSecret: '', bitableToken: '' }, pricing: { defaultMargin: 30, strategy: 'competitive' }, inventory: { lowStockThreshold: 10, syncInterval: 300 } }; fs.writeFileSync(configPath, JSON.stringify(defaultConfig, null, 2)); ``` `commands/platform.js:60-72`: ```js const config = { name: platform, apiKey: options.apiKey || '', connected: false, createdAt: new Date().toISOString() }; await platformManager.addPlatform(config); ``` ### Technical Analysis The application instructs users to store commerce-platform and Feishu credentials in `~/.crossborder-ecom/config.jso ...[truncated 2232 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Create the configuration directory with owner-only permissions: ```js fs.mkdirSync(dir, { recursive: true, mode: 0o700 }); ``` 2. Create and update the configuration file with mode `0600`: ```js fs.writeFileSync( this.configPath, JSON.stringify(this.config, null, 2), { encoding: 'utf8', mode: 0o600 } ); fs.chmodSync(this.configPath, 0o600); ``` 3. Check and correct permissions on existing configuration files before loading them. Refuse to load files owned by an unexpected user where the platform supports ownership checks. 4. Remove the `--api-key` command-line option for secret entry. Use one of the following instead: - Hidden interactive input that does not echo the value. - Environment variables supplied through a protected runtime environment. - An operating-system credential manager or secrets service. 5. Prefer storing only non-sensitive configuration in JSON. Store secret values separately in a credential manager and reference them by identifier. 6. Warn users if plaintext credentials from an older configuration format are detected, then provide a migration and credential-rotation procedure. 7. Recommend least-privilege API credentials restricted to required accounts, operations, source addresses, and expiration periods. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
src/orders.js:101
Finding
Spreadsheet Formula Injection in CSV Order Exports<![CDATA[ ## Vulnerability Details **File Location**: `src/orders.js:101-122` **Vulnerability Type**: CSV/spreadsheet formula injection and incomplete CSV escaping **Risk Level**: Medium ### Vulnerable Code ```js _exportCSV(orders, outputPath) { const headers = ['Order ID', 'Platform', 'Status', 'Amount', 'Currency', 'Customer', 'Created At']; const rows = orders.map(order => [ order.id, order.platform, order.status, order.amount, order.currency || 'USD', order.customer?.name || '', new Date(order.createdAt).toLocaleString() ]); const csv = [ headers.join(','), ...rows.map(row => row.map(cell => `"${cell}"`).join(',')) ].join('\n'); fs.writeFileSync(outputPath, csv, 'utf-8'); return outputPath; } ``` ### Technical Analysis Order fields are inserted directly into CSV cells. Quoting a cell does not reliably stop spreadsheet applications from interpreting content beginning with characters such as `=`, `+`, `-`, or `@` as a formula. In a real platform integration, fields such as customer names, order identifiers, status text, or currency values may originate from external users or systems. An attacker who controls one of these values can place a formula payload in an exported cell. The implementation also does not escape embedded double-quote characters according to CSV rules. A quote should be represented as two quotes inside a quoted field. Without this escaping, attacker-controlled values can corrupt row and column boundaries or alter the apparent structure of the export. ### Attack Path 1. An attacker submits or influences an order field processed by the platform, such as a customer name beginning with a spreadsheet formula marker. 2. The commerce platform returns the attacker-controlled value as part of the order data. 3. A user runs the order export function, causing the untrusted value to be written directly to a CSV cell. 4. The user opens the exported file in spreadsheet software. 5. If that soft ...[truncated 979 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Use a maintained CSV serialization library rather than manually joining values. Configure it to quote and escape all fields correctly. 2. Convert every value to a string and neutralize formula-leading content before serialization. At minimum, treat values whose first non-whitespace character is `=`, `+`, `-`, or `@` as unsafe. 3. Prefix dangerous cells with an apostrophe or another format-specific neutralization character accepted by the target spreadsheet application: ```js function neutralizeSpreadsheetFormula(value) { const text = value == null ? '' : String(value); if (/^[\t\r\n ]*[=+\-@]/.test(text)) { return `'${text}`; } return text; } ``` 4. If manual CSV generation remains necessary, escape embedded quotes by replacing each `"` with `""` before surrounding the field with quotes: ```js function encodeCsvCell(value) { const safe = neutralizeSpreadsheetFormula(value); return `"${safe.replace(/"/g, '""')}"`; } ``` 5. Apply protection to every exported field, not only customer-controlled fields, because trust boundaries may change when real platform integrations replace the current mock implementations. 6. Add automated tests covering: - Formula markers after leading whitespace. - Embedded commas. - Embedded double quotes. - Newlines and carriage returns. - Null and undefined values. - Unicode and tab-prefixed formulas. 7. Document that order exports contain externally sourced data and should be treated as untrusted when opened in spreadsheet applications. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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
Findings (55)

Missing User Warnings

High
Confidence
97% confidence
Finding
The documentation includes commands to automatically apply pricing strategies, including aggressive pricing, without warning that these commands may modify live marketplace listings across connected platforms. In this context, unintended price changes can immediately affect revenue, trigger marketplace policy issues, or create exploitable underpricing at scale.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The document instructs users to configure API keys and run synchronization and reporting commands against multiple external commerce platforms and Feishu, but it does not clearly warn that these actions may transmit, modify, export, or overwrite business data. In the context of a cross-platform e-commerce automation skill, this omission can cause operators to perform high-impact actions without informed consent, increasing the risk of unintended data disclosure or destructive updates.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
The README promotes one-click bulk synchronization across multiple marketplaces and automatic Feishu data syncing without clearly warning that the command may create or modify live listings and transmit business data to external services. In an agent/skill context, users may treat examples as safe read-only operations, so missing consent and scope warnings increases the risk of unintended remote changes or data disclosure.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The README describes one-click pricing application and real-time inventory synchronization/update features without prominently warning that these actions can change live prices and stock levels on connected marketplaces. In a multi-platform e-commerce skill, accidental execution could cause financial loss, overselling, underselling, or operational disruption across several storefronts at once.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The skill explicitly promotes automatic multi-platform product, order, inventory, and Feishu synchronization but does not warn that potentially sensitive business data will be transmitted to multiple third-party services. In an e-commerce management context, silent cross-platform data propagation can expose commercial data, customer order information, or inventory state beyond what the user intended.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The quick-start flow recommends running a full sync with Feishu enabled immediately after setup, without any confirmation, preview, or warning about mass updates and external data sharing. This increases the chance of accidental bulk publication, overwriting catalog data, or sending operational data to Feishu before the user validates configuration and scope.

Natural-Language Policy Violations

Medium
Confidence
92% confidence
Finding
The command descriptions, help text, and user-facing guidance are predominantly fixed in Chinese, which imposes a specific language on all users. The file does not provide any option, locale detection, or documented opt-in that would let users choose another language.

Natural-Language Policy Violations

Medium
Confidence
92% confidence
Finding
The manifest’s user-facing description, tags, and feature names are presented entirely in Chinese, and there is no indication that the skill supports other languages or that Chinese is an intentional region-specific constraint. This can violate language/locale policy because it implicitly forces a specific language without user opt-in.

Natural-Language Policy Violations

Medium
Confidence
97% confidence
Finding
The file's description and all CLI prompts are written in Chinese, indicating the skill enforces a specific language for user interaction. The policy allows locale constraints only when users can opt in or when the regional limitation is clearly justified, neither of which is present here.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
When the --feishu option is used, the command sends the full orders collection to an external Feishu service without any visible warning, confirmation, redaction step, or indication of what fields are being transmitted. Because order records commonly contain sensitive business or customer data, this can cause unintended third-party disclosure if users enable sync without understanding the scope.

Natural-Language Policy Violations

Medium
Confidence
97% confidence
Finding
The command's natural-language interface, including prompts, status messages, and help text, is entirely in Chinese. This enforces a specific language for all users without offering a locale option or documenting that the tool is intentionally region-specific.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The remove operation deletes a configured platform immediately based solely on a command-line argument, with no confirmation prompt, dry-run mode, or undo protection. In a CLI that manages potentially important integration settings, this increases the risk of accidental or scripted destructive changes, causing service disruption or loss of configuration state.

Missing User Warnings

Medium
Confidence
87% confidence
Finding
When --feishu is supplied, the command sends pricing suggestions to an external Feishu integration without clearly warning the user at the time of execution about the outbound data transfer. In business tooling, pricing data can be commercially sensitive, so silent or poorly disclosed synchronization can cause unintended data exposure to third-party services.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The command applies pricing changes directly when --apply is used, with no confirmation, dry-run, or preview gate before modifying product prices. In an automation or CLI context, this increases the chance of accidental destructive changes from mistyped parameters, bad upstream data, or unsafe invocation by another tool.

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
This file presents its command description, progress messages, errors, and help output entirely in Chinese. That creates a language/locale policy concern because the skill effectively forces one language without offering opt-in, fallback, or justification for a Chinese-only audience.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The skill's description, status messages, and result output are all hard-coded in Chinese, including the command description and all console text. This imposes a specific language on users without any visible opt-in or locale selection, which matches the policy category for language/locale violations.

Natural-Language Policy Violations

Medium
Confidence
92% confidence
Finding
This code file contains extensive user-facing output and instructions in Chinese, including the demo banner, operational status messages, and next-step guidance. Because the skill does not offer an opt-in language selection or explain that it is intentionally limited to a Chinese-speaking audience, it conflicts with the language/locale policy criteria.

External Transmission

Medium
Category
Data Exfiltration
Content
const fetch = require('node-fetch');
    
    try {
      const response = await fetch('https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal', {
        method: 'POST',
        headers: { 'Content-Type': 'application/json' },
        body: JSON.stringify({
Confidence
70% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
This code sends business data to Feishu over network requests and can also create new tables remotely, which affects user data and external systems. Although there are success/failure logs, they do not disclose beforehand that the skill will transmit potentially sensitive records or create remote resources, and the comments/docstrings only describe syncing in general terms.

Missing User Warnings

Medium
Confidence
84% confidence
Finding
The methods `updateInventory` and `bulkUpdateInventory` perform direct inventory writes across one or more platforms, which can affect business data and may be difficult to reverse. While `syncInventory` includes some console logging, these update entry points themselves provide no confirmation prompt, user-facing warning, or explanatory comment/docstring indicating that they will modify live platform inventory.

Intent-Code Divergence

Medium
Confidence
97% confidence
Finding
`updateOrderStatus` claims to update order state but only logs the request and returns `{ success: true }` without calling any platform API or verifying the result. This can mislead callers into believing an order was changed when it was not, causing integrity issues, inconsistent workflow state, and potentially unsafe business actions such as shipping, refunds, or notifications based on false success.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
This code writes exported order data, including customer information, to local files via fs.writeFileSync. While the methods have internal comments, there is no user-facing confirmation, warning, or visible disclosure that potentially sensitive business/customer data will be persisted to disk.

Intent-Code Divergence

Medium
Confidence
94% confidence
Finding
The module comment describes a platform adapter that manages API connections for TikTok, Amazon, Shopee, and Lazada. However, the connect/getProducts/getOrders/createProduct methods are TODO-backed stubs that log messages or return mock data and synthetic success objects, which contradicts the stated behavior of actual API integration.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The platform manager persists the full configuration object, including platform credentials such as apiKey, to a predictable plaintext file under the user's home directory without any encryption, permission hardening, or secure-secret storage. If the host is shared, backed up insecurely, or compromised by another local process, those credentials can be recovered and used to access connected e-commerce platforms.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The function applies bulk price changes across products and platforms immediately, without any preview, confirmation, dry-run, approval gate, or per-item validation. In an agent/automation context, this can cause large-scale unintended modifications to business-critical data if invoked with bad parameters or incomplete upstream analysis.

Static analysis

Detected: suspicious.env_credential_access, suspicious.exposed_secret_literal

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
src/feishu.js:10

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
src/feishu.js:43