Back to skill

Security audit

Dailynewsreport

Security checks for vulnerabilities and agentic risk

Overview

This news-summary skill is mostly purpose-aligned, but its Telegram delivery uses an unsafe shell command that can expose the bot token and create command-injection risk.

Review this before installing. Use only non-sensitive news topics, treat the Telegram bot token as a secret, and prefer a version that replaces shell-based `curl` execution with a native HTTP client and removes unused broad permissions.

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

T09 · Insecure Skill Coding Practices

Error
Location
deliverer/telegram.ts:120
Finding

Shell Command Injection and Telegram Credential Exposure

Content
View full analysis
{ if (!this.botToken || !this.chatId) { throw new Error('Bot token or chat ID not configured'); } // 截断消息(Telegram消息长度限制4096字符) const maxLength = 4000; const truncated = text.length > maxLength ? text.substring(0, maxLength) + '...' : text; // 使用curl发送消息 const curlCommand = `curl -s -X POST "https://api.telegram.org/bot${this.botToken}/sendMessage" \\ -d "chat_id=${this.chatId}" \\ -d "text=${encodeURIComponent(truncated)}" \\ -d "parse_mode=Markdown" \\ -d "disable_web_page_preview=false"`; return new Promise((resolve, reject) => { exec(curlCommand, (error, stdout, stderr) => { if (error) { console.error(`[Telegram] curl error: ${error.message}`); console.error(`[Telegram] stderr: ${stderr}`); reject(error); return; } const response = JSON.parse(stdout); if (!response.ok) { throw new Error(`Telegram API error: ${response.description}`); } resolve(); }); }); } ``` ### Technical Analysis The Telegram bot token and chat ID are directly interpolated into a command string passed to Node.js `child_process.exec()`. The `exec()` API invokes a system shell, so shell metacharacters and command substitutions embedded in either configuration value are interpreted by that shell. Although the report text is passed through `encodeURIComponent()`, neither `this.botToken` nor `this.chatId` is validated, encoded, or safely supplied as a separate process argument. Double quotes do not prevent shell command substitution such as `$()` on common Unix shells. Consequently, a malicious configuration value can escape or exploit the command context and execute a ...[truncated 2282 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (44)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown file documents that the skill pushes reports to Telegram and instructs users to configure a chat ID and bot token, which implies outbound network transmission and use of sensitive credentials. The description does not include any explicit warning that news content and possibly generated summaries will be sent to a third-party service or that bot credentials must be protected.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

SQP-3 applies to all file types and covers language or locale policy violations. The skill instructions, rewrite prompt, output format, and examples are all Chinese-specific, but the document does not indicate this is optional or justified as a region-specific tool.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The instructions tell users to set a Telegram bot token directly but provide no warning that it is a sensitive secret or guidance on secure handling. This increases the chance that operators will paste the token into shared shells, screenshots, logs, config files, or version-controlled artifacts, which could let an attacker take over the bot and abuse message delivery.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This manifest-scoped configuration sets "mode" to "all", which is ambiguous about when the skill should activate and what boundaries apply. Without narrower trigger conditions, exclusions, or negative examples, the skill may match far more situations than intended.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The configuration hard-codes the timezone to "Asia/Shanghai", which imposes a locale-specific default without any visible user choice or documented justification in this file. The surrounding keywords are also entirely Chinese-language, reinforcing a fixed locale assumption rather than an opt-in preference.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill formats dates and times using the 'zh-CN' locale and generates report text in Chinese, which forces a specific language/locale behavior. The file does not provide any opt-in, configuration, or documented justification for restricting output to this locale.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This code sends the generated report text to the Telegram API, which is a network operation that transmits user or system data to an external service. While there is success/error logging after the fact, there is no confirmation prompt or explicit user-facing warning at the point of transmission, and the comments only describe implementation steps rather than disclose the privacy-impacting action.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The code builds a shell command string containing botToken, chatId, and message content, then executes it with child_process.exec. If any of those values contain shell metacharacters or unexpected quoting, this can lead to command injection and arbitrary command execution on the host, which is substantially more dangerous than the intended network send.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill constructs a shell command and executes it via child_process.exec, which is a subprocess operation covered by the warning requirement for code files. The surrounding comments explain that curl is used, but they do not warn users that the skill will spawn a shell command or disclose this behavior in a user-facing way.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
84% confidence
Finding

The file sends report contents to api.telegram.org, which is an external third-party service. If reports contain sensitive or regulated information, this creates data exfiltration/privacy risk, especially because the deliverer forwards rewritten titles, sources, times, and links without content classification or redaction.

Content

Scanner excerpt · deliverer/telegram.ts (reported line 131)May include surrounding context.

ts
const truncated = text.length > maxLength ? text.substring(0, maxLength) + '...' : text;

    // 使用curl发送消息
    const curlCommand = `curl -s -X POST "https://api.telegram.org/bot${this.botToken}/sendMessage" \\
      -d "chat_id=${this.chatId}" \\
      -d "text=${encodeURIComponent(truncated)}" \\
      -d "parse_mode=Markdown" \\

External Transmission

Medium
Category
Data Exfiltration
Confidence
84% confidence
Finding

The file sends report contents to api.telegram.org, which is an external third-party service. If reports contain sensitive or regulated information, this creates data exfiltration/privacy risk, especially because the deliverer forwards rewritten titles, sources, times, and links without content classification or redaction.

Content

Scanner excerpt · deliverer/telegram.ts (reported line 131)May include surrounding context.

ts
const truncated = text.length > maxLength ? text.substring(0, maxLength) + '...' : text;

    // 使用curl发送消息
    const curlCommand = `curl -s -X POST "https://api.telegram.org/bot${this.botToken}/sendMessage" \\
      -d "chat_id=${this.chatId}" \\
      -d "text=${encodeURIComponent(truncated)}" \\
      -d "parse_mode=Markdown" \\

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

No manifest is available, so there is no stated purpose justifying outbound delivery capabilities. The code initializes a Telegram deliverer, enabling external transmission of generated reports, which is a materially broader capability than local processing and reporting alone.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The code fetches news from multiple sources via source fetchers, which implies network access to external services. Because the manifest is unavailable and therefore provides no declared purpose or scope, this network retrieval capability is unjustified from the available intent context.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The report date/time formatting and visible report text are explicitly fixed to the zh-CN locale and Chinese-language strings. This forces a specific language/locale in user-facing output without any opt-in, fallback, or documented region-specific constraint, which matches the policy-violation criteria.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

This shell script creates a destination directory and recursively copies files into it, which is a filesystem-modifying operation. Although it prints what it is doing, there is no user confirmation or cautionary warning before the write occurs, and the operation could overwrite or duplicate files in the target skill directory.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The description is written only in Chinese ("每日新闻摘要推送"), which indicates a fixed language/locale in the skill's natural-language metadata. There is no indication elsewhere in the file that users can choose their preferred language or that the Chinese-only constraint is required for a region-specific purpose.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The only natural-language description in the manifest is written in Chinese, which implies a fixed language/locale presentation without any indication that users can opt into another language. Under the policy, a skill should not force a specific language unless it offers a choice or clearly documents a justified region-specific constraint.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The inline prompt states that the rewritten news 'must retain all key data' and must not add unsupported judgments. However, the actual code does not use this prompt at all and instead generates output via mockRewrite, which extracts only limited numbers and heuristic action/company fields, making the documented intent inconsistent with real behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The embedded rewrite prompt is entirely in Chinese and instructs the model to rewrite news into a specific Chinese format, with no indication that language selection is configurable or optional. This creates a natural-language locale policy issue because the skill appears to enforce one language regardless of user preference.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The file contains Chinese-only user-facing comments and sets the default timezone to 'Asia/Shanghai', which encodes a specific locale choice without any visible opt-in or documented regional constraint. Under the policy, forcing a language or locale is a natural-language policy concern unless the constraint is clearly justified or user-selectable.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The manifest explicitly states that news content will be pushed to Telegram and that Telegram credentials are required, but it does not warn users that data will be transmitted to a third-party service or give any guidance on secure handling of bot tokens and chat IDs. This increases the risk of unintended external disclosure and unsafe secret management, especially because the skill also requests internet and env-read permissions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The file's instructional content is written in Chinese from line L03 onward, while the title is in English and there is no indication that the skill is intended only for Chinese-speaking users or that users can choose another language. Under the policy criteria, forcing a specific language without opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill explicitly supports Telegram delivery, which sends generated news content and related metadata to an external service, but the description does not warn users about this outbound transmission. While the content appears to be news rather than secrets, undisclosed external delivery can still expose monitored topics, schedules, links, and operational metadata to third parties.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

The file's natural-language comments and hardcoded source names are Chinese-specific, and the classification logic checks for Chinese media sources such as '财联社', '证券时报', and '中国证券报'. This suggests a locale/language-specific behavior, but the file does not document any user choice or explicit region-specific scope that would justify forcing that locale context.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

This TypeScript file contains natural-language comments throughout in Chinese and emits a Chinese/English mixed log context, but there is no evidence in the file that the skill is intentionally limited to a Chinese-speaking context or that users can choose the language. Under the policy, forcing a specific language or locale without opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.dangerous_exec

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
deliverer/telegram.ts:138