T09 · Insecure Skill Coding Practices
- Location
SKILL.md:44- Finding
Unrestricted Configurable Network Retrieval
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:44-47;examples/platforms.md:5-8;references/url-extraction-guide.md:14-18
Vulnerability Type: Server-Side Request Forgery through unvalidated configurable URLs
Risk Level: MediumRelevant code snippets:
SKILL.md:44-47markdown 1. **Load user profile** from `~/.openclaw/workspace/skills/job-watch/memory/profile.md` 2. **Load scoring rules** from `~/.openclaw/workspace/skills/job-watch/memory/scoring.md` 3. **Load platform list** from `~/.openclaw/workspace/skills/job-watch/memory/platforms.md` 4. **For each platform**, scrape jobs posted in the last 7 days (use browser tools or HTTP requests)examples/platforms.md:5-8markdown Each platform must include: - Name - Search URL template (use {query} and {location} placeholders) - Selector rules for job title, company, date, link (if needed by AI)references/url-extraction-guide.md:14-18markdown ### Implementation Notes: When implementing the job watch skill: 1. Use `web_fetch` to get HTML content 2. Parse HTML to extract actual URLs using regex or HTML parsing 3. Never construct URLs based on job titles alone 4. Always include the report with verified, working URLsTechnical Analysis
The skill loads network targets from a locally configurable
platforms.mdfile and directs the agent to retrieve those targets using browser, HTTP, orweb_fetchtools. It does not require validation of URL schemes, destination hosts, resolved IP addresses, ports, or redirects.Although
SKILL.mddocuments an expected set of public job-board endpoints, the execution instructions do not enforce that list as an allowlist. If an attacker or another untrusted process can modify the platform configuration, the target can potentially be changed to a loopback, private-network, link-local, cloud metadata, or attacker-controlled address.The actual reachability and data ex ...[truncated 1695 chars]
- Remediation
View remediation
Remediation Suggestions
- Enforce an exact allowlist of approved HTTPS hostnames instead of accepting arbitrary platform URLs.
- Permit only
httpsURLs and reject URLs containing user information, unexpected ports, fragments, or nonstandard schemes. - Resolve each hostname before retrieval and reject loopback, private, link-local, multicast, reserved, and cloud metadata address ranges for both IPv4 and IPv6.
- Repeat destination validation after every redirect and prevent redirects to hosts outside the allowlist.
- Apply strict connection timeouts, response-size limits, content-type checks, and download limits.
- Keep the documented endpoint table and the enforced allowlist synchronized.
- Require explicit user confirmation before accessing any newly configured hostname.
- Ensure the fetch environment does not automatically attach cookies, authorization headers, or internal credentials to configurable destinations.
- Sanitize report fields so responses from unexpected services cannot be copied into reports without clear boundaries.
