T09 · Insecure Skill Coding Practices
- Location
scripts/phoenix_scraper.py:97- Finding
Unrestricted URL Navigation in an Unsandboxed Chromium Process
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This is a coherent scraper skill, but it needs review because it forwards full target URLs to third-party services by default and can launch unsandboxed Chromium against arbitrary URLs.
Install only if you are comfortable with target URLs being sent to Brave Search and Bright Data, and use it only for public, authorized scraping targets. Avoid internal URLs, localhost/private-network addresses, cloud metadata endpoints, credential-bearing links, signed URLs, password reset links, and regulated data unless you add allowlists, URL redaction/rejection, provider opt-ins, and sandboxed browser containment.
scripts/phoenix_scraper.py:97Unrestricted URL Navigation in an Unsandboxed Chromium Process
scripts/phoenix_scraper.py:48Complete Target URLs Are Disclosed to Third-Party Providers by Default
SKILL.md:58Unpinned Third-Party Package Installation Instruction
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
req.add_header("Accept", "application/json")
req.add_header("Accept-Encoding", "gzip")
req.add_header("X-Subscription-Token", BRAVE_API_KEY)
with urllib.request.urlopen(req, timeout=TIMEOUT_STANDARD) as r:
data = json.loads(r.read())
results = data.get("web", {}).get("results", [])
if results:
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
req.add_header("Content-Type", "application/json")
req.add_header("Authorization", f"Bearer {BRIGHT_DATA_API_KEY}")
timeout = TIMEOUT_RENDER if render_js else TIMEOUT_STANDARD
with urllib.request.urlopen(req, timeout=timeout) as r:
html = r.read().decode("utf-8", errors="ignore")
if html and len(html) > 500:
method = f"brightdata_{zone}" + ("_render" if render_js else "")
The skill documents use of environment variables and multiple outbound network services, but it does not declare any explicit tool scope or allowed tools. That creates an authorization and transparency gap: an agent may invoke network and env-backed behavior without clear policy constraints, increasing the chance of unintended secret access or unsanctioned external requests.
The skill routes user-supplied URLs and associated request metadata to third-party providers including Brave Search, Bright Data, and potentially X API, but the description does not warn users that this data leaves the local environment. This can expose sensitive targets, tokens in URLs, internal endpoints, or business-intelligence data to external services and logs.
The documented failover chain includes Bright Data unlocking and Playwright headless browser execution against JS-rendered or bot-protected sites, but it omits any warning that the skill may perform automated browser actions against defended targets. This lack of disclosure can lead users to trigger legally, operationally, or ethically risky automation without informed consent, and may increase exposure to account/IP blocking or policy violations.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
GET https://api.twitter.com/2/users/by/username/:username
?user.fields=id,name,username,public_metrics
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
GET https://api.twitter.com/2/users/by/username/:username
?user.fields=id,name,username,public_metrics
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
GET https://api.twitter.com/2/users/by/username/:username
?user.fields=id,name,username,public_metrics
This code is hard-wired to transmit requested URLs and retrieved content through Bright Data, an external service. That is expected for the feature, but in a reusable agent skill it creates a real data-exposure risk if callers use it on confidential targets, authenticated pages, or internal resources.
# ── Config ────────────────────────────────────────────────────────────────────
BRIGHT_DATA_API_KEY = os.environ.get("BRIGHT_DATA_API_KEY", "")
BRIGHT_DATA_ENDPOINT = "https://api.brightdata.com/request"
DEFAULT_ZONE = os.environ.get("BRIGHT_DATA_ZONE", "web_unlocker")
BRAVE_API_KEY = os.environ.get("BRAVE_API_KEY", "")
BRAVE_ENDPOINT = "https://api.search.brave.com/res/v1/web/search"
The Brave Search integration shares the target site's hostname and full URL-derived search query with an external provider. In this skill's context, that can leak sensitive investigation targets or private resources to a third party, especially when used automatically as the first tier in a failover chain.
BRIGHT_DATA_ENDPOINT = "https://api.brightdata.com/request"
DEFAULT_ZONE = os.environ.get("BRIGHT_DATA_ZONE", "web_unlocker")
BRAVE_API_KEY = os.environ.get("BRAVE_API_KEY", "")
BRAVE_ENDPOINT = "https://api.search.brave.com/res/v1/web/search"
TIMEOUT_STANDARD = 30 # seconds
TIMEOUT_RENDER = 60 # seconds (JS render mode)
The scraper sends user-supplied target URLs to third-party services such as Bright Data and Brave as part of its fallback logic, which can disclose sensitive internal URLs, query parameters, or tokens embedded in URLs. In agent-skill context, this is more dangerous because upstream callers may pass private links, intranet targets, or signed URLs without realizing they will be shared externally.
The module docstring states 'Never returns empty', implying the scraper always yields non-empty content. In practice, both _fail() and the final all-failed return path produce a result dict with html set to an empty string, so the documentation overstates the behavior.
No suspicious patterns detected.