Back to skill

Security audit

HTTP Header Analyzer

Security checks for vulnerabilities and agentic risk

Overview

This skill is a user-directed HTTP header scanner, but it disables TLS certificate checks and overstates its TLS security analysis, so results could be misleading.

Review before installing or relying on this skill. It appears to be a straightforward scanner with no persistence or credential behavior, but HTTPS scans are performed without certificate validation and the TLS analysis is weaker than advertised. Treat its results as advisory only unless the implementation is changed to verify certificates by default and clearly mark any intentionally insecure scans.

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/analyze-headers.py:81
Finding
TLS Certificate and Hostname Verification Disabled<![CDATA[ ## Vulnerability Details **File Location**: `scripts/analyze-headers.py`, lines 81-119 **Vulnerability Type**: Improper Certificate Validation **Risk Level**: Medium ### Vulnerable Code ```python def fetch_headers(url, timeout=10, follow=True, user_agent=None): headers = {"User-Agent": user_agent or "Mozilla/5.0 Security Header Analyzer"} if HAS_REQUESTS: resp = requests.get(url, timeout=timeout, allow_redirects=follow, headers=headers, verify=False) return dict(resp.headers), resp.status_code else: import urllib.request import urllib.error ctx = ssl.create_default_context() ctx.check_hostname = False ctx.verify_mode = ssl.CERT_NONE req = urllib.request.Request(url, headers=headers) try: resp = urllib.request.urlopen(req, timeout=timeout, context=ctx) return dict(resp.headers), resp.status except urllib.error.HTTPError as e: return dict(e.headers), e.code def check_tls(hostname, port=443): try: ctx = ssl.create_default_context() ctx.check_hostname = False ctx.verify_mode = ssl.CERT_NONE with socket.create_connection((hostname, port), timeout=5) as sock: with ctx.wrap_socket(sock, server_hostname=hostname) as ssock: cert = ssock.getpeercert() cipher = ssock.cipher() return { "protocol": ssock.version(), "cipher": cipher[0] if cipher else "Unknown", "cipher_bits": cipher[2] if cipher else 0, "cert_subject": dict(x[0] for x in cert.get("subject", ())), "cert_issuer": dict(x[0] for x in cert.get("issuer", ())), "cert_expiry": cert.get("notAfter", "Unknown"), } except Exception as e: return {"error": str(e)} ``` ### Technical Analysis Every supported HTTPS connection path disables cer ...[truncated 2527 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Enable certificate and hostname verification by default: - Remove `verify=False` from `requests.get()`, or explicitly use `verify=True`. - Use `ssl.create_default_context()` without changing `check_hostname` or `verify_mode`. 2. Preserve secure defaults in both network backends: ```python resp = requests.get( url, timeout=timeout, allow_redirects=follow, headers=headers, verify=True, ) ``` ```python ctx = ssl.create_default_context() resp = urllib.request.urlopen(req, timeout=timeout, context=ctx) ``` 3. Make TLS validation part of the TLS report. Distinguish and report: - Certificate-authority trust failures. - Hostname mismatches. - Expired or not-yet-valid certificates. - Missing or malformed certificate data. - Negotiated protocol and cipher security separately from certificate validity. 4. If scanning servers with invalid certificates is a necessary feature, add an explicit `--insecure` option rather than disabling validation unconditionally. The option should: - Default to disabled. - Display a prominent warning. - Mark all affected output as unverified. - Avoid presenting the results as authoritative TLS validation. 5. For comprehensive diagnostics, first perform a verified connection. If it fails and insecure inspection was explicitly authorized, perform a separate unverified connection solely to collect diagnostic certificate details while preserving the original validation failure in the report. 6. Add automated tests confirming rejection of self-signed, expired, and hostname-mismatched certificates under the default configuration. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
Findings (6)

Lp3

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding
The skill advertises and demonstrates network and shell-capable behavior by invoking a Python script that makes outbound HTTP/TLS requests, but it does not declare any explicit tool scope such as permissions or allowed-tools. This creates a trust and containment gap: an agent or platform may permit broader execution than intended, and users are not clearly informed that the skill can perform network access against arbitrary targets.

Intent-Code Divergence

Medium
Confidence
87% confidence
Finding
The docstring says the tool checks 'security headers and TLS config', but the TLS path only fetches basic connection metadata such as protocol, selected cipher, certificate subject/issuer, and expiry. There is no evaluation logic for weak ciphers, insecure protocol versions, certificate trust, or TLS misconfiguration, so the documentation overstates what the code does.

Missing User Warnings

Medium
Confidence
98% confidence
Finding
Outbound HTTPS requests are made with certificate validation disabled via verify=False. This makes the analyzer trust responses from attackers performing man-in-the-middle interception, which can produce false header-analysis results and mislead users about the target's real security posture.

Unsafe Defaults

Medium
Category
Tool Misuse
Content
def fetch_headers(url, timeout=10, follow=True, user_agent=None):
    headers = {"User-Agent": user_agent or "Mozilla/5.0 Security Header Analyzer"}
    if HAS_REQUESTS:
        resp = requests.get(url, timeout=timeout, allow_redirects=follow, headers=headers, verify=False)
        return dict(resp.headers), resp.status_code
    else:
        import urllib.request
Confidence
99% confidence
Finding
Using verify=False creates an unsafe default for all HTTPS scans. In the context of a security-analysis skill, this is more dangerous because users rely on the tool for trustworthy results, and disabling verification can silently invalidate the assessment under hostile network conditions.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The urllib fallback disables both hostname checking and certificate validation, accepting any certificate for HTTPS connections. An active network attacker can spoof the destination and feed arbitrary headers or responses to the tool, undermining the integrity of its security assessment.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The TLS inspection path disables certificate and hostname verification before collecting protocol, cipher, and certificate metadata. This allows a man-in-the-middle to present a bogus certificate and TLS session, causing the tool to report attacker-controlled TLS characteristics instead of the real server's configuration.

Static analysis

Detected: suspicious.dynamic_code_execution, suspicious.insecure_tls_verification

Dynamic code execution detected.

Critical
Code
suspicious.dynamic_code_execution
Location
scripts/analyze-headers.py:155

HTTPS certificate verification is disabled.

Warn
Code
suspicious.insecure_tls_verification
Location
scripts/analyze-headers.py:86