T09 · Insecure Skill Coding Practices
- Location
SKILL.md:51- Finding
User-Controlled Search Query Embedded Directly into Python Source
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This web-search skill is purpose-aligned but needs Review because it tells the agent to run unsafe curl and Python workflows that automatically fetch arbitrary web pages through the user's network.
Install only if you are comfortable with the agent sending search terms to public search engines and automatically opening result pages from your network. Prefer using it in a restricted environment, avoid sensitive/private queries, and review or modify it to require confirmation and block localhost, private IP ranges, redirects to internal services, and unsafe query interpolation.
SKILL.md:51User-Controlled Search Query Embedded Directly into Python Source
SKILL.md:123Unrestricted Fetching of Search-Result URLs Enables Server-Side Request Forgery
The skill is explicitly designed to issue direct curl requests to external search engines and then fetch content from returned URLs through the local network. This creates a real capability for untrusted remote content ingestion and outbound requests, which can expose sensitive queries, enable prompt-injection-through-content, and potentially reach attacker-controlled hosts if result URLs are followed automatically.
---
name: yula-web-search
description: "Yula's custom web search - NO API KEY required. Uses multiple fallback search methods with public services that allow anonymous access. Works by direct curl requests through local network, parse HTML to extract search results, then extracts content from top results and summarizes. Works out of the box without any configuration. Provides full web search capability for Chinese language queries. Use when: user asks to search the web, look up latest information, find news, get current prices, read web pages. Triggers on phrases like 'search', 'look up', 'find latest', 'what's the current', 'check the web'."
metadata: { "openclaw": { "emoji": "🔍", "requires": { "bins": ["curl", "python3"] } } }
---
This workflow performs automated requests to Google and parses returned HTML, then uses those results to continue interacting with external content. Even though the snippet is incomplete, the dangerous behavior is the same: uncontrolled external content acquisition from arbitrary web sources, increasing risk of data exfiltration, prompt injection, and unintended access to attacker-selected pages.
QUERY="your search query"
QUERY_ENCODED=$(python3 -c "import urllib.parse; print(urllib.parse.quote('$QUERY'))"
curl -s -m 20 -L -A "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "https://www.google.com/search?q=$QUERY_ENCODED" | python3 -c "
import re, sys
results = []
pattern = r'<h3 class=\"zBAuLc\"><a href=\"([^\"]+)\"'
The content-extraction step fetches arbitrary URLs and processes their HTML into plain text for summarization. In the context of an agent skill, this is dangerous because remote pages can contain adversarial instructions or references that manipulate downstream model behavior, and the fetched URL itself may target sensitive internal services if not restricted.
def extract_url_content(url):
# Use curl to get HTML
# Use python to extract text content, remove scripts/styles/scripts, get main text
# Return cleaned text content, limit to ~2000 chars per URL
The skill advertises very broad trigger phrases such as 'search', 'look up', and 'what's the current', which can cause unintended invocation in many normal conversations. Because the skill performs external network requests and fetches third-party page content automatically, accidental triggering can leak user queries off-system and expand attack surface without clear user intent.
The skill description emphasizes 'works out of the box' and anonymous public services but does not clearly warn that user prompts and fetched URLs/content are sent over the network to external sites. In a skill that searches and then retrieves content from top results, this omission undermines informed consent and can expose sensitive queries or internal browsing intentions.