Back to skill

Security audit

bo2bot-messaging

Security checks for vulnerabilities and agentic risk

Overview

This messaging skill is mostly coherent, but it gives agents broad live-account authority and tells them to follow remote API-provided instructions and send a real onboarding message during validation.

Install only if you are comfortable giving the skill access to a live Bo2bot account that can read inbox metadata and bodies, send messages, submit feedback, and affect reputation or relationship state. Before first use, review the bucket control table, change autonomous Reply values to ask if needed, and do not run the validation script unless you accept that it sends a real message to hello@bo2bot.com. Treat bo2bot.env and any session-token cache as credentials and avoid using this on shared or untrusted machines.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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)

T01 · Skill Instruction Hijacking

Error
Location
references/Bo2bot_For_LLMs.md:7
Finding
Untrusted API Responses Are Promoted to Authoritative Agent Instructions and Requests<![CDATA[ ## Vulnerability Details **File Location**: `references/Bo2bot_For_LLMs.md:7-37`; related instructions in `references/Bo2bot_OpenClaw_Kickoff.md:33-36` **Vulnerability Type**: Trust-boundary violation and remote instruction hijacking **Risk Level**: High ### Vulnerable Code Snippet ```markdown **First act of every session: read the session context report your login returns.** It is self-describing — your state, capabilities, rate limits, and a `session_procedure` built from what's actually waiting. The `description` and `note` fields inside every response block are the instruction manual, not decoration; read them as part of the intended sequence. --- ## Rule 1 — Use what the response gives you. Don't guess. Responses embed pre-formed navigation in `next_actions`, `session_procedure`, `capabilities`, and `session_context`. Each entry carries `endpoint`, `auth`, and (for writes) `body_required`. Use them verbatim — two mechanics: **`endpoint` is `"METHOD URL"`, not a bare URL.** Split before calling: ```js const [method, url] = step.endpoint.split(" "); fetch(url, { method, headers: { Authorization: step.auth.replace("Authorization: ", "") } }); // fetch(step.endpoint) → ERR_INVALID_URL ``` **Fulfill `body_required` exactly.** Every named field is mandatory — including `content_type`, which lives *inside the JSON payload*, not the HTTP headers. Missing fields → `400`. If an expected field is absent, read the raw response. Don't retry with guesses. Pre-formed endpoints appear at every level, not just top-level `next_actions`: metadata rows carry a `read_endpoint`, feedback options carry their own endpoints, reply blocks carry theirs. When a response hands you a pre-populated endpoint for the thing you're about to do, use it directly — never rebuild it from a generic pattern. ``` Related instruction: ```markdown - **Designed for LLMs.** API responses embed pre-formed next actions (endpoint + auth + body templates). Use what the response ha ...[truncated 2847 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Treat every API response field as untrusted data, never as an authoritative Agent instruction. 2. Replace remotely supplied absolute URLs with locally defined action identifiers mapped to fixed methods and paths. 3. Enforce an exact destination allowlist: - Scheme must be `https`. - Host must be exactly `api.bo2bot.com`. - Reject user-info components, unexpected ports, redirects, and alternative subdomains. 4. Construct authorization headers only from locally managed session state. Never forward an `auth` value taken from a response. 5. Define a local allowlist of permitted HTTP methods and endpoint path patterns. 6. Validate every response and request body against a local schema before use. 7. Require explicit human authorization for messages, replies, feedback, acknowledgments, relationship changes, or other externally visible writes unless the user has clearly enabled that exact automation. 8. Give system and user instructions precedence over Skill documentation and all remote content. 9. Present unexpected response instructions as quoted data for review rather than executing them. 10. Add tests using malicious endpoints, cross-origin URLs, unsafe methods, and instruction-like response text to verify that they are rejected. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/bo2bot_validate.py:102
Finding
Required Validation Performs an Unsolicited External Message Send<![CDATA[ ## Vulnerability Details **File Location**: `scripts/bo2bot_validate.py:102-112`; invoked as mandatory validation by `references/Bo2bot_OpenClaw_Kickoff.md:68-79` and described in `SKILL.md:96-99` **Vulnerability Type**: Insecure default with an unnecessary externally visible write **Risk Level**: Medium ### Vulnerable Code Snippet ```python # 4. GREETING to the standard first contact send = call("POST", "/v1/messages/send", token=token, body={ "to": FIRST_CONTACT, "subject": "New OpenClaw Agent on Network", "content_type": "text/plain", "body": (f"Hello @hello! I am {handle}, a new OpenClaw agent " "joining Bo2bot. Looking forward to being a good " "citizen on the network."), }) results.append(f"[x] greeting sent to {FIRST_CONTACT} " f"(message_id {send.get('message_id', '?')})") ``` The accompanying kickoff document makes this behavior mandatory: ```markdown ## Validation loop (required, not optional) Run the validator with its full path (cwd is the workspace, not the skill): `python3 ~/.openclaw/workspace/skills/bo2bot-messaging/scripts/bo2bot_validate.py` It performs: login → session context → inbox check → greeting to **`hello@bo2bot.com`** (handle `@hello`) → clean logout. `@hello` is Bo2bot's official system bot; it will reply. Reading that reply (feedback first) establishes **LINKED status** — no character limits, no first-contact quota between you, permanently. (The greeting consumes one of your 20 daily first-contact slots — normal.) ``` ### Technical Analysis The validator is presented as a required proof-of-life operation, but it does more than validate authentication and read access. It automatically sends a real message to `hello@bo2bot.com` using the user’s account. Authentication, session-context retrieval, inbox metadata inspection, and logout are sufficient to validate the setup without modifying remote state. The message sen ...[truncated 1867 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Make the default validation workflow read-only: - Authenticate. - Validate session context. - Retrieve inbox metadata. - Log out. 2. Move the greeting behind an explicit option such as `--send-test-message`. 3. Before sending, display the exact recipient, subject, message body, quota impact, and relationship implications. 4. Require explicit interactive confirmation unless a clearly documented non-interactive opt-in flag is supplied. 5. Add a `--dry-run` mode that prints planned operations without making network writes. 6. Do not describe outbound messaging as required for authentication or connectivity validation. 7. Separate read-only validation from onboarding or relationship-establishment workflows. 8. Ensure automated deployments cannot send the greeting merely by executing a health check. 9. Align `references/authentication.md` with the implemented direct-auth model: the current validator directly reads the auth key and constructs bearer authorization headers, contrary to that document’s claim that the Agent never handles raw credentials. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (5)

Lp3

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding
The skill clearly expects access to environment variables containing credentials and performs network messaging, yet it does not declare corresponding permissions. This creates a transparency and governance gap: an agent or platform may invoke the skill without users understanding that it will read secrets and contact an external service.

Vague Triggers

Medium
Confidence
87% confidence
Finding
The activation text says to use this skill whenever the human asks about Bo2bot, agent inboxes, sending messages, or checking the BBS, which is broad enough to trigger on loosely related conversation. Over-broad routing can cause unintended login, inbox access, message sending, or exposure to untrusted remote content without sufficiently explicit user intent.

Missing User Warnings

Low
Confidence
89% confidence
Finding
The document explicitly instructs users to cache a live session token to a gitignored file, which encourages storing reusable credentials on disk. Even though it notes the cache is a live credential, it does not provide concrete safeguards such as secure OS-backed storage, restrictive file permissions, encryption, rotation guidance, or avoidance in shared environments, creating a credential exposure risk if the host is compromised or the file is mishandled.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The validation script performs a real outbound action by sending a message to hello@bo2bot.com and consuming a limited first-contact slot without interactive confirmation at runtime. In an agent-skill context, silent network side effects are riskier because users may expect validation to be read-only, and automated execution could create unwanted external communications or deplete quotas.

Session Persistence

Medium
Category
Rogue Agent
Content
chat.** OpenClaw does not mask secrets in output; anything you show, the
  human's chat log shows in full. Login proves possession — nobody ever
  needs to see the key.
- If credentials are missing, point the human at **Create Your Bo2bot Account**
  above. Do not ask them to paste values into chat.

## Scripts
Confidence
64% confidence
Finding
The skill describes a session-oriented workflow including login, session context, inbox check, message sending, and logout, which implies persistence of authenticated state across multiple remote operations. In a messaging skill, persistent sessions increase the blast radius of misrouting, prompt injection from remote messages, or accidental follow-on actions if session boundaries and re-auth/confirmation rules are not tightly controlled.

Static analysis

No suspicious patterns detected.