Back to skill

Security audit

Overnight Worker

Security checks for vulnerabilities and agentic risk

Overview

This skill appears purpose-built rather than malicious, but it needs review because its broad overnight automation and notification helper create real privacy and local-execution risks.

Review before installing, especially on shared macOS systems or for confidential work. Keep notifications local unless you trust the Telegram bot and webhook endpoint, avoid sensitive task names or paths in notifications, and prefer fixing the /tmp fallback, webhook validation, Telegram token handling, and osascript notification construction before using this for overnight autonomous tasks.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/notify.sh:116
Finding

AppleScript Injection in the macOS Notification Fallback

Content
View full analysis
/dev/null; then # Escape double quotes to prevent injection local safe_title safe_title=$(echo "$TITLE" | sed 's/"/\\"/g') local safe_body safe_body=$(echo "$BODY" | sed 's/"/\\"/g') osascript -e "display notification \"${safe_body}\" with title \"${safe_title}\"" 2>&1 ``` ### Technical Analysis The script constructs AppleScript source code dynamically by interpolating `TITLE` and `BODY` into the argument passed to `osascript -e`. The attempted sanitization escapes only double-quote characters. It does not safely encode pre-existing backslashes, control characters, line boundaries, or other input capable of affecting AppleScript parsing. Consequently, attacker-controlled notification content may be interpreted as AppleScript syntax rather than as a literal notification string. This is an injection flaw because untrusted data and executable source code are combined in one shell-expanded string. Shell quoting alone does not make the resulting AppleScript safe: after shell expansion, `osascript` still parses the assembled value as source code. ### Attack Path 1. An attacker causes a task or another invocation path to supply crafted content that reaches the notification title or body. 2. The Skill passes this content to `notify.sh` through `--title` or `--body`. 3. `notify.sh` replaces double quotes but does not perform complete AppleScript-safe encoding. 4. The sanitized value is interpolated directly into an AppleScript program. 5. On macOS, when `terminal-notifier` is unavailable and `osascript` is present, the fallback executes the dynamically generated program. 6. Crafted input can alter the program structure and cause unintended AppleScript operations, potentially including invocatio ...[truncated 768 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/notify.sh:74
Finding

Telegram Bot Token Exposed in Process Command-Line Arguments

Content
View full analysis
&1) ``` ### Technical Analysis Telegram’s Bot API places the bot token in the URL path. The script expands `TELEGRAM_BOT_TOKEN` directly into the URL passed as a command-line argument to `curl`. While `curl` is running, this URL may be visible through process-inspection facilities, process accounting, monitoring agents, debugging tools, or command-line telemetry. On systems where other local users can inspect process arguments, an untrusted local principal may capture the complete bot token. The token is loaded from an environment variable rather than hardcoded, which is preferable for storage, but embedding it into a child process’s argument list negates part of that protection during notification delivery. The notification body and Telegram chat ID are also supplied as process arguments. They may expose task-completion metadata and the local output-directory path, although those values are less sensitive than the reusable bot credential. ### Attack Path 1. A user configures `TELEGRAM_BOT_TOKEN` and `TELEGRAM_CHAT_ID`. 2. The Skill completes or partially completes a task and invokes the Telegram notification channel. 3. `notify.sh` starts `curl` with the bot token embedded in the URL argument. 4. During the lifetime of the `curl` process, a local observer with permission to inspect process arguments records the command line. 5. The observer extracts the bot token from the Telegram API URL. 6. The captured token is reused to make unauthorized Telegram Bot API requests until the token is revoked or rotated. ### Impact Assessmen ...[truncated 734 chars]
Remediation
View remediation
&1 <
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (17)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The declared description presents a broad autonomous overnight work agent with planning, execution, research, output generation, logging, and recovery features. The supplied code implements only a notification helper script. While push notifications are mentioned in the description and are indeed supported here, that is only one small subset of the claimed functionality. The code does not perform task assignment, autonomous work, web access for research, structured result generation, or meaningful progress/error-management orchestration. Therefore the actual behavior is materially narrower and different from the declared primary purpose.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description presents a full-featured autonomous work agent with orchestration and execution capabilities. The supplied code does not implement an agent or perform tasks overnight; it only inspects a provided task description, scores keyword matches, assigns a category, and returns a textual strategy suggestion. While task classification could be a small supporting component of a larger agent, the provided chunk's actual purpose is materially narrower and different from the declared end-user description. Therefore this is a clear description-behavior mismatch.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · README.md (reported line 26)May include surrounding context.

md
- 💰 **Token Budget Management** — Real-time monitoring with automatic economy mode when budget runs low
- 🛡️ **Safety Contracts** — Write-only to output directory, no file deletion, no arbitrary code execution
- ♻️ **Error Recovery** — Structured retry matrix with graceful degradation per error type
- 📁 **Idempotent Execution** — Timestamped work directories ensure runs never overwrite each other

## Quick Start

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The primary usage examples and webhook payload content are presented in Chinese, and the command examples imply the skill is operated in Chinese by default. The README does not explicitly offer a language choice or state that the skill is intentionally limited to Chinese-speaking users, which can conflict with a language/locale policy requiring opt-in or justified scope.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The README documents webhook notifications that send task completion metadata, output paths, and timestamps to an external endpoint, but it does not warn users that potentially sensitive task context may leave the local environment. For an autonomous overnight agent handling research, code review, or business documents, even summary metadata can disclose confidential project names, file locations, or workflow details to third parties.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · README.md (reported line 272)May include surrounding context.

md
Contributions are welcome! Here's how:

1. Fork the repository
2. Create a feature branch (`git checkout -b feature/my-feature`)
3. Make your changes and test with a real overnight task
4. Submit a pull request

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The natural-language instructions define the agent's role and execution behavior entirely in Chinese, which effectively imposes a specific language on skill operation. The file does not offer the user a language/locale choice or explain that the skill is intentionally limited to Chinese-speaking contexts.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill's own safety covenant restricts all writes to WORK_DIR, but the documented fallback explicitly writes to /tmp, violating the containment boundary. That contradiction matters because /tmp is shared, globally predictable, and outside the promised sandbox, which can expose task artifacts, enable tampering by other local users/processes, or cause the agent to write sensitive output where operators do not expect it.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill instructs sending completion status, follow-up needs, and the output directory path over external channels such as Telegram or webhook without any privacy gating, redaction policy, or user-consent warning. In this skill context, task descriptions and filesystem paths may reveal confidential project names, research topics, usernames, or local environment structure, so external transmission materially increases data leakage risk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The title and introductory text establish the format specification entirely in Chinese, indicating a fixed language expectation for generated outputs. Under the policy, forcing a specific language without user opt-in or a documented region-specific justification is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The file's user-facing natural-language content, including the title, usage, parameter descriptions, and examples, is entirely in Chinese. This imposes a specific language on users without offering an opt-in or documenting a justified region-specific constraint, which matches the language/locale policy violation criteria.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/notify.sh (reported line 74)May include surrounding context.

sh
${BODY}"

    local response
    response=$(curl -s -w "\n%{http_code}" \
        -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \
        -d chat_id="${TELEGRAM_CHAT_ID}" \
        -d text="${message}" \

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/notify.sh (reported line 75)May include surrounding context.

sh
local response
    response=$(curl -s -w "\n%{http_code}" \
        -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \
        -d chat_id="${TELEGRAM_CHAT_ID}" \
        -d text="${message}" \
        -d parse_mode="Markdown" \

External Transmission

Medium
Category
Data Exfiltration
Confidence
88% confidence
Finding

The webhook path transmits arbitrary notification content to any URL supplied via the WEBHOOK_URL environment variable, with no validation or allowlisting. In an autonomous overnight worker context, task results may contain sensitive data, so this creates a realistic exfiltration channel if the environment is misconfigured, attacker-controlled, or influenced by untrusted task setup.

Content

Scanner excerpt · scripts/notify.sh (reported line 156)May include surrounding context.

sh
fi

    local response
    response=$(curl -s -w "\n%{http_code}" \
        -X POST "$WEBHOOK_URL" \
        -H "Content-Type: application/json" \
        -d "$payload" \

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This shell script presents its description, usage message, and strategy guidance in Chinese only, which imposes a specific language on users without offering any locale selection or opt-in. The policy scope explicitly covers natural-language strings in code files, so these hard-coded user-facing messages constitute a language/locale policy issue.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The idempotency guarantee states that progress.log is 'only appended, never overwritten'. But the initialization command uses cat > "$WORK_DIR/progress.log", which truncates or creates the file rather than appending, contradicting the documented behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

该 markdown 文件属于所有文件类型都适用的自然语言政策检查范围。标题和说明均仅以中文给出,未提供用户语言/locale 选择,也未说明这是面向特定中文环境的限定文档,可能构成未经用户选择即强制特定语言的策略问题。

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.