Back to skill

Security audit

Rr Reboot Report V2

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed reboot-monitoring helper with optional Telegram alerts, but users should understand the cron, credential, and external-notification behavior before enabling it.

Install only if you want reboot status sent to Telegram. Use a dedicated low-privilege Telegram bot, keep ~/.rr-reboot-config private, review or adjust the cron entry yourself, and consider hardening the script so the bot token is not visible in process arguments before relying on it in shared or monitored environments.

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

Warning
Location
scripts/reboot-alert.sh:21
Finding
Telegram Bot Token Exposed Through Process Command-Line Arguments<![CDATA[ ## Vulnerability Details **File Location**: `scripts/reboot-alert.sh`, lines 21–34 **Vulnerability Type**: Sensitive credential exposure through process arguments **Risk Level**: Medium ### Vulnerable Code ```bash BOT_TOKEN=$(grep "^BOT_TOKEN=" "$CONFIG_FILE" 2>/dev/null | cut -d= -f2) CHAT_ID=$(grep "^CHAT_ID=" "$CONFIG_FILE" 2>/dev/null | cut -d= -f2) [ -z "$BOT_TOKEN" ] || [ -z "$CHAT_ID" ] && exit 1 # Wait for network for i in $(seq 1 10); do curl -s --connect-timeout 3 https://api.telegram.org > /dev/null 2>&1 && break sleep 3 done # Send alert curl -s --connect-timeout 10 --max-time 15 \ "https://api.telegram.org/bot${BOT_TOKEN}/sendMessage" \ ``` ### Technical Analysis The script correctly stores Telegram credentials in a user-managed configuration file that is documented as requiring mode `0600`. However, it interpolates `BOT_TOKEN` into the URL passed to `curl`. Command-line arguments are commonly exposed through process inspection interfaces and may also be recorded by system auditing, process monitoring, diagnostic, or telemetry services. While the `curl` process is running, its argument vector contains the plaintext Telegram bot token. Access to process arguments depends on operating-system configuration. Same-user processes can commonly inspect one another, while privileged monitoring services and some multi-user configurations may expose the arguments more broadly. The short execution time reduces the opportunity for interactive observation but does not protect against automated monitoring. ### Attack Path 1. The user creates `~/.rr-reboot-config` and enables the documented `@reboot` cron integration. 2. A reboot causes `scripts/reboot-alert.sh` to execute. 3. The script reads `BOT_TOKEN` from the protected configuration file. 4. It starts `curl` with the token embedded in the request URL in the process argument vector. 5. A malicious same-user process, sufficiently privileged local process, or command-line auditi ...[truncated 853 chars]
Remediation
<![CDATA[ ## Remediation Suggestions Keep the bot token out of the `curl` argument vector. Supply the request URL and form data through a protected `curl` configuration delivered over standard input, for example: ```bash curl -s --connect-timeout 10 --max-time 15 \ --config - > /dev/null 2>&1 <<EOF url = "https://api.telegram.org/bot${BOT_TOKEN}/sendMessage" data = "chat_id=${CHAT_ID}" data = "text=${MESSAGE}" EOF ``` Because standard input is not part of the process argument vector, this prevents ordinary process-list inspection from revealing the token. Before adopting this exact pattern, escape or validate configuration values so that user-controlled values cannot inject additional curl configuration directives. Additional hardening measures: 1. Validate that `~/.rr-reboot-config` is a regular file owned by the current user and is not group- or world-readable before loading it. 2. Restrict `BOT_TOKEN` and `CHAT_ID` to expected character sets. 3. Use `curl --fail --show-error` and reset state only after confirming a successful Telegram API response; otherwise, failed alerts may be permanently treated as delivered. 4. Avoid placing credentials in temporary files. If a temporary configuration is unavoidable, create it with `umask 077`, use a securely generated path, and remove it with a trap. 5. Rotate the Telegram bot token after remediation if process monitoring or local observation may already have captured it. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Memory PoisoningPersistent Context Injection, Context Window Stuffing, Memory Manipulation
  • Rogue AgentSelf-Modification, Session Persistence
Findings (14)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding
The manifest presents a reboot-reporting skill, but the documentation adds outbound Telegram messaging, credential usage from a home-directory file, and boot-time persistence via cron. That mismatch hides meaningful capabilities from reviewers and users, increasing the risk of unexpected data exfiltration and persistence under the guise of simple monitoring.

Memory Manipulation

High
Category
Memory Poisoning
Content
# View boot history
bash {baseDir}/scripts/check-reboot.sh --history

# Reset state (mark current boot as known)
bash {baseDir}/scripts/check-reboot.sh --reset
```
Confidence
80% confidence
Finding
Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Memory Manipulation

High
Category
Memory Poisoning
Content
# View boot history
bash {baseDir}/scripts/check-reboot.sh --history

# Reset state (mark current boot as known)
bash {baseDir}/scripts/check-reboot.sh --reset
```
Confidence
80% confidence
Finding
Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Memory Manipulation

High
Category
Memory Poisoning
Content
# View boot history
bash {baseDir}/scripts/check-reboot.sh --history

# Reset state (mark current boot as known)
bash {baseDir}/scripts/check-reboot.sh --reset
```
Confidence
80% confidence
Finding
Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Lp3

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding
The skill documents shell execution and operational behaviors but does not declare any explicit tool scope or permissions boundary. This weakens reviewability and can cause the agent or user to authorize broader shell capability than the manifest transparently communicates.

Description-Behavior Mismatch

Medium
Confidence
93% confidence
Finding
The skill's stated purpose is local reboot detection, but the documented workflow includes direct messaging to Telegram using user-supplied credentials. Introducing external communications changes the trust model and can leak system-status information to a third party without being foregrounded in the core skill identity.

Context-Inappropriate Capability

Medium
Confidence
88% confidence
Finding
Credential handling and direct outbound messaging are introduced in the documentation without a clearly bounded justification relative to the minimal reboot-check function. This expands attack surface by normalizing storage of secrets and remote transmission for a task that could otherwise remain local.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The documentation tells users to send reboot alerts to Telegram but does not clearly warn that system-status metadata will be transmitted to an external service. Users may enable it without understanding the privacy implications or the fact that boot timing and host event information are leaving the machine.

Session Persistence

Medium
Category
Rogue Agent
Content
For automatic Telegram alerts on reboot without needing the agent active:

**1. Create config file** (one-time setup):
```bash
cat > ~/.rr-reboot-config << 'EOF'
BOT_TOKEN=your_bot_token_here
Confidence
86% confidence
Finding
The documented one-time setup creates persistent credentials in a home-directory file and configures boot-time execution via cron. Persistence itself can be legitimate here, but in a skill that under-describes its external messaging and trigger behavior, this increases risk by enabling unattended network activity after reboot.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
BOT_TOKEN=your_bot_token_here
CHAT_ID=your_chat_id_here
EOF
chmod 600 ~/.rr-reboot-config
```

**2. Add to crontab:**
Confidence
80% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Session Persistence

Medium
Category
Rogue Agent
Content
# Reboot Alert — runs at boot via cron
# Sends Telegram alert via Bot API using dedicated config file
#
# SETUP: Create config with your credentials (one-time):
#   cat > ~/.rr-reboot-config << 'EOF'
#   BOT_TOKEN=your_bot_token_here
#   CHAT_ID=your_chat_id_here
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.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
#   BOT_TOKEN=your_bot_token_here
#   CHAT_ID=your_chat_id_here
#   EOF
#   chmod 600 ~/.rr-reboot-config

SKILL_DIR="$(cd "$(dirname "$0")" && pwd)"
CONFIG_FILE="$HOME/.rr-reboot-config"
Confidence
80% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

External Transmission

Medium
Category
Data Exfiltration
Content
# Wait for network
    for i in $(seq 1 10); do
        curl -s --connect-timeout 3 https://api.telegram.org > /dev/null 2>&1 && break
        sleep 3
    done
Confidence
70% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
# Send alert
    curl -s --connect-timeout 10 --max-time 15 \
        "https://api.telegram.org/bot${BOT_TOKEN}/sendMessage" \
        -d chat_id="$CHAT_ID" \
        -d text="$MESSAGE" > /dev/null 2>&1
Confidence
94% confidence
Finding
The script transmits reboot timing information to an external third-party service (Telegram), along with credentials loaded from a local config file. While this appears intentional and aligned with the skill's purpose, it creates a real data egress path and exposes operational metadata to an external platform; if the bot token is mishandled or Telegram use is not approved, notifications could be intercepted, redirected, or sent to an unauthorized chat.

Static analysis

No suspicious patterns detected.