Back to skill

Security audit

XML Sitemap Generator

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent sitemap generator, but its crawler silently disables HTTPS certificate and hostname verification, which can let intercepted crawl results be trusted as if they came from the real site.

Review before installing. Use it only for sites you are authorized to crawl and write outputs to deliberate paths. The main concern is that HTTPS verification is disabled by default, so sitemap results from HTTPS sites could be manipulated on an untrusted network until the skill is fixed to use normal certificate validation or an explicit warned insecure mode.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/sitemap_gen.py:73
Finding

HTTPS Certificate and Hostname Verification Disabled

Content
View full analysis

Vulnerability Details

File Location: scripts/sitemap_gen.py, lines 73–75
Vulnerability Type: Improper TLS certificate validation
Risk Level: High

Vulnerable Code

python
ctx = ssl.create_default_context()
ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE

The insecure SSL context is subsequently used for outbound requests at line 81:

python
resp = urllib.request.urlopen(req, timeout=timeout, context=ctx)

Technical Analysis

The crawler creates a standard SSL context but explicitly disables both certificate-chain validation and hostname verification. As a result, HTTPS connections encrypt traffic without authenticating the remote server.

Any certificate—including a self-signed certificate for an unrelated hostname—can therefore be accepted. A network-positioned attacker can impersonate the requested website and return attacker-controlled HTML. The crawler will parse that HTML and enqueue injected links whose normalized network location matches the starting domain.

This behavior affects every HTTPS page retrieved through fetch_page; it is not limited to an explicit development or testing option.

Attack Path

  1. A user invokes the skill to crawl an HTTPS website.
  2. An attacker gains a network interception position, such as through a malicious access point, compromised proxy, or poisoned network route.
  3. The attacker intercepts the crawler's TLS connection and presents a forged or self-signed certificate.
  4. The crawler accepts the certificate because certificate and hostname verification are disabled.
  5. The attacker serves manipulated HTML containing attacker-selected links represented as belonging to the crawled domain.
  6. The crawler extracts and follows those links, then includes successfully returned URLs in its page list.
  7. The manipulated URLs are written into or printed as the generated sitemap.

Impact Assessment

The attacker does not directly obtain local operating-system privileges or a ...[truncated 459 chars]

Remediation
View remediation

Remediation Suggestions

Retain Python's default certificate-chain and hostname validation by removing the insecure overrides:

python
ctx = ssl.create_default_context()

Continue passing this verified context to urllib.request.urlopen. Do not set check_hostname to False or verify_mode to ssl.CERT_NONE in normal operation.

Additional hardening measures should include:

  1. Reject TLS certificate errors rather than silently converting every exception into an empty result.
  2. Log concise certificate-validation failures in verbose mode without exposing sensitive URL query data.
  3. Add automated tests proving that trusted certificates succeed while self-signed, expired, and hostname-mismatched certificates fail.
  4. If unverified TLS is needed for isolated development environments, place it behind an explicit opt-in flag with a prominent warning; never make it the default.
  5. Consider enforcing redirect validation so every redirect destination remains within the intended scheme and domain policy.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
Findings (5)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill advertises and documents capabilities to read local files, write output files, and access arbitrary network targets, but it does not declare any explicit tool scope or permission boundaries. That makes it easier for an agent platform to invoke the skill without clear user-visible constraints, increasing the risk of unintended filesystem access, overwriting files, or crawling attacker-specified internal or sensitive endpoints.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger phrases are broad enough to match many routine SEO or site-management prompts, which can cause the skill to activate in situations where the user did not clearly request crawling or file generation. Because the skill can perform network access and local file scanning/writing, overbroad activation raises the chance of unintended actions and expands the attack surface for prompt-trigger abuse.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The crawler explicitly disables both TLS certificate validation and hostname verification before fetching remote pages. This allows man-in-the-middle interception or spoofing of HTTPS sites, causing the sitemap to be generated from attacker-controlled content and undermining the integrity of any discovered URLs.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

HTTPS requests are made with certificate verification disabled and without any user warning, so users may believe they are securely crawling a site when they are not. In the context of a sitemap generator that automatically trusts fetched HTML to discover more links, this can let a network attacker influence crawl results, omit legitimate pages, or inject malicious URLs into generated output.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The examples encourage commands that crawl live websites and write sitemap.xml or robots.txt, but the documentation does not warn about the side effects of network requests, resource usage, or file overwrites. Users may run these commands without understanding that they can contact external hosts, scan local directories, or modify files in the working directory.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.