T09 · Insecure Skill Coding Practices
- Location
scripts/okki-integration.js:369- Finding
Draft-Controlled Arbitrary File Overwrite During Synchronization
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill needs review because it can run scheduled sales automation that writes customer data into a CRM, and the implementation has weak safeguards around record matching, logging, and local file writes.
Install only if you intend to let this skill run scheduled B2B follow-up workflows against OKKI CRM. Before enabling live sync or cron, require exact CRM identity matching, reject draft-controlled internal fields such as filepath, mask customer emails in logs, define log retention, and document whether any send, archive, or notification action is actually permitted. Keep it in dry-run mode until those controls are verified.
scripts/okki-integration.js:369Draft-Controlled Arbitrary File Overwrite During Synchronization
scripts/okki-integration.js:188Ambiguous Customer Matching Can Write Follow-Up Data to the Wrong CRM Record
scripts/okki-integration.js:447Unredacted Customer Personal Data Is Written to Logs and Dry-Run Output
The code chunk is narrowly an OKKI synchronization utility. It loads already-created draft files, deduplicates them, looks up matching companies in OKKI, creates follow-up trail entries, updates local draft status, and logs results. The declared description claims a broader automated follow-up scheduling and execution engine that generates personalized follow-up email drafts based on customer stage, last contact date, and strategy, with configurable CRM integration. None of the generation or scheduling behavior appears in this code chunk, and the CRM integration is not configurable here—it is explicitly tied to OKKI via a Python CLI. While syncing follow-up records to a CRM is consistent with part of the description, the actual code materially underdelivers on the declared primary capabilities and is more specialized than described.
Referenced artifact was not completely inspected
*/30 * * * * cd $WORKSPACE/skills/follow-up-engine && node scripts/follow-up-scheduler.js --mode auto >> /tmp/follow-up-scheduler.log 2>&1
Referenced artifact was not completely inspected
*/30 * * * * cd $WORKSPACE/skills/follow-up-engine && node scripts/follow-up-scheduler.js --mode auto >> /tmp/follow-up-scheduler.log 2>&1
Referenced artifact was not completely inspected
*/30 * * * * cd $WORKSPACE/skills/follow-up-engine && node scripts/follow-up-scheduler.js --mode auto >> /tmp/follow-up-scheduler.log 2>&1
Referenced artifact was not completely inspected
*/30 * * * * cd $WORKSPACE/skills/follow-up-engine && node scripts/follow-up-scheduler.js --mode auto >> /tmp/follow-up-scheduler.log 2>&1
Referenced artifact was not completely inspected
*/30 * * * * cd $WORKSPACE/skills/follow-up-engine && node scripts/follow-up-scheduler.js --mode auto >> /tmp/follow-up-scheduler.log 2>&1
Referenced artifact was not completely inspected
*/30 * * * * cd $WORKSPACE/skills/follow-up-engine && node scripts/follow-up-scheduler.js --mode auto >> /tmp/follow-up-scheduler.log 2>&1
Referenced artifact was not completely inspected
0 * * * * cd $WORKSPACE/skills/follow-up-engine && node scripts/okki-integration.js --sync >> /tmp/okki-integration.log 2>&1
Referenced artifact was not completely inspected
0 * * * * cd $WORKSPACE/skills/follow-up-engine && node scripts/okki-integration.js --sync >> /tmp/okki-integration.log 2>&1
Referenced artifact was not completely inspected
0 * * * * cd $WORKSPACE/skills/follow-up-engine && node scripts/okki-integration.js --sync >> /tmp/okki-integration.log 2>&1
Referenced artifact was not completely inspected
0 * * * * cd $WORKSPACE/skills/follow-up-engine && node scripts/okki-integration.js --sync >> /tmp/okki-integration.log 2>&1
Referenced artifact was not completely inspected
0 * * * * cd $WORKSPACE/skills/follow-up-engine && node scripts/okki-integration.js --sync >> /tmp/okki-integration.log 2>&1
The README asserts a strong safety guarantee ('严禁自动发送') while other parts of the workflow describe automatic first replies being triggered and only an approval gate before sending. This kind of contradictory documentation can mislead operators into over-trusting the skill's behavior, increasing the chance of unintended outbound customer communication if implementation or review controls are weaker than implied.
The skill references environment variables and scheduled execution but does not declare any explicit tool scope or permissions boundary. This makes the skill's operational capabilities implicit, increasing the risk of over-privileged execution, accidental secret exposure, or unsafe runtime assumptions when integrated into an agent platform.
The title and core description include Chinese text while the manifest metadata is in English, but the document does not state that the skill is region-specific or provide any user opt-in for language preference. This can violate language/locale policy by implicitly forcing a specific language for part of the user-facing skill documentation.
The manifest claims the skill is for follow-up scheduling and draft generation, but this configuration also enables a direct sending path via send_reminder. That expands the trust boundary from assistive drafting to externally visible action, increasing the risk of unauthorized customer contact, spam, or policy bypass if the send path is triggered without clear user consent and enforcement controls.
The lost-stage workflow performs archive_and_notify, which introduces side effects beyond the stated purpose of scheduling follow-ups and drafting emails. Undisclosed notification and archival behavior can affect records handling, trigger messages to internal channels, and create privacy or workflow integrity issues if users did not expect this automation.
The manifest fixes business hours to the Asia/Shanghai timezone, which imposes a specific locale assumption. Because the file does not document user choice, opt-in, or a region-specific justification, this may violate the language/locale policy for skills expected to operate across users or regions.
auto_draft_enabled combined with configured direct-send behavior means the skill can automate customer follow-up actions without any visible warning in the manifest. Even if approval is required for some sends, users may misunderstand the degree of automation, leading to unintended outbound communications, compliance issues, or reputational harm.
This JSON contains user-facing natural-language content in multiple places, including Chinese values such as stage names and suggested actions alongside English email subjects and intents. Because the file does not state that the skill is limited to a specific locale or that language is selected based on user preference, it risks violating a language/locale policy by producing communications in a fixed or inconsistent language without opt-in.
The manifest describes a follow-up engine for scheduling reminders, generating follow-up drafts, and syncing follow-up records with CRM systems. This file instead defines a comprehensive customer lifecycle state machine covering quotation, sample shipping, negotiation, payment, closed-won, and archival/lost handling, which is broader sales process automation rather than just follow-up execution.
The stated purpose is automated outbound sales follow-ups and CRM sync, but this config reacts to logistics tracking events, finance payment events, and archival review flows. Those capabilities imply cross-functional operational workflow handling beyond what is obviously required to schedule follow-ups or draft emails.
This code embeds its natural-language description and operational messages entirely in Chinese, including the declared feature summary and many runtime logs. Under the policy, forcing a specific language without user opt-in is a locale/language policy violation unless the constraint is explicitly justified or configurable.
The code sends follow-up content containing customer name, email, stage, and subject to an external OKKI system via the CLI/API. Although the file comments describe the integration purpose, there is no confirmation prompt or explicit user-facing disclosure at the point of transmission that personal/customer data will be sent externally.
The E2E test hard-codes checks for developer-specific filesystem paths outside the skill directory, including a local OKKI CLI path and another skill workspace. This creates environment-coupled behavior that can leak host layout details in logs, fail unpredictably on other machines, and establishes undeclared trust/dependency relationships beyond the follow-up engine’s stated scope.