T09 · Insecure Skill Coding Practices
- Location
scripts/closing-summary.mjs:319- Finding
Shell Command Injection Through API-Controlled Report Content
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill generates A-share market reports, but its send path uses an unsafe shell command and always sends to a hard-coded Feishu recipient.
Review before installing. Local report generation is relatively contained, but do not use --send or the documented cron job unless the recipient is made configurable and the shell command is replaced with a non-shell argument-array call such as execFile/spawn. Confirm where Feishu messages go before enabling recurring delivery.
scripts/closing-summary.mjs:319Shell Command Injection Through API-Controlled Report Content
scripts/closing-summary.mjs:321Hard-Coded Feishu Recipient Causes Unauthorized Message Delivery
Referenced artifact was not completely inspected
node scripts/closing-summary.mjs
Referenced artifact was not completely inspected
node scripts/closing-summary.mjs
The README explicitly instructs users to run the script with a flag that sends generated market reports to Feishu, but it does not clearly warn that this causes outbound transmission of report contents to an external service. Even if the data is only market-derived, generated reports may include organization-specific commentary, prompts, or derived insights, so the lack of disclosure can lead to unintentional data exfiltration or policy violations.
The cron example documents unattended automatic sending of reports to Feishu every trading day without warning users about repeated outbound transmission. Scheduled delivery increases risk because data can be sent continuously after initial setup, making accidental leakage, misrouting, or compliance issues harder to detect and stop.
The skill explicitly documents sending generated market summaries through a Feishu channel but provides no user-facing warning, consent step, or disclosure about external transmission. Even if the content is mostly market data, reports may include user-specific context, preferences, or derived analysis, and transmitting them to a third-party messaging platform expands data exposure and audit requirements.
The script invokes an external CLI via execSync to transmit generated content off-host, which expands its capability from local report generation into privileged outbound messaging. Using shell-command construction for message delivery also increases risk because future changes to the message content or recipient handling could introduce command injection or unauthorized data egress.
The hard-coded Feishu user ID causes all sent reports to be delivered to a fixed recipient without runtime approval or clear ownership validation. In a reusable skill, that creates a covert exfiltration path for generated content and operational metadata to an arbitrary account controlled outside the user's environment.
Outbound transmission to a fixed Feishu recipient occurs without meaningful user-facing disclosure of who will receive the data. Even if the payload is only market commentary, undisclosed external delivery violates transparency expectations and could expose derived business information, timestamps, or future expanded payloads.
The skill's natural-language instructions are entirely in Chinese and specify a single locale/timezone context, but do not indicate that this is optional or region-specific by design. That can violate language/locale choice expectations unless the documentation explicitly states the tool is intended only for Chinese A-share market users.
The report time/date formatting is forced to use the zh-CN locale, and the script content is written entirely in Chinese, with no opt-in or configuration for other languages/locales. The policy requires flagging language or locale constraints when they are imposed without user choice unless clearly documented as justified for a region-specific tool.
Detected: suspicious.dangerous_exec