T09 · Insecure Skill Coding Practices
- Location
SKILL.md:110- Finding
PowerShell Command Injection Through an Untrusted Research Topic
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill has a legitimate research purpose, but it uses an unsafe shell-based Tavily workflow that reads a shared secret file and interpolates user input into PowerShell.
Install only if you are comfortable with research queries going to Brave and Tavily, and avoid using the documented PowerShell template as written. Prefer a version-pinned installer, a managed Tavily secret, and a structured API call that passes the topic as data rather than executable shell text.
SKILL.md:110PowerShell Command Injection Through an Untrusted Research Topic
SKILL.md:9Mutable Unpinned Package Is Downloaded and Executed During Installation
SKILL.md:110Skill Reads the Entire Shared OpenClaw Secret File to Obtain One API Key
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
Tavily — thêm vào file .env của OpenClaw:
# File: ~/.openclaw/.env
TAVILY_API_KEY=tvly-your-key-here
The PowerShell snippet reads TAVILY_API_KEY directly from a local .env file under the user's profile, which is explicit credential access. This unnecessarily teaches the skill to inspect local secret material and creates a path for broader secret harvesting or accidental leakage, especially because the credential is then used in an outbound API request.
Query 1 — General:
$env:TAVILY_API_KEY = (Get-Content "$env:USERPROFILE\.openclaw\.env" | Select-String "TAVILY_API_KEY" | ForEach-Object { $_ -replace "TAVILY_API_KEY=", "" })
$body = @{
api_key = $env:TAVILY_API_KEY.Trim()
The README states that the skill sends searches to Brave Search and Tavily in parallel, but it does not warn users that their queries and possibly contextual data will be transmitted to third-party services. This creates a privacy and data-handling risk, especially if users research sensitive business, personal, or confidential topics assuming processing is local.
The invocation examples use broad, natural-language trigger phrases like 'Research chủ đề' and 'Tìm bài về...' without clearly constraining when the skill should activate or what user consent boundaries apply. In an agentic environment, vague activation criteria can cause over-triggering, unexpected web queries, and unintended disclosure of user topics to external search providers.
The manifest says to use the skill whenever the user wants articles, news, blog posts, trending content, or wants to gather data before writing, and includes broad trigger phrases like "research topic" and "search for content." This trigger scope is expansive and lacks exclusion conditions or negative examples, increasing the chance of unintended invocation during ordinary content-planning conversations.
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
The skill describes pulling an API key from a local env file and sending user queries to Tavily without an explicit user-facing disclosure about credential use and third-party transmission. This creates a transparency and consent gap and can surprise users or operators about where data goes and which secrets are being accessed.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
POST https://api.tavily.com/search
Headers: Content-Type: application/json
Body:
{
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
POST https://api.tavily.com/search
Headers: Content-Type: application/json
Body:
{
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
POST https://api.tavily.com/search
Headers: Content-Type: application/json
Body:
{
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
- User wants to research a topic before writing content
- User needs to find recent articles, news, or data about a subject
- User wants to discover trending content sources for LinkedIn/social media
- User needs to curate sources for a toplist, POV, case study, or how-to post
## Core Workflow
The skill instructs reading a local secret file (~/.openclaw/.env) and moving the extracted API key into process environment state for use in outbound requests. For a content-research skill, direct local secret-file access is unnecessary and expands the skill's authority beyond user-supplied research actions, increasing the chance of credential exposure or misuse.
No suspicious patterns detected.