Back to skill

Security audit

Smart Web Scraper

Security checks for vulnerabilities and agentic risk

Overview

This is a functional web-scraping skill, but it allows under-scoped fetching and file output that can reach local/internal resources or overwrite files if misused.

Install only if you are comfortable with a scraper that can fetch arbitrary URLs from your machine's network position and save output wherever the agent tells it to. Use explicit public http or https URLs, avoid contact-data scraping unless you have authorization and comply with privacy and anti-spam rules, and avoid letting untrusted pages or prompts choose crawl targets or output paths.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/scraper.py:37
Finding

Unrestricted URL Fetching Enables SSRF and Local Resource Access

Content
View full analysis
str: """Fetch URL content with proper headers and error handling.""" req = Request(url, headers={ "User-Agent": USER_AGENT, "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "Accept-Language": "en-US,en;q=0.5", }) try: with urlopen(req, timeout=timeout) as resp: encoding = resp.headers.get_content_charset() or "utf-8" return resp.read().decode(encoding, errors="replace") except HTTPError as e: print(f"HTTP Error {e.code}: {e.reason} — {url}", file=sys.stderr) sys.exit(1) except URLError as e: print(f"Connection Error: {e.reason} — {url}", file=sys.stderr) sys.exit(1) ``` Pagination links obtained from remote HTML are also subsequently passed to this fetching function: ```python next_link = soup.find("a", rel="next") if next_link and next_link.get("href"): return urljoin(current_url, next_link["href"]) for pattern in [".next a", "a.next", ".pagination .next", "[aria-label='Next']", "a[aria-label='Next page']", ".page-next a"]: el = soup.select_one(pattern) if el and el.get("href"): return urljoin(current_url, el["href"]) ``` ### Technical Analysis The scraper passes a user-supplied URL directly to `urllib.request.urlopen()` without validating: - The URI scheme, such as restricting requests to `http` and `https`. - Whether the resolved address belongs to a loopback, private, link-local, multicast, or reserved network. - Whether redirects lead to prohibited addresses. - Whether a pagination URL remains on an approved origin. - Whether DNS resolution changes between validation and connection. - The maximum permitted resp ...[truncated 2033 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:13
Finding

Unpinned Runtime Dependencies Create a Supply-Chain Risk

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (7)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The README explicitly promotes contact extraction and multi-page crawling but provides no guidance about privacy obligations, site terms, or lawful handling of personal data. In a scraping skill, this omission increases the likelihood that users will deploy the tool for bulk collection of personal or restricted data without informed safeguards.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The use case 'Lead generation — Extract contact info from business directories' directly encourages collection of personal or business contact data while omitting any warning about consent, anti-spam rules, data protection laws, or site restrictions. Because this language is promotional and task-oriented, it makes misuse more likely than a neutral technical description would.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill advertises network access and the ability to save scraped output to files, but it does not declare any explicit tool scope or permission boundaries. That makes it easier for an agent to invoke the skill in contexts the user did not intend, increasing the risk of uncontrolled web access, local file writes, and downstream misuse of collected data.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill description is broad enough to match many common requests involving websites, listings, product data, or contact details, which increases the chance of over-triggering. In practice, that can cause the agent to perform scraping or collection actions in situations where the user did not explicitly ask for network retrieval or structured data harvesting.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The skill explicitly mentions gathering contact details and extracting data from arbitrary web pages, but it provides no warning about collecting personal or sensitive information. This omission makes it more likely the skill will be used to harvest personal data without adequate user awareness, policy checks, or legal/ethical constraints.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The manifest description focuses on extracting structured data from a web page, with selectors, table/list auto-detection, and JSON/CSV output. The code documentation and implementation add capabilities for link extraction, page structure analysis, and especially multi-page crawling, which go beyond the narrower manifest scope.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The tool writes arbitrary output to a user-supplied filesystem path without confirmation, overwrite protection, or path restrictions. In an agent setting, this can unexpectedly clobber local files or place scraped content into sensitive locations if an attacker influences the output path.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.