Back to skill

Security audit

Logistics

Security checks for vulnerabilities and agentic risk

Overview

The skill is a parcel-tracking helper, but it returns simulated tracking data while storing shipment identifiers locally in ways that are not clearly disclosed or reliably cleared.

Review this skill carefully before installing. It should not be used for real delivery decisions unless live courier integration is added and mock output is clearly labeled. Users should also be told that tracking numbers and results are retained locally, that clearing data currently does not erase the main database, and that dependency versions should be pinned.

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

T09 · Insecure Skill Coding Practices

Warning
Location
logistics.py:87
Finding

Shipment Data Is Persisted in an Unprotected Plaintext SQLite Database

Content
View full analysis
sqlite3.Connection: """Initialize the database.""" conn = sqlite3.connect(str(DB_FILE)) cursor = conn.cursor() cursor.execute(''' CREATE TABLE IF NOT EXISTS history ( id INTEGER PRIMARY KEY AUTOINCREMENT, tracking_number TEXT NOT NULL, carrier_code TEXT, carrier_name TEXT, status TEXT, result TEXT, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ) ''') cursor.execute(''' CREATE TABLE IF NOT EXISTS subscriptions ( id INTEGER PRIMARY KEY AUTOINCREMENT, tracking_number TEXT NOT NULL UNIQUE, carrier_code TEXT, last_status TEXT, notify_enabled BOOLEAN DEFAULT 1, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ) ''') conn.commit() return conn ``` ```python def _save_history(self, result: TrackingResult): """Save query history.""" cursor = self.db.cursor() cursor.execute(''' INSERT INTO history (tracking_number, carrier_code, carrier_name, status, result) VALUES (?, ?, ?, ?, ?) ''', ( result.tracking_number, result.carrier_code, result.carrier_name, result.status, json.dumps( result.__dict__, default=lambda x: x.__dict__ if hasattr(x, '__dict__') else str(x) ) )) self.db.commit() ``` ### Technical Analysis Tracking numbers, courier details, shipment status, and serialized tracking results are written directly to `logistics.db` without encryptio ...[truncated 1576 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
logistics.py:365
Finding

The Privacy Clear Operation Leaves Shipment History and Subscriptions Intact

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
security.py:56
Finding

Unvalidated Storage Filenames Permit Path Traversal Outside the Secure Directory

Content
View full analysis
dict: """Load an encrypted JSON file.""" filepath = self.base_dir / filename if not filepath.exists(): return {} with open(filepath, 'r', encoding='utf-8') as f: encrypted = f.read() json_str = self.decrypt(encrypted) return json.loads(json_str) def save_file(self, filename: str, content: str): """Save an encrypted file.""" filepath = self.base_dir / filename encrypted = self.encrypt(content) with open(filepath, 'w', encoding='utf-8') as f: f.write(encrypted) os.chmod(filepath, 0o600) def load_file(self, filename: str) -> str: """Load an encrypted file.""" filepath = self.base_dir / filename if not filepath.exists(): return "" with open(filepath, 'r', encoding='utf-8') as f: encrypted = f.read() return self.decrypt(encrypted) def delete(self, filename: str): """Delete a file.""" filepath = self.base_dir / filename if filepath.exists(): filepath.unlink() ``` ### Technical Analysis The public storage methods append an unrestricted `filename` to `self.base_dir`. They do not reject: - Absolute paths; - Parent-directory components such as `../`; - Symbolic-link destinations; - Paths that resolve outside the intended secure-storage directory. With `pathlib`, joining a base path to an absolute path discards the base path. Relative traversal components can similarly escape the intended direc ...[truncated 2136 chars]
Remediation
View remediation
Path: candidate_name = Path(filename) if candidate_name.is_absolute(): raise ValueError("Absolute paths are not allowed") base = self.base_dir.resolve() candidate = (base / candidate_name).resolve(strict=False) if candidate != base and base not in candidate.parents: raise ValueError("Path escapes the secure storage directory") return candidate ``` 2. Replace every instance of `self.base_dir / filename` with `self._safe_path(filename)`. 3. If nested paths are unnecessary, accept only a simple basename and reject path separators and `..`. 4. Do not follow symbolic links when opening or deleting sensitive files. Where available, use descriptor-based operations and flags such as `O_NOFOLLOW`. 5. Use atomic file creation or replacement with restrictive permissions from creation time, rather than applying `chmod` only after writing. 6. Ensure callers never pass user-controlled path strings without validation. 7. Add tests covering absolute paths, `../` traversal, nested traversal, symbolic links, and valid filenames. ]]>
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (27)

Tp4

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

The skill is presented as a simple logistics-query assistant, but the detected capabilities include encrypted local storage, key generation and management, and broad filesystem operations. Hidden key management and file operations materially expand the attack surface: they can enable covert data persistence, mishandling of sensitive shipment information, or unsafe interaction with local files beyond what users would expect from package tracking.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill is presented as a simple logistics-query assistant, but the detected capabilities include encrypted local storage, key generation and management, and broad filesystem operations. Hidden key management and file operations materially expand the attack surface: they can enable covert data persistence, mishandling of sensitive shipment information, or unsafe interaction with local files beyond what users would expect from package tracking.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The module-level description claims multi-courier tracking support, but the implementation only emits mock data. This mismatch is dangerous because it causes users and integrating agents to trust outputs as real logistics intelligence when they are synthetic.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The advertised core function is live parcel tracking, but the query path returns fabricated example events and statuses instead of real provider data. In a logistics skill, false shipment status can mislead users into unsafe or costly decisions, such as missing deliveries, delaying claims, or trusting nonexistent updates.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
86% confidence
Finding

The skill metadata declares no explicit tool restrictions, yet the detected implementation apparently uses powerful capabilities including filesystem access, network access, and shell execution. For a logistics-tracking skill, leaving these capabilities undeclared and unconstrained increases the risk of unintended data access, command execution, or network misuse if the underlying code is invoked unexpectedly or compromised.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The activation description says to use the skill whenever the user asks about package tracking, tracking numbers, courier identification, or shipment progress, which is broad enough to match many common support conversations. The file does not provide explicit exclusions or negative examples to clarify when the skill should not activate.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module description and user-facing strings are written entirely in Chinese, which effectively forces a specific language for interaction. There is no indication that the tool is region-specific by policy or that users can opt into another language.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The skill initializes local persistence for history and subscriptions beyond the minimally necessary scope of answering a logistics query. Storing tracking numbers and shipment results increases the privacy footprint and creates unnecessary retention of potentially sensitive user activity data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

Tracking numbers and full query results are written to a local SQLite database without an up-front user warning or explicit consent. Shipment identifiers and delivery history can reveal personal purchasing activity, addresses, timing, and other sensitive logistics metadata if the host is shared or compromised.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The subscription feature persists tracking numbers for future reminders without clearly informing the user that these identifiers will be stored. Persistent storage of shipment data expands the attack surface and may expose sensitive logistics activity over time.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
82% confidence
Finding

The manifest describes a parcel logistics assistant, but the CLI includes privacy info, clear, and export actions that inspect storage metadata and export local data to disk. These are data-administration capabilities rather than direct logistics-query capabilities, and they are not justified by the manifest description.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest describes a skill for querying and explaining parcel logistics across courier providers, but this file implements a general-purpose encrypted local storage subsystem with key management, file save/load, deletion, enumeration, and metadata inspection. Persistent secure storage is not an obvious or declared user-facing part of package tracking or courier identification, so this expands behavior beyond the described logistics scope.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

Beyond merely storing data needed for logistics lookups, the module exposes capabilities to delete arbitrary named files in its storage area, clear all stored data, and list file metadata. For a skill whose purpose is package tracking and shipment explanation, these local file-management capabilities are not directly justified by the manifest's stated scope.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This code includes file deletion operations in both delete and clear_all, including a bulk-delete path that removes all stored files. Although the methods have brief docstrings, there is no user-facing confirmation, logging, or visible disclosure that data will be permanently removed.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
97% confidence
Finding

The dependency uses a lower-bound version specifier instead of a pinned version, which makes builds non-reproducible and allows different environments to resolve to different aiohttp releases. In a logistics skill that likely performs network requests, this increases supply-chain uncertainty and makes it harder to verify whether a deployed version is patched against known aiohttp issues.

Content

Scanner excerpt · requirements.txt (reported line 1)May include surrounding context.

text
aiohttp>=3.9.0
aiofiles>=23.2.0
cryptography>=42.0.0
qrcode>=7.4.0

Unverifiable Dependency: aiohttp has 16 known advisory(ies) (CVE-2024-52303 (aiohttp has a memory leak when middleware is enabled when requesting a resource ); CVE-2026-54279 (aiohttp: Host-Only Cookies Become Domain Cookies After CookieJar Persistence); CVE-2026-34514 (AIOHTTP has CRLF injection through multipart part content type header constructi) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
96% confidence
Finding

aiohttp has known advisories, and because the manifest does not pin an exact version, it is impossible to determine from this file whether deployment will use a patched or vulnerable release. This is more significant in a logistics skill because aiohttp is likely used for outbound courier API calls and network-facing request handling.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
95% confidence
Finding

Using aiofiles>=23.2.0 permits any newer release, so installations are not deterministic and may unexpectedly pull in a vulnerable or breaking version. While this package is less security-sensitive than networking or image parsing libraries, unpinned dependencies still weaken supply-chain control.

Content

Scanner excerpt · requirements.txt (reported line 2)May include surrounding context.

text
aiohttp>=3.9.0
aiofiles>=23.2.0
cryptography>=42.0.0
qrcode>=7.4.0
pyzbar>=0.1.9

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
98% confidence
Finding

cryptography is a security-critical package, and specifying only a minimum version means the actual installed release may vary across environments. That undermines assurance around cryptographic behavior and patch status, especially because this package has a history of security advisories.

Content

Scanner excerpt · requirements.txt (reported line 3)May include surrounding context.

text
aiohttp>=3.9.0
aiofiles>=23.2.0
cryptography>=42.0.0
qrcode>=7.4.0
pyzbar>=0.1.9
opencv-python>=4.9.0

Unverifiable Dependency: cryptography has 16 known advisory(ies) (GHSA-39hc-v87j-747x (Vulnerable OpenSSL included in cryptography wheels); CVE-2023-50782 (Python Cryptography package vulnerable to Bleichenbacher timing oracle attack); GHSA-537c-gmf6-5ccf (Vulnerable OpenSSL included in cryptography wheels) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
97% confidence
Finding

cryptography has a substantial advisory history, and the lack of an exact version makes the actual security posture unverifiable. Because cryptography underpins sensitive operations when used, uncertainty around its version is a meaningful security weakness rather than mere housekeeping.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
94% confidence
Finding

qrcode is not typically high-risk by itself, but leaving it unpinned still creates non-reproducible builds and avoidable supply-chain exposure. A future release could introduce a security issue or behavior change that reaches production unintentionally.

Content

Scanner excerpt · requirements.txt (reported line 4)May include surrounding context.

text
aiohttp>=3.9.0
aiofiles>=23.2.0
cryptography>=42.0.0
qrcode>=7.4.0
pyzbar>=0.1.9
opencv-python>=4.9.0
pillow>=10.2.0

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
94% confidence
Finding

pyzbar is unpinned, so dependency resolution may vary and could introduce vulnerable or incompatible versions without explicit review. Because barcode parsing may process user-supplied images in a logistics context, even low-level parser dependencies deserve stricter version control.

Content

Scanner excerpt · requirements.txt (reported line 5)May include surrounding context.

text
aiofiles>=23.2.0
cryptography>=42.0.0
qrcode>=7.4.0
pyzbar>=0.1.9
opencv-python>=4.9.0
pillow>=10.2.0
python-dateutil>=2.8.2

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
98% confidence
Finding

opencv-python is a complex native library with a history of memory-safety issues, and using only a minimum version leaves the deployed version uncertain. In a logistics skill that may inspect labels, images, or QR codes, image-processing code increases attack surface if hostile files are processed.

Content

Scanner excerpt · requirements.txt (reported line 6)May include surrounding context.

text
cryptography>=42.0.0
qrcode>=7.4.0
pyzbar>=0.1.9
opencv-python>=4.9.0
pillow>=10.2.0
python-dateutil>=2.8.2

Unverifiable Dependency: opencv-python has 16 known advisory(ies) (CVE-2017-12864 (Integer Overflow or Wraparound in OpenCV); CVE-2017-12598 (Out-of-bounds Read in OpenCV ); CVE-2019-14493 (NULL Pointer Dereference in OpenCV.) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
97% confidence
Finding

opencv-python has numerous historical vulnerabilities, many in image decoding and memory handling, and the absence of a precise version means the file cannot prove a safe release is used. Given the logistics context may involve processing labels, barcodes, or QR images from untrusted sources, this uncertainty materially raises risk.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
98% confidence
Finding

pillow is unpinned, which allows uncontrolled upgrades and makes it difficult to prove whether the installed version is protected from known parser-related vulnerabilities. Since Pillow commonly handles untrusted images and this skill may plausibly process shipment labels or screenshots, the context makes this more dangerous than a purely internal library.

Content

Scanner excerpt · requirements.txt (reported line 7)May include surrounding context.

text
qrcode>=7.4.0
pyzbar>=0.1.9
opencv-python>=4.9.0
pillow>=10.2.0
python-dateutil>=2.8.2

Unverifiable Dependency: pillow has 16 known advisory(ies) (CVE-2016-2533 (Pillow buffer overflow in ImagingPcdDecode); CVE-2023-50447 (Arbitrary Code Execution in Pillow); CVE-2021-27922 (Pillow Uncontrolled Resource Consumption) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
98% confidence
Finding

pillow has known vulnerabilities including denial-of-service and, historically, more severe parser issues; without a fixed version, the manifest cannot demonstrate that a safe build is installed. In this skill's context, any feature that reads user-provided package images, labels, or screenshots increases the relevance of those advisories.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.