T09 · Insecure Skill Coding Practices
- Location
sfexpress.py:308- Finding
Shipment details are persisted in a plaintext SQLite database
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a coherent SF Express helper, but it handles sensitive shipment data with automatic local retention and under-scoped network destinations that users should review before installing.
Install only if you are comfortable with shipment identifiers and tracking details being sent to the endpoint you configure and retained locally in plaintext history. Prefer a trusted HTTPS endpoint, avoid shared machines, clear history when finished, and update the pinned dependencies before relying on the skill for sensitive shipments.
sfexpress.py:308Shipment details are persisted in a plaintext SQLite database
sfexpress.py:188Tracking numbers can be disclosed to arbitrary configured or redirected hosts
security.py:60Unvalidated storage filenames permit path traversal outside the secure directory
security.py:28Incorrect Fernet key encoding prevents encrypted storage initialization
The file pins cryptography to a version reported by the scanner as having multiple published advisories, including critical issues affecting bundled OpenSSL and cryptographic processing. In a shipping skill that may persist user data and could handle tracking, contact, or subscription-related information, use of a vulnerable crypto library can undermine confidentiality, integrity, or trust decisions if the affected features are reachable.
The file pins pillow to a version flagged with numerous advisories, including decompression-bomb handling issues and, on some platforms, command-injection-related behavior. Even though this skill is focused on SF Express workflows, it depends on qrcode and may process or generate images; if untrusted image content or platform-specific viewer features are used, vulnerable image-handling code can lead to denial of service or worse.
The skill advertises runtime behavior that can use environment variables, local file persistence, network access, and a bundled CLI, but it does not declare any explicit tool scope or permission boundaries. That makes the effective authority of the skill ambiguous and increases the risk of overbroad execution, unintended filesystem writes, or outbound requests when integrated into an agent runtime.
The skill explicitly states that it may persist shipment history, subscriptions, saved addresses, exports, and a local encryption key under the user's home directory. Even though privacy controls are documented, storing logistics history and address-related data locally creates privacy and data-retention risk, especially if persistence occurs by default or without clear per-action consent.
## Local Persistence
When the local CLI/runtime code is used, this skill may create and persist local data under:
- `~/.openclaw/data/sf-express/sfexpress.db`
- stores query history
The module docstring and class docstring are written only in Chinese, and the rest of the user-facing natural-language comments/docstrings follow the same pattern. For a generally reusable skill file, this imposes a specific language without any opt-in, fallback, or stated region-specific justification, matching the language/locale policy concern.
When a live endpoint is configured, the code transmits tracking numbers to that endpoint automatically during queries without a user-facing disclosure in the query flow. Even with HTTPS validation, tracking numbers are sensitive shipment identifiers, and sending them to arbitrary configured services can expose user logistics data to third parties unexpectedly.
The skill persists full tracking results to local SQLite history, including fields such as sender and receiver, without an explicit consent step or just-in-time notice. Shipment metadata can contain personal or sensitive location information, so silent retention increases privacy risk if the local account, filesystem, or backups are later accessed by others.
The manifest describes shipment tracking, anomaly triage, guidance, outlet lookup, and estimation, with a brief note that local data may be persisted for history and subscriptions. This file also exposes a dedicated privacy-control surface that inspects storage details, exports local storage metadata, and clears both SQLite tables and encrypted storage files, which is broader behavior than the operational shipment-help scope described in the manifest.
The skill lazily imports a SecureStorage component, enumerates stored files, reports storage metadata, and wipes all secure files. For an SF Express assistant whose stated purpose is shipment-related assistance, direct secure-storage administration is not an obvious requirement, especially since the manifest only mentions persistence for history and subscriptions.
This markdown file contains extensive user-facing instructions, prompts, and expected outputs in Chinese, which effectively biases the skill toward a specific language experience. Under the stated policy, forcing a specific language without user opt-in can be a natural-language policy violation unless the locale constraint is clearly documented and justified.
The file’s top-level description and user-facing CLI strings are written in Chinese, effectively forcing a specific language for users. Under the stated policy, this is a natural-language locale constraint unless the skill offers language choice or clearly documents a justified region-specific limitation.
No suspicious patterns detected.