Back to skill

Security audit

iResponder

Security checks for vulnerabilities and agentic risk

Overview

The skill largely matches its iMessage auto-responder purpose, but it combines private message access, automatic sending, external AI processing, plaintext logs, cross-skill credential reuse, and an unsafe Telegram command path.

Install only if you are comfortable granting Terminal Full Disk Access, letting the tool read your Messages history, sending selected conversation content to external AI providers, and allowing automatic replies from your account. Treat the Telegram management interface as sensitive admin access; avoid using it until the shell command injection and plaintext logging issues are fixed.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/telegram-handler.js:98
Finding

Shell Command Injection Through Telegram Management Arguments

Content
View full analysis
c.identifier === identifier); const name = contact ? contact.name : identifier; execSync(`node "${MANAGE_SCRIPT}" remove "${identifier}"`, { stdio: 'inherit' }); return `✅ Removed **${name}** (\`${identifier}\`) from watch list.\n\nRestart watcher to apply changes.`; } function handleDelay(identifier, minutes) { execSync(`node "${MANAGE_SCRIPT}" set-delay "${identifier}" ${minutes}`, { stdio: 'inherit' }); ``` Additional affected handlers use the same construction: ```javascript function handleSetTimeWindow(identifier, start, end) { try { execSync(`node "${MANAGE_SCRIPT}" set-time-window "${identifier}" "${start}" "${end}"`, { encoding: 'utf8' }); ``` ```javascript function handleAddKeyword(identifier, keyword) { try { execSync(`node "${MANAGE_SCRIPT}" add-keyword "${identifier}" "${keyword}"`, { encoding: 'utf8' }); ``` ```javascript function handleRemoveKeyword(identifier, keyword) { try { execSync(`node "${MANAGE_SCRIPT}" remove-keyword "${identifier}" "${keyword}"`, { encoding: 'utf8' }); ``` ```javascript function handleSetDailyCap(identifier, maxReplies) { try { execSync(`node "${MANAGE_SCRIPT}" set-daily-cap "${identifier}" ${maxReplies}`, { encoding: 'utf8' }); ``` The arguments originate directly from the command line: ```javascript const [,, command, ...args] = proces ...[truncated 2767 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/watcher.js:132
Finding

Private iMessage History Is Uploaded to External AI Providers Without Adequate Privacy Disclosure or Data Minimization

Content
View full analysis
`${m.is_from_me ? 'Me' : contact.name || contact.identifier}: ${m.text || '[attachment]'}`) .join('\n'); const prompt = `${contact.prompt} Context - Recent message history (newest first): ${historyText} Latest message from ${contact.name || contact.identifier}: ${incomingMessage.text || '[attachment]'} Generate a response now:`; // Get OpenAI API key from Clawdbot config const configPath = path.join(os.homedir(), '.clawdbot', 'clawdbot.json'); let apiKey = process.env.OPENAI_API_KEY; if (!apiKey && fs.existsSync(configPath)) { try { const config = JSON.parse(fs.readFileSync(configPath, 'utf8')); apiKey = config.skills?.['openai-whisper-api']?.apiKey || config.skills?.['openai-image-gen']?.apiKey; } catch (e) { // Ignore config parse errors } } if (!apiKey) { throw new Error('OPENAI_API_KEY not found'); } const payload = JSON.stringify({ model: 'gpt-4', messages: [{ role: 'user', content: prompt }], max_tokens: 150, temperature: 0.9 }); return new Promise((resolve, reject) => { const proc = spawn('curl', [ '-s', 'https://api.openai.com/v1/chat/completions', '-H', 'Content-Type: application/json', '-H', `Authorization: Bearer ${apiKey}`, '-d', payload ]); ``` The legacy watcher performs equivalent transmission to another provider: ```javascript const proc = spawn('curl', [ '-s', 'https://api.anthropic.com/v1/messages', '-H', 'Content-Type: application/json', '-H', `x-api-key: ${apiKey}`, '-H', 'anthropic-version: 2023-06-01', '-d ...[truncated 2522 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/watcher.js:70
Finding

Incoming Messages and AI-Generated Replies Are Persisted in Plaintext Logs and Exposed Through Management Output

Content
View full analysis
line.includes(identifier) || line.includes(name) ).slice(-limit * 3); const responses = []; for (let i = 0; i < lines.length; i++) { if (lines[i].includes('Generated response:' ...[truncated 2263 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/launcher.sh:25
Finding

PID File Is Trusted Without Verifying Process Identity

Content
View full analysis
/dev/null; then echo "✗ Auto-responder is not running (stale PID file)" rm "$PID_FILE" exit 1 fi echo "Stopping iMessage auto-responder (PID $PID)..." kill "$PID" rm "$PID_FILE" echo "✓ Auto-responder stopped" ;; ``` ### Technical Analysis The launcher verifies only that some process currently exists with the numeric PID recorded in the file. It does not verify that the process is the expected `watcher.js` instance. PIDs are reused by the operating system. If the watcher exits without deleting its PID file and the number is later assigned to another process, invoking stop or restart can signal that unrelated process. The same issue occurs if another process able to modify the PID file substitutes an arbitrary PID. This background launcher is reasonable for the declared long-running watcher and does not install a startup service or cross-session scheduled task. Therefore, it is not confirmed system persistence. The defect is limited to unsafe lifecycle management. ### Attack Path 1. The watcher terminates unexpectedly while leaving its PID file behind, or a local actor modifies the PID file. 2. The operating system assigns that PID to another process, or the file is changed to refer to a chosen same-user process. 3. The user or Telegram management path invokes `launcher.sh stop` or `launcher.sh restart`. 4. `kill -0` succeeds because a process with that number exists. 5. The launcher sends `SIGTERM` to the unrelated process. ### Impact Assessment The command can terminate another process accessible to the current user, causing loss of unsaved work, servi ...[truncated 221 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (32)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The documented behavior includes sending incoming messages and recent conversation history to an external AI provider and reading credentials from local secret storage, but those behaviors are not fully disclosed in the declared purpose/manifest. This is dangerous because users may enable an iMessage auto-responder without realizing private SMS/iMessage content is being exfiltrated to a third party and that the skill accesses local credentials and persistent files.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 155)May include surrounding context.

md
The agent will understand and execute the command using the `telegram-handler.js` script.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 260)May include surrounding context.

md
The agent will understand and execute the command using the `telegram-handler.js` script.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The code falls back to reading API keys from unrelated Clawdbot skill entries (openai-whisper-api and openai-image-gen) instead of using a dedicated secret for this skill. This violates secret isolation and allows this component to appropriate credentials provisioned for other skills, increasing blast radius and enabling unintended cross-skill access to paid APIs or sensitive integrations.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The prompt includes the latest incoming message plus recent chat history, meaning the tool systematically exports private conversation data to an external AI service. Given this skill's messaging context, the data may include sensitive personal, financial, medical, or relationship content, making confidentiality loss a significant risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

Incoming message content and conversation context are sent to Anthropic automatically, with no explicit per-contact consent flow, user confirmation, or clear runtime notice. In the context of an iMessage/SMS auto-responder, this is especially dangerous because highly sensitive personal communications may be exfiltrated to a third-party AI provider without the sender's or operator's informed awareness.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
94% confidence
Finding

The code automatically sends generated messages without human review or confirmation. While auto-response is part of the feature's purpose, the absence of guardrails increases the risk of unintended, harmful, or policy-violating messages being sent to real contacts, especially when responses are generated from an external model.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

This code sends recent message history and the latest inbound message to the OpenAI API, but the file contains no consent, disclosure, or privacy gating before exfiltrating private conversation data. In the context of an iMessage/SMS auto-responder, that is especially sensitive because users may process personal, financial, medical, or confidential communications without realizing they are being transmitted externally.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The code constructs a plain-language prompt containing message history and contact content, then forwards it to an external AI provider. Because the transmitted data is raw conversational text, any sensitive details present in chats are directly exposed to a third party, increasing privacy, compliance, and data handling risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill automatically sends iMessage replies without per-message confirmation or an explicit safety interlock in code. This can cause unintended communications, social engineering amplification, reputational harm, or accidental disclosure if prompts or context generate incorrect, manipulative, or confidential responses.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill is explicitly designed to send automatic replies on the user's behalf, yet the documentation does not foreground the risk of unintended, misleading, or contextually inappropriate messages being sent without per-message review. Because the system operates continuously and responds within seconds, mistakes can propagate quickly and affect personal, professional, or sensitive conversations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The README states that the AI uses recent conversation history for replies, but it does not prominently disclose that third-party message content may be transmitted to OpenAI for processing. In a messaging auto-responder, this creates a real privacy and consent risk because contacts may not expect their messages to be shared with an external AI provider.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
96% confidence
Finding

The skill clearly instructs the agent/user to run shell commands, read environment/configured secrets, and operate with local system access, yet it declares no explicit tool scope or allowed-tools. That omission weakens security boundaries and informed consent because a caller cannot tell from the manifest that the skill needs shell and environment access to monitor Messages, read keys, and manage files.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill introduces AI-generated auto-replies without an upfront, explicit privacy warning that recent conversation history and incoming messages are transmitted to an external AI service. Because the content involved is iMessage/SMS data, delayed or buried disclosure materially increases the risk of unintentional privacy violations and non-consensual third-party sharing.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documentation inconsistently references OpenAI and Anthropic/API key sources for the same functionality, which can mislead operators about where sensitive data is sent and which credentials are consumed. In a messaging auto-responder handling private conversations, provider ambiguity undermines privacy review, safe deployment, and incident response.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

Telegram-based management is described as recommended, but there is no clear warning that commands, contact identifiers, prompts, status/history, and possibly message-related content may be exposed through Telegram. Using a third-party chat platform to administer a private SMS/iMessage responder creates an additional data-leak surface that users should be clearly warned about.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
65% 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 · SKILL.md (reported line 57)May include surrounding context.

md
fi
    
    echo "Starting iMessage auto-responder..."
    nohup node "$WATCHER_SCRIPT" >> "$LOG_FILE" 2>&1 &
    echo $! > "$PID_FILE"
    echo "✓ Auto-responder started (PID $!)"
    echo "  Logs: $LOG_FILE"

Session Persistence

Medium
Category
Rogue Agent
Confidence
65% 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 · scripts/launcher.sh (reported line 19)May include surrounding context.

sh
fi
    
    echo "Starting iMessage auto-responder..."
    nohup node "$WATCHER_SCRIPT" >> "$LOG_FILE" 2>&1 &
    echo $! > "$PID_FILE"
    echo "✓ Auto-responder started (PID $!)"
    echo "  Logs: $LOG_FILE"

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The remove function deletes a watch-list entry and saves the updated configuration right away. This is an irreversible configuration change for the user, but the code provides no pre-action confirmation or warning beyond a success message after the deletion has already happened.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

Both clearTimeWindows and clearKeywords wipe all configured values for a contact and then persist the change immediately. These are destructive configuration resets, but there is no confirmation prompt or advance warning to the user before the data is cleared.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The enable-all and disable-all commands modify the autoresponder state for every configured contact and immediately persist the changes. Although the script logs after completion, there is no user-facing warning or confirmation before this broad, potentially disruptive operation occurs.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The manifest describes a skill for monitoring iMessage/SMS conversations and managing auto-responder settings, but this file explicitly implements a Telegram command handler and exposes watcher restart/status process management capabilities. Those are broader control-surface and integration behaviors not mentioned in the skill description, so the code does more than the manifest claims at a semantic level.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Test mode constructs a prompt containing a contact's name/identifier and the provided message, then transmits that content to OpenAI for response generation. In a messaging auto-responder context, this is privacy-sensitive conversational data, and the file provides no consent flow, redaction, or prominent disclosure before sending potentially personal communications to a third party.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
95% confidence
Finding

The script makes an outbound request to https://api.openai.com/v1/chat/completions, transmitting prompt content that includes messaging context and identifiers. External transmission is expected for AI-backed features, but in this skill context it is still security-relevant because it sends potentially sensitive communications to a third party and depends on proper disclosure, minimization, and consent.

Content

Scanner excerpt · scripts/telegram-handler.js (reported line 264)May include surrounding context.

js
return new Promise((resolve, reject) => {
    const proc = spawn('curl', [
      '-s',
      'https://api.openai.com/v1/chat/completions',
      '-H', 'Content-Type: application/json',
      '-H', `Authorization: Bearer ${apiKey}`,
      '-d', payload

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The watcher reads an Anthropic API key from a separate global ~/.clawdbot configuration file, creating cross-tool credential access that exceeds the narrow scope of an iMessage auto-responder. That broadens the blast radius: anyone enabling this skill may unknowingly allow it to consume credentials provisioned for another application and send private message data to an external service.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.dangerous_exec, suspicious.exposed_secret_literal

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/telegram-handler.js:103

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/watcher-old.js:65

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/watcher.js:81

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
scripts/telegram-handler.js:244

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
scripts/watcher-old.js:115