Back to skill

Security audit

Uptimecheck

Security checks for vulnerabilities and agentic risk

Overview

This is a straightforward uptime-checking skill with expected network checks and optional local history, though users should avoid untrusted or secret-bearing URLs.

Install this only if you are comfortable letting it make outbound checks to URLs you provide. Do not run URL lists from untrusted people, and avoid saving checks for URLs that contain API keys, signed parameters, session tokens, or private internal hostnames.

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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
uptimecheck.py:12
Finding
Unrestricted URL Requests Enable Blind Server-Side Request Forgery<![CDATA[ ## Vulnerability Details **File Location**: `uptimecheck.py:12-13` and identical code in `scripts/uptimecheck.py:12-13` **Vulnerability Type**: Blind server-side request forgery (SSRF) through unrestricted outbound requests **Risk Level**: Medium ### Vulnerable Code ```python req = urllib.request.Request(url, method="HEAD", headers={"User-Agent": "uptimecheck/1.0"}) with urllib.request.urlopen(req, timeout=timeout) as resp: ``` ### Technical Analysis The application passes a user-supplied URL directly to `urllib.request.urlopen()` without validating its scheme, hostname, resolved IP address, or redirect destinations. URLs can be supplied as command-line arguments or loaded from a file. An attacker who can influence these inputs can cause the host running the Skill to send requests to destinations accessible from its network position, including: - Loopback services such as `127.0.0.1` or `::1` - Private network ranges - Link-local services and cloud metadata endpoints - Internal administrative or development services - Public endpoints that redirect to internal destinations Redirects are followed by the standard library handler, but redirected targets are not revalidated. Although the implementation uses `HEAD` and does not consume response bodies, status codes, errors, and response timing provide a blind network reconnaissance channel. Some non-compliant services may also perform state-changing behavior for `HEAD` requests. The same vulnerable implementation is duplicated in both executable Python files. ### Attack Path 1. An attacker supplies a crafted endpoint directly or places it in a URL input file. 2. The victim executes the `check` command in an environment with access to private services. 3. The Skill passes the URL directly to `urllib.request.urlopen()`. 4. The request originates from the victim's host and network trust boundary. 5. The attacker observes the reported status, error, and response time. 6. Repeated probes can reveal rea ...[truncated 874 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Parse every URL before making a request and permit only explicitly supported schemes, preferably `http` and `https`. 2. Require a valid hostname and reject embedded URL credentials. 3. Resolve the hostname and reject every resolved address belonging to loopback, private, link-local, multicast, unspecified, or reserved ranges. 4. Disable automatic redirects or implement a redirect handler that applies the same validation to every destination. 5. Protect against DNS rebinding by ensuring the validated address is the address used for the connection or by routing requests through a policy-enforcing proxy. 6. Consider an explicit hostname allowlist where monitoring targets are known in advance. 7. Require an explicit opt-in option for authorized internal-network monitoring. 8. Apply request-rate limits and bounded positive timeout values to reduce scanning and resource-exhaustion risks. 9. Add tests covering IPv4, IPv6, alternative address notation, DNS rebinding, and redirects from public hosts to private addresses. ]]>

T09 · Insecure Skill Coding Practices

Note
Location
uptimecheck.py:39
Finding
Complete URLs May Be Persisted in Plaintext History<![CDATA[ ## Vulnerability Details **File Location**: `uptimecheck.py:39-42` and identical code in `scripts/uptimecheck.py:39-42` **Vulnerability Type**: Plaintext persistence of potentially sensitive URL data **Risk Level**: Low ### Vulnerable Code ```python if args.save: DB.parent.mkdir(parents=True, exist_ok=True) with open(DB, "a") as f: for r in results: f.write(json.dumps(r) + "\n") ``` The result object contains the original URL without redaction: ```python return {"url": url, "status": resp.status, "ms": ms, "ok": True, "ts": datetime.now(timezone.utc).isoformat()} ``` ### Technical Analysis When `--save` is enabled, the complete user-supplied URL is written to `~/.uptimecheck/checks.jsonl`. No normalization or redaction is performed before persistence. URLs may contain sensitive information in user-information components, query strings, paths, or fragments, including: - API keys - Signed URL parameters - Session or access tokens - Internal hostnames and resource identifiers The directory and file are created without explicit restrictive permission modes. Their effective permissions therefore depend on the user's process umask and the state of any existing directory or file. The history is also displayed without redaction by the `history` command. The same storage implementation is present in both Python entry points. ### Attack Path 1. A user checks a URL containing a secret, such as a signed query parameter, and enables `--save`. 2. The complete URL is inserted into the result object. 3. The result is serialized and appended to `~/.uptimecheck/checks.jsonl`. 4. The secret remains on disk after the check completes. 5. Another local process or user with permission to read the file, or a backup/log collection system, obtains the URL and its embedded secret. 6. The exposed credential may be reused until it expires or is revoked. ### Impact Assessment The direct impact is disclosure of secrets embedded in monitored ...[truncated 454 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Do not persist complete URLs by default. 2. Parse URLs before storage and remove user-information and fragments. 3. Redact sensitive query parameters such as `token`, `key`, `api_key`, `signature`, `auth`, and `access_token`. 4. Prefer storing only a normalized origin and path, or a user-defined non-sensitive endpoint label. 5. Create `~/.uptimecheck` with mode `0700` and the history file with mode `0600`, independently of the process umask. 6. Verify permissions on existing history files and refuse to use files with unsafe ownership or permissions. 7. Apply the same redaction when displaying history and error messages. 8. Document that secret-bearing URLs should not be supplied and provide a safe migration mechanism to remove or rewrite existing sensitive history records. ]]>
Vulnerability Patterns
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (1)

Lp3

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding
The skill advertises and operationally requires network access, file reads, and file writes, but it does not declare any explicit tool scope or permissions boundary. This creates an authorization gap where an agent runtime or reviewer cannot easily enforce least privilege, increasing the risk of unintended outbound requests, reading arbitrary local files via batch input, or persisting data to disk without clear user consent.

Static analysis

No suspicious patterns detected.