T09 · Insecure Skill Coding Practices
- Location
scripts/send-files.sh:34- Finding
Workspace Path Boundary Bypass Allows Packaging of Out-of-Scope Files
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is meant to package and deliver workspace files, but it can trigger delivery without a direct user request and has path and temporary-file weaknesses that could send or affect more than intended.
Review this before installing. It is not artifact-backed malicious, but users should only use it when they are comfortable with generated files being zipped, retained in `.file-outbox/`, and delivered through the Manager service. The skill should require explicit confirmation of the exact path being sent, fix the workspace boundary check, and replace the predictable temporary response file before broad deployment.
scripts/send-files.sh:34Workspace Path Boundary Bypass Allows Packaging of Out-of-Scope Files
scripts/send-files.sh:100Predictable Shared Temporary File Permits Symlink and Concurrency Attacks
The skill tells the agent to proactively trigger file delivery even when the user did not explicitly ask for delivery. In a file-transfer skill, that is dangerous because it can cause unsolicited packaging, persistence, and manager-mediated exfiltration of workspace artifacts that may contain sensitive data beyond what the user intended to receive.
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
echo " 系统会自动重试发送,用户最终一定会收到文件。"
fi
rm -f /tmp/notify_resp.json
The skill clearly instructs shell execution (bash scripts/send-files.sh, mkdir, cp) but does not declare an explicit tool scope such as allowed shell usage. That creates a governance gap: an agent may invoke powerful local execution without clear permission boundaries, reducing reviewability and increasing the chance of unintended file packaging or command execution.
Broad trigger phrases like 'export' and 'deliver the files' are ambiguous and can match ordinary requests that do not imply consent to package and transmit local workspace contents. In this context, ambiguity increases the risk of the agent invoking a transfer workflow for the wrong files or without sufficient user intent verification.
The skill emphasizes convenience and automatic retries but does not prominently warn that invocation persists packaged data locally in .file-outbox/ and notifies a manager service to retrieve it. That lack of transparent consent is risky because users may believe this is a local-only packaging operation when it actually creates durable copies and initiates a mediated transfer pipeline.
The script consumes injected credentials and uses them for authenticated communication with an external service, despite the skill being described as a local file-packaging utility. This makes the skill capable of acting with delegated service authority, so compromise or misuse of the script can trigger unauthorized notifications, metadata disclosure, or abuse of the file-push channel.
The curl call performs external transmission to a Manager endpoint with an authorization token and file metadata. In the context of a skill advertised as handling local workspace files, this outbound communication is security-relevant because it moves data and control outside the local environment and could be repurposed for covert exfiltration if the endpoint or payload were changed.
echo "📤 正在通知 Manager..."
# ── 发送轻量通知 (使用实例专属 Token, 非全局 Agent Key) ──
HTTP_CODE=$(curl -s -o /tmp/notify_resp.json -w "%{http_code}" \
-X POST "${OPENCLAW_MANAGER_URL}/file-push/v1/instances/${OPENCLAW_INSTANCE_NAME}/file-ready" \
-H "Authorization: Bearer ${OPENCLAW_FILE_PUSH_TOKEN}" \
-H "Content-Type: application/json" \
The skill manifest frames this as local file packaging/delivery, but the script also performs an outbound authenticated network notification to a Manager service. Even if no file bytes are sent in this request, it exfiltrates operational metadata and initiates a remote retrieval workflow, which expands the trust boundary beyond local packaging and creates a data-transfer side channel users may not expect.
Although the comments say only metadata is sent, the payload includes a container-internal absolute path to the generated archive. That path reveals internal filesystem structure and directly enables a subsequent pull operation against a specific file location, which is more sensitive than ordinary descriptive metadata.
No suspicious patterns detected.