Back to skill

Security audit

Logistics Manager

Security checks for vulnerabilities and agentic risk

Overview

This logistics skill mostly matches its stated purpose, but it exposes high-impact logistics and CRM actions with weak scoping, unsafe temporary code execution, and overbroad file operations.

Review before installing or deploying. Use only in a controlled local environment unless authentication, authorization, recipient validation, upload limits, archive path confinement, secure temp-file handling, and packaged or integrity-checked OKKI helpers are added.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Tool Hijacking and SpoofingModifies or replaces tools so legitimate-looking calls execute attacker logic
  • 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
Findings (5)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
api/routes/logistics_routes.js:18
Finding

Public API permits unauthorized access, mutation, and CRM synchronization

Content
View full analysis
{ try { const recordData = req.body; const result = await logisticsAPI.createLogisticsRecord(recordData); res.status(201).json({ success: true, data: result }); } catch (e) { res.status(400).json({ success: false, error: e.message }); } }); router.get('/', async (req, res) => { try { const filters = req.query; const result = await logisticsAPI.listLogisticsRecords(filters); res.json({ success: true, data: result }); } catch (e) { res.status(500).json({ success: false, error: e.message }); } }); router.get('/:id', async (req, res) => { try { const logisticsId = req.params.id; const result = await logisticsAPI.getLogisticsDetails(logisticsId); if (!result) { return res.status(404).json({ success: false, error: 'Logistics record not found' }); } res.json({ success: true, data: result }); } catch (e) { res.status(500).json({ success: false, error: e.message }); } }); router.put('/:id/status', async (req, res) => { try { const logisticsId = req.params.id; const { newStatus, syncToOKKI } = req.body; const result = await logisticsAPI.updateLogisticsStatus( logisticsId, newStatus ); if (syncToOKKI) { try { await autoNotificationService.autoNotifyOnStatusChange( logisticsId, newStatus, true ); } catch (notifyError) { console.warn('Automatic notification failed:', notifyError.message); } } res.json({ success: true, data: result }); } catch (e) { res.status(400).json({ success: false, er ...[truncated 3260 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
api/controllers/okki_sync_controller.js:220
Finding

Attacker-controlled data is interpolated into generated Python source code

Content
View full analysis
{ const pythonPath = 'python3'; const fullArgs = [scriptPath, ...args]; execFile(pythonPath, fullArgs, { timeout: options.timeout || 15000, env: { ...process.env, PYTHONIOENCODING: 'utf-8' } }, (error, stdout, stderr) => { if (error) { reject(new Error(`Python execution failed: ${error.message}\n${stderr}`)); return; } try { const result = JSON.parse(stdout); resolve(result); } catch (e) { resolve({ raw: stdout, stderr }); } }); }); } ``` ### Technical Analysis The function constructs executable Python source by directly interpolating `companyId` and `content`. The `companyId` is not quoted, encoded, or validated before insertion. It originates from parsed output returned by the external OKKI CLI. If that result is compromised or attacker-controlled, Python expressions or statements can be injected into the generated program. The manual replacement performed on `content` is not a safe source-c ...[truncated 1800 chars]
Remediation
View remediation

T07 · Tool Hijacking and Spoofing

Error
Location
api/controllers/okki_sync_controller.js:11
Finding

Core synchronization behavior executes mutable code outside the audited package

Content
View full analysis
{ const fullArgs = [CONFIG.okkiCliPath, ...args]; execFile('python3', fullArgs, { timeout: options.timeout || 15000, env: { ...process.env, PYTHONIOENCODING: 'utf-8' } }, (error, stdout, stderr) => { if (error) { reject(new Error(`OKKI CLI execution failed: ${error.message}\n${stderr}`)); return; } try { const result = JSON.parse(stdout); resolve(result); } catch (e) { resolve({ raw: stdout, stderr }); } }); }); } ``` ```js function loadLogisticsAPI() { try { const logisticsAPI = require( CONFIG.logisticsModulePath + '/api/logistics_api.js' ); return logisticsAPI; } catch (error) { console.warn('Failed to load logistics module:', error.message); return null; } } ``` ```js const tempScript = ` import sys sys.path.insert(0, '/Users/wilson/.openclaw/workspace/xiaoman-okki/api') from okki_client import OKKIClient import json `.trim(); ``` ### Technical Analysis Security-critical behavior is delegated to Python files and a Node.js module outside the project directory. These external files are not represented in the supplied package or dependency lockfile and therefore are not covered by this audit. A party able ...[truncated 1472 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/bol-archive.js:27
Finding

Bill-of-lading archive functions allow operations outside the archive boundary

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
api/upload-bol.js:7
Finding

Bill-of-lading upload middleware lacks file size and content restrictions

Content
View full analysis
{ const uploadPath = path.join(__dirname, '..', 'documents', 'bill_of_lading'); fs.mkdirSync(uploadPath, { recursive: true }); cb(null, uploadPath); }, filename: (req, file, cb) => { cb(null, `${Date.now()}-${file.originalname}`); } }); const uploadBol = multer({ storage: bolStorage }); ``` ### Technical Analysis The Multer configuration does not define `limits.fileSize`, a file-count limit, a MIME-type allowlist, content-signature validation, or a random server-generated filename. As a result, any route that mounts this middleware would accept arbitrary content and potentially very large files. The destination is inside the application project tree. Preserving the original filename can introduce unsafe characters, ambiguous extensions, collisions, and operational problems, even where the multipart parser strips path components. The reviewed repository exports this middleware but does not mount it in the included router. Exploitation therefore depends on downstream integration. ### Attack Path 1. An application route mounts the exported `uploadBol` middleware. 2. An attacker reaches that route and repeatedly submits oversized files. 3. Multer streams the files to disk without an application-defined size limit. 4. Disk capacity or filesystem quotas are exhausted. 5. Alternatively, the attacker stores arbitrary non-PDF content under attacker-influenced names in the application tree. ### Impact Assessment The primary impact is denial of service through disk exhaustion. Secondary impact includes arbitrary-content storage, filename collisions, unsafe downstream processing, and possible exposure if the upload directory is later served as static content. The exa ...[truncated 100 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (49)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Undeclared local filesystem read/write/delete capability is security-relevant because it expands the skill's ability to modify or remove data outside the user's expected logistics functions. When combined with inaccurate feature claims, this makes the skill context more dangerous by obscuring a materially different privilege profile.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

Undeclared local filesystem read/write/delete capability is security-relevant because it expands the skill's ability to modify or remove data outside the user's expected logistics functions. When combined with inaccurate feature claims, this makes the skill context more dangerous by obscuring a materially different privilege profile.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

Undeclared local filesystem read/write/delete capability is security-relevant because it expands the skill's ability to modify or remove data outside the user's expected logistics functions. When combined with inaccurate feature claims, this makes the skill context more dangerous by obscuring a materially different privilege profile.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

Undeclared local filesystem read/write/delete capability is security-relevant because it expands the skill's ability to modify or remove data outside the user's expected logistics functions. When combined with inaccurate feature claims, this makes the skill context more dangerous by obscuring a materially different privilege profile.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

Undeclared local filesystem read/write/delete capability is security-relevant because it expands the skill's ability to modify or remove data outside the user's expected logistics functions. When combined with inaccurate feature claims, this makes the skill context more dangerous by obscuring a materially different privilege profile.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Undeclared local filesystem read/write/delete capability is security-relevant because it expands the skill's ability to modify or remove data outside the user's expected logistics functions. When combined with inaccurate feature claims, this makes the skill context more dangerous by obscuring a materially different privilege profile.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Undeclared local filesystem read/write/delete capability is security-relevant because it expands the skill's ability to modify or remove data outside the user's expected logistics functions. When combined with inaccurate feature claims, this makes the skill context more dangerous by obscuring a materially different privilege profile.

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

md
node cli/logistics_cli.js <command> [args]

Known Vulnerable Dependency: brace-expansion==1.1.12 — 4 advisory(ies): CVE-2026-13149 (brace-expansion: DoS via exponential-time expansion of consecutive non-expanding); CVE-2026-33750 (brace-expansion: Zero-step sequence causes process hang and memory exhaustion); CVE-2026-14257 (brace-expansion: DoS via unbounded expansion length causing an out-of-memory pro) +1 more

High
Category
Supply Chain
Confidence
95% confidence
Finding

The lockfile pins brace-expansion 1.1.12, which is flagged for multiple denial-of-service issues involving pathological brace patterns that can trigger excessive CPU or memory consumption. Even though package-lock.json is not executable code, shipping this dependency means any code path that processes attacker-influenced glob or brace patterns through this transitive chain could be abused to degrade availability.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: brace-expansion==2.0.2 — 4 advisory(ies): CVE-2026-13149 (brace-expansion: DoS via exponential-time expansion of consecutive non-expanding); CVE-2026-33750 (brace-expansion: Zero-step sequence causes process hang and memory exhaustion); CVE-2026-14257 (brace-expansion: DoS via unbounded expansion length causing an out-of-memory pro) +1 more

High
Category
Supply Chain
Confidence
94% confidence
Finding

The lockfile also includes brace-expansion 2.0.2, which is reported vulnerable to several DoS conditions from crafted expansion input. In a logistics skill that handles filenames, archives, spreadsheets, and document automation, transitive globbing or archive enumeration may end up processing untrusted patterns, making availability impact plausible.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: tmp==0.2.5 — 1 advisory(ies): CVE-2026-44705 (tmp has Path Traversal via unsanitized prefix/postfix that enables directory esc)

High
Category
Supply Chain
Confidence
88% confidence
Finding

The lockfile contains tmp 0.2.5, and the cited advisory indicates path traversal risk when unsanitized prefix or postfix values are used to create temporary files or directories. This skill's context explicitly mentions automated document processing, which commonly creates temporary files for spreadsheets, archives, and customs documents, so misuse could allow writes outside intended temp locations if user-controlled path fragments are passed through.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

deleteBol(filePath) deletes any existing path provided by the caller with no restriction to archived BOL files. If this function is reachable through automation, agent actions, or user-controlled inputs, an attacker could remove arbitrary application files, data, logs, or system files, causing data loss or service disruption.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
80% confidence
Finding

The skill advertises runtime use of environment-based configuration but does not declare any explicit tool scope or permissions boundary. In a skill ecosystem, missing scope declarations reduce transparency and can allow broader-than-expected access to sensitive configuration or secrets, making review and enforcement harder.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

Referencing OKKI customer-data synchronization and automated document processing without a warning about data transmission, third-party handling, or user-data impact creates a real privacy and security transparency issue. Users may authorize the skill without understanding that customer records or documents could be transferred, transformed, or exposed.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This code automatically sends customer and shipment details by email and can additionally sync the record to OKKI CRM without any authorization, consent, recipient validation, or policy checks visible in this file. In a logistics context, those messages can contain sensitive commercial and personal data, so triggering this path on status changes increases the chance of unauthorized disclosure or privacy/compliance violations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The controller sends order, shipment, port, bill-of-lading, and notes data to an external OKKI system by invoking a CLI, and similar transmission occurs again in the Python fallback path. Although the file comments describe synchronization, there is no confirmation prompt or explicit user-facing disclosure at the point where this potentially sensitive business data is exported.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The controller dynamically generates a Python script in /tmp containing logistics/customer data and then executes it. Although execFile avoids shell injection, this design introduces unnecessary code-execution surface, risks code/script injection through improperly escaped content, and exposes sensitive data via a world-accessible temporary file path pattern.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The temporary Python script written to /tmp embeds shipment follow-up content directly, creating a plaintext local artifact containing potentially sensitive logistics and customer data. On multi-user systems or if temp directories are monitored/backed up, this can leak data beyond the intended integration path.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This code uses Chinese-only natural-language strings in comments and thrown errors, such as the storage note and validation message, with no indication that the skill is intentionally limited to Chinese-speaking users. Under the policy, forcing a specific language without opt-in or documented justification is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The not-found errors in multiple functions are emitted only in Chinese, which imposes a locale constraint on users without opt-in. No nearby documentation explains that this is a region- or language-specific skill, so this conflicts with the language/locale policy.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The manifest describes functions centered on 提单生成、报关单据生成、物流跟踪, plus OKKI sync and automated document processing. This route module instead provides creation/listing/detail/status-update APIs for generic logistics records and email notification triggers, which materially expands behavior beyond the described document-generation and tracking scope.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This route is marked public and triggers synchronization of logistics data to an external OKKI system with no authentication, authorization, or consent checks visible in this file. In a logistics context, that can expose shipment/customer data to third parties and allow unauthorized external data propagation or integrity-impacting sync actions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This public endpoint sends notification emails and can optionally sync data to OKKI based on request input, with no visible access control or restrictions on recipients. An attacker could trigger unauthorized outbound emails, leak logistics information to arbitrary recipients, or cause unapproved transmission to an external platform.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This code stores uploaded files on the local filesystem using multer disk storage and creates the destination directory if needed. While the function has an internal comment/docblock, there is no confirmation prompt, logging, or explicit user-facing disclosure in this file that uploaded content will be persisted to disk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This JavaScript CLI presents its name, feature descriptions, prompts, help text, and user-facing messages entirely in Chinese, and later also formats timestamps with the fixed locale 'zh-CN'. That constitutes a natural-language locale policy issue because the skill forces a specific language/locale rather than offering user choice or documenting a justified regional constraint.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.dangerous_exec

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
api/controllers/okki_sync_controller.js:41

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
test/e2e_test.js:75