T09 · Insecure Skill Coding Practices
- Location
scripts/okki-sync.js:397- Finding
Outgoing email synchronization can associate sensitive content with the wrong CRM customer
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill has a coherent CRM-sync purpose, but it automatically writes sensitive email and quote data into OKKI and local temp files with weak customer-matching safeguards that can misfile data.
Install only in an environment where OKKI credentials are least-privileged, executable paths are controlled, and operators explicitly accept automatic CRM logging of email excerpts and quotation details. Require stronger customer-match validation or human review before enabling automatic writes, and move deduplication and unmatched logs out of shared /tmp storage.
scripts/okki-sync.js:397Outgoing email synchronization can associate sensitive content with the wrong CRM customer
scripts/okki-sync.js:207Unverified partial-domain results can route email and quotation data to an unrelated CRM company
scripts/okki-sync.js:35Predictable shared temporary files permit state tampering, information disclosure, and symlink-based file writes
Referenced artifact was not completely inspected
**主文件:** `scripts/okki-sync.js`(同步镜像至 `$WORKSPACE/skills/imap-smtp-email/okki-sync.js`)
Referenced artifact was not completely inspected
**主文件:** `scripts/okki-sync.js`(同步镜像至 `$WORKSPACE/skills/imap-smtp-email/okki-sync.js`)
Referenced artifact was not completely inspected
**主文件:** `scripts/okki-sync.js`(同步镜像至 `$WORKSPACE/skills/imap-smtp-email/okki-sync.js`)
Referenced artifact was not completely inspected
**主文件:** `scripts/okki-sync.js`(同步镜像至 `$WORKSPACE/skills/imap-smtp-email/okki-sync.js`)
The README describes automatic synchronization of emails and quotation events into OKKI and mentions local files used for deduplication and unmatched logs, but it does not present this as an explicit user-facing warning about data handling and persistence. In a skill that processes potentially sensitive business communications, this omission can lead to unintentional disclosure, retention, or compliance issues because operators may enable it without realizing customer email content and metadata are being written to CRM records and local filesystem logs.
The skill describes environment-dependent behavior and integration with external scripts and services, but it does not declare any explicit tool scope, permissions, or allowed-tools boundaries. In an agent ecosystem, that can cause overbroad execution assumptions and unintended access to environment-backed resources, especially because the module references workspace paths, CLI execution, temp files, and CRM synchronization.
The skill automatically writes email content and quotation events into an external CRM and also logs unmatched cases locally, but the user-facing description does not clearly warn about this data disclosure and retention. Because the synced fields include message bodies, recipients, attachments metadata, and quotation details, users may unknowingly expose sensitive customer, commercial, or personal data to third-party systems and local logs.
The module executes external Python programs whose paths are controllable via environment variables (OKKI_CLI_PATH, VECTOR_SEARCH_PATH, PYTHON_VENV_PATH). In an agent or automation environment, this allows path substitution to attacker-controlled code, turning a CRM sync skill into a generic code-execution primitive with access to process environment, filesystem, and CRM credentials.
The vector-search fallback transmits email address, subject, and a body excerpt to an external search script without transparency or trust guarantees. In context, that script path is also configurable, so sensitive message content may be exposed to untrusted code or secondary storage outside the intended CRM workflow.
The skill sends email metadata and body excerpts into OKKI trail records without any consent, minimization, or policy check. Because email bodies may contain sensitive business, personal, or regulated data, automatic forwarding to CRM can create unauthorized data propagation and retention risks.
The skill writes quotation details, including product and pricing information, directly into CRM records without an approval or notice mechanism. Quotations often contain commercially sensitive data, so silent synchronization can leak confidential pricing and deal terms into broader CRM visibility scopes.
The skill contains core operational description and instructions in Chinese, while not stating that the skill is intended only for Chinese-speaking users or offering an alternative language. This can amount to a language/locale policy issue because the documentation effectively forces one language without opt-in or justification.
The file’s natural-language documentation, console output, and CLI usage messages are presented in Chinese only, with no indication that users may choose another language. This can violate language/locale policy when a skill imposes a specific language without opt-in or documented justification.
The stated purpose is operational synchronization into OKKI CRM. The exported and CLI-accessible runTest routine performs environment/connectivity checks against OKKI and the vector-search backend, which is auxiliary diagnostics rather than core sync behavior. While not inherently dangerous, it is outside the manifest's stated user-facing purpose.