Back to skill

Security audit

Google SEO GEO Auto Index

Security checks for vulnerabilities and agentic risk

Overview

This Google indexing skill is mostly coherent, but its unrestricted sitemap fetching and mutable dependency installation need review before use.

Install only if you trust the publisher and can run it in a constrained environment. Use a service account limited to the intended Search Console property, pass only trusted public HTTPS sitemaps, avoid attacker-controlled sitemap URLs, and consider pinning dependencies and adding URL/domain validation before automated use.

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

Warning
Location
scripts/google_index.py:110
Finding
Unrestricted Recursive Sitemap Fetching Enables Server-Side Request Forgery<![CDATA[ ## Vulnerability Details **File Location**: `scripts/google_index.py`, lines 110–143 **Vulnerability Type**: Server-Side Request Forgery through unrestricted URLs and redirects **Risk Level**: Medium ### Vulnerable Code ```python def fetch_sitemap_urls(sitemap_url: str) -> list[str]: """Fetch and parse a sitemap XML, returning all <loc> URLs. Handles both regular sitemaps and sitemap index files. """ import httpx urls: list[str] = [] try: resp = httpx.get(sitemap_url, timeout=30, follow_redirects=True) resp.raise_for_status() except Exception as e: print(f"Error fetching sitemap {sitemap_url}: {e}", file=sys.stderr) return urls try: root = ET.fromstring(resp.content) except ET.ParseError as e: print(f"Error parsing sitemap XML: {e}", file=sys.stderr) return urls # Strip namespace for easier parsing ns = "" if root.tag.startswith("{"): ns = root.tag.split("}")[0] + "}" # Check if it's a sitemap index sitemap_tags = root.findall(f"{ns}sitemap") if sitemap_tags: # It's a sitemap index — recurse into each child sitemap for sm in sitemap_tags: loc = sm.find(f"{ns}loc") if loc is not None and loc.text: child_urls = fetch_sitemap_urls(loc.text.strip()) urls.extend(child_urls) ``` The initial sitemap URL is supplied directly through the CLI without validation: ```python auto_parser.add_argument( "--sitemap", "-s", required=True, help="Sitemap URL to fetch (e.g. https://example.com/sitemap.xml)", ) ``` ### Technical Analysis The application makes HTTP requests to a caller-controlled sitemap URL and follows redirects automatically. It does not validate: - The URL scheme. - The destination hostname. - Resolved IPv4 or IPv6 addresses. - Redirect destinations. - Child sitemap URLs extracted from sitemap-index documents. - Whether child sitemaps rema ...[truncated 2399 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Permit only `https` URLs unless insecure HTTP support is explicitly required. 2. Resolve every hostname before connecting and reject all loopback, private, link-local, multicast, unspecified, reserved, and documentation address ranges for both IPv4 and IPv6. 3. Disable automatic redirects or validate every redirect target before following it. 4. Apply the same checks to every child sitemap URL, not only the initial CLI value. 5. Prefer requiring child sitemaps to use the same scheme and registrable domain as the initial sitemap. 6. Protect against DNS rebinding by ensuring the validated address is the one used for the connection and by validating all resolved addresses. 7. Define strict maximums for recursion depth, sitemap count, response size, URL count, and total fetch time. 8. Consider exposing an explicit hostname allowlist for automated deployments. 9. Avoid submitting private, local, credential-bearing, or otherwise non-public URLs to Google. 10. Return a clear validation failure rather than attempting a request when a destination is prohibited. ]]>

T08 · Insecure Dependencies

Warning
Location
scripts/google_index.py:2
Finding
Runtime Dependencies Are Not Reproducibly Pinned<![CDATA[ ## Vulnerability Details **File Location**: `scripts/google_index.py`, lines 2–10 **Vulnerability Type**: Mutable third-party dependency resolution **Risk Level**: Medium ### Vulnerable Code ```python # /// script # requires-python = ">=3.10" # dependencies = [ # "google-auth>=2.0.0", # "google-auth-httplib2>=0.2.0", # "google-api-python-client>=2.0.0", # "httpx>=0.27.0", # ] # /// ``` ### Technical Analysis The inline `uv` metadata specifies only lower version bounds. Therefore, `uv run` can resolve and execute future package releases that were not part of the audited Skill. The code executed by the Skill can change without any corresponding modification to the project files. This is particularly security-sensitive because imported dependencies execute in the same Python process and under the same user account as the Skill. The Google authentication libraries process a service-account key, while the HTTP libraries have network access. A compromised or malicious future release satisfying one of these broad ranges could execute during import or normal library use. No malicious package, dependency-confusion name, or currently compromised release was identified in the audited files. The risk arises from the absence of reproducible version and integrity constraints. The declared `google-api-python-client` dependency also appears unused by the script, unnecessarily increasing the dependency and supply-chain surface. ### Attack Path 1. A future release of one of the listed packages is compromised, malicious, or otherwise contains exploitable behavior. 2. The release continues to satisfy the broad `>=` version constraint. 3. A subsequent `uv run` resolves or installs that unreviewed release. 4. Python imports or invokes the package in the Skill process. 5. Malicious dependency code executes with the privileges of the invoking user. 6. Such code could access readable local files, including the service-account key when available to the p ...[truncated 939 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin every runtime dependency to an exact, reviewed version rather than using lower-bound-only constraints. 2. Generate and commit a lockfile that records all transitive dependency versions. 3. Use package hashes or another integrity-verification mechanism where supported. 4. Update dependencies through a controlled review process with automated vulnerability and provenance checks. 5. Remove `google-api-python-client` because the audited script does not import or use it. 6. Periodically regenerate pins to obtain security updates, but review and test changes before deployment. 7. Prefer a trusted package index configured explicitly for automated environments. 8. Run the Skill in a restricted environment with minimal filesystem access and outbound-network permissions, particularly when a service-account key is present. ]]>
Vulnerability Patterns
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • 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 (6)

Tool Parameter Abuse

High
Category
Tool Misuse
Content
Delete the cache file to reset:
```bash
rm ~/.cache/auto-index/sitemap-cache.json
```

## Quota
Confidence
85% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Lp1

High
Category
MCP Least Privilege
Confidence
99% confidence
Finding
The script performs outbound network requests both to arbitrary sitemap URLs supplied by the user and to Google's Indexing API, but network capability is not declared. This is dangerous in an agent setting because undeclared network access can enable SSRF-like access to internal resources, exfiltration of sitemap-derived data, and authenticated external actions without transparent permission boundaries.

Lp1

High
Category
MCP Least Privilege
Confidence
99% confidence
Finding
The script performs outbound network requests both to arbitrary sitemap URLs supplied by the user and to Google's Indexing API, but network capability is not declared. This is dangerous in an agent setting because undeclared network access can enable SSRF-like access to internal resources, exfiltration of sitemap-derived data, and authenticated external actions without transparent permission boundaries.

Lp1

High
Category
MCP Least Privilege
Confidence
99% confidence
Finding
The script performs outbound network requests both to arbitrary sitemap URLs supplied by the user and to Google's Indexing API, but network capability is not declared. This is dangerous in an agent setting because undeclared network access can enable SSRF-like access to internal resources, exfiltration of sitemap-derived data, and authenticated external actions without transparent permission boundaries.

Lp1

High
Category
MCP Least Privilege
Confidence
99% confidence
Finding
The script performs outbound network requests both to arbitrary sitemap URLs supplied by the user and to Google's Indexing API, but network capability is not declared. This is dangerous in an agent setting because undeclared network access can enable SSRF-like access to internal resources, exfiltration of sitemap-derived data, and authenticated external actions without transparent permission boundaries.

Description-Behavior Mismatch

Medium
Confidence
96% confidence
Finding
The skill description says it submits URLs for indexing, but the code also supports URL_DELETED notifications via --delete. That mismatch is security-relevant because users may invoke the skill expecting only additive indexing behavior while the tool can instead send removal signals to Google, potentially harming site visibility or content availability if exposed through an agent workflow.

Static analysis

No suspicious patterns detected.