T09 · Insecure Skill Coding Practices
- Location
scripts/recover.sh:31- Finding
Raw Tool Error Messages Are Transmitted Without Redaction
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
AgentRx is not clearly malicious, but it sends tool errors and planned risky operations to a remote service and relies on weak safeguards for sensitive data and remote advice.
Install only if you are comfortable sending sanitized diagnostic data and planned risky-operation payloads to the AgentRx service. Do not use it on workflows involving secrets, private customer data, payment details, credentials, or sensitive internal schemas unless you add local redaction, restrict the endpoint to a trusted HTTPS host, use a dedicated scoped API key, and require human approval before acting on any remote suggestion.
scripts/recover.sh:31Raw Tool Error Messages Are Transmitted Without Redaction
scripts/preflight.sh:29Preflight Sends Complete Risky-Operation Payloads and Tool Schemas to a Remote Service
scripts/recover.sh:25Unrestricted Base URL Can Redirect Credentials and Telemetry to an Attacker-Controlled Endpoint
scripts/recover.sh:61Remote Response Is Framed as an Agent Instruction Without Enforced Trust Controls
README.md:16README Publishes a Reusable Shared API Credential
README.md:10Installation Documentation Uses an Unpinned Package Execution Command
The documented behavior exceeds the declared purpose and permissions by sending failure data to a remote service and returning operational instructions from that service. Even though the text says the advice is advisory, external instructions can influence agent actions, and the undeclared network behavior plus possible post-failure data submission materially changes the trust and threat model.
The README instructs users to run npx clawhub install agentrx without pinning a specific version, which allows whatever package/version is current at install time to be executed. This creates a supply-chain risk: a compromised publisher, typo-squatted package, or malicious future update could execute arbitrary code during installation.
The README says AgentRx returns a plaintext instruction telling the agent exactly what to do next and that no interpretation is required, which encourages blind execution of externally supplied instructions. In the context of a recovery skill that activates on tool failures, this is especially dangerous because error messages and tool outputs may be attacker-influenced, creating an indirect prompt-injection path into agent behavior.
The skill is documented to run after any tool failure and before risky tool calls, which is an overly broad trigger surface for a component that can influence subsequent agent actions. Broad invocation increases exposure to attacker-controlled error content, normal transient failures, and unnecessary dependence on an external decision source, making prompt-injection or unsafe recovery recommendations more likely to affect workflows.
The skill invokes shell commands and depends on external network access via curl, but it declares no tool scope or allowed-tools/permissions to constrain those capabilities. This creates a governance gap where an agent may execute shell and outbound HTTP behavior without explicit policy visibility, increasing the risk of unintended command execution, data egress, or misuse of the remote service.
The activation guidance is broad enough to trigger the skill for routine errors or subjective cases like results that 'look wrong or empty.' In context, that means many ordinary tool failures may be forwarded to a remote service, expanding data exposure and increasing the chance that externally supplied recovery instructions affect normal agent workflows.
The 'When To Use' section uses ambiguous triggers such as any high-risk tool call and outputs that merely 'look wrong or empty,' which encourages overuse. In this skill's context, over-broad invocation is more dangerous because each use can transmit tool names, payloads, and error content to an external service and introduce remote guidance into agent control flow.
The script transmits agent metadata, the intended tool payload, and the full tool schema to an external service using a bearer-style API key header. Because this is a preflight wrapper intended to run before risky tool calls, the data sent may include sensitive prompts, parameters, identifiers, or secrets embedded in payloads, creating a real exfiltration/privacy risk if the remote endpoint is untrusted, misconfigured, or compromised.
tool_schema: $schema
}')
RESPONSE=$(curl -s -w "\n%{http_code}" \
-X POST "${AGENTRX_BASE_URL}/v1/preflight" \
-H "X-API-Key: ${AGENTRX_API_KEY}" \
-H "Content-Type: application/json" \
The manifest describes AgentRx as a recovery layer that diagnoses tool failures and suggests recovery actions, but this script implements credentialed outbound network access by requiring AGENTRX_API_KEY and AGENTRX_BASE_URL and posting detailed failure data to that service. While remote diagnosis may be possible in some designs, the manifest does not disclose this external service dependency or credential use, so the capability is broader than the stated purpose alone justifies.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
latency_ms: ($latency_ms | tonumber)
}')
RESPONSE=$(curl -s -w "\n%{http_code}" \
-X POST "${AGENTRX_BASE_URL}/v1/openclaw/recover" \
-H "X-API-Key: ${AGENTRX_API_KEY}" \
-H "Content-Type: application/json" \
No suspicious patterns detected.