Back to skill

Security audit

API Health Check

Security checks for vulnerabilities and agentic risk

Overview

This skill is a straightforward API status checker, but its bundled script disables HTTPS certificate checks, so its status results may be unreliable on intercepted networks.

This skill is reasonable to install if you only need a simple status checker for the listed AI services. Treat its results as advisory until the TLS verification bug is fixed, especially on public Wi-Fi, corporate proxies, or any network where traffic could be intercepted.

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

Warning
Location
scripts/check_apis.py:23
Finding

TLS Certificate and Hostname Verification Disabled

Content
View full analysis

Vulnerability Details

File Location: scripts/check_apis.py, lines 23–25
Vulnerability Type: Improper TLS certificate validation
Risk Level: Medium

Vulnerable Code:

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

Technical Analysis

The script creates a default TLS context but then explicitly disables hostname verification and certificate-chain validation. Consequently, HTTPS connections remain encrypted but do not authenticate the remote API server.

An attacker capable of intercepting network traffic can present an arbitrary certificate and impersonate any configured API endpoint. Because the health-check result is derived from the resulting HTTP response, the attacker can return fabricated status codes and cause the script to report false service availability.

Attack Path

  1. An attacker obtains a network interception position, such as control of a malicious access point, compromised proxy, DNS path, or local network gateway.
  2. The script sends an HTTPS HEAD request to a configured API endpoint.
  3. The attacker intercepts the connection and presents an untrusted certificate.
  4. The script accepts the certificate because both certificate and hostname verification are disabled.
  5. The attacker returns a fabricated HTTP response.
  6. The script interprets the attacker-controlled status code and reports a false API health result.

Impact Assessment

Exploitation does not directly grant local system privileges, code execution, or access to credentials because the requests contain only a fixed user-agent header and no authentication data. However, an on-path attacker can compromise the integrity and authenticity of all health-check results, impersonate every configured service, and manipulate operational troubleshooting decisions. The scope is limited to this script's outbound API checks and their reported results.

Remediation
View remediation

Remediation Suggestions

Retain Python's secure default TLS behavior by removing the lines that disable hostname and certificate verification:

python
ctx = ssl.create_default_context()

Continue passing this verified context to urllib.request.urlopen. If the runtime requires a custom certificate authority, load only the explicitly trusted CA bundle with ctx.load_verify_locations() rather than using ssl.CERT_NONE. Treat certificate-validation failures as failed health checks and include a concise TLS error in the output without retrying through an insecure context.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (7)

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The script explicitly disables both TLS certificate validation and hostname verification for all HTTPS requests, which defeats the core security guarantees of HTTPS. An attacker able to intercept traffic could present any certificate and spoof API endpoints, causing the tool to report false health status or interact with attacker-controlled infrastructure.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill explicitly describes making network requests to multiple external API endpoints, but it does not declare any tool scope such as permissions or allowed-tools. This creates an authorization and review gap: a host agent may permit broader network access than intended, making it harder to constrain where the skill can connect and increasing the chance of misuse, SSRF-like behavior through future modifications, or unreviewed data egress.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/check_apis.py (reported line 11)May include surrounding context.

python
import time

APIS = {
    "OpenAI": "https://api.openai.com/v1/models",
    "Anthropic": "https://api.anthropic.com/v1/models",
    "Google Gemini": "https://generativelanguage.googleapis.com/v1/models",
    "Pollinations Image": "https://image.pollinations.ai/models",

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/check_apis.py (reported line 12)May include surrounding context.

python
APIS = {
    "OpenAI": "https://api.openai.com/v1/models",
    "Anthropic": "https://api.anthropic.com/v1/models",
    "Google Gemini": "https://generativelanguage.googleapis.com/v1/models",
    "Pollinations Image": "https://image.pollinations.ai/models",
    "Pollinations Text": "https://text.pollinations.ai/models",

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/check_apis.py (reported line 17)May include surrounding context.

python
"Pollinations Image": "https://image.pollinations.ai/models",
    "Pollinations Text": "https://text.pollinations.ai/models",
    "OpenRouter": "https://openrouter.ai/api/v1/models",
    "Stability AI": "https://api.stability.ai/v1/user/account",
    "Groq": "https://api.groq.com/openai/v1/models",
}

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/check_apis.py (reported line 18)May include surrounding context.

python
"Pollinations Text": "https://text.pollinations.ai/models",
    "OpenRouter": "https://openrouter.ai/api/v1/models",
    "Stability AI": "https://api.stability.ai/v1/user/account",
    "Groq": "https://api.groq.com/openai/v1/models",
}

def check_api(name, url):

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

Disabling certificate verification without any warning means operators may assume the reported API status is trustworthy when it is not. In a health-check skill, this is especially misleading because the primary output is a trust decision about external service availability, and a man-in-the-middle can falsify those results.

Content

No source excerpt is available for this finding.