http_probe
暂无简介
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 0
- Forks
- 0
02 资源文件 1
- 脚本__init__.py13.3 KB
03 SKILL.md 正文
HTTP Probe — read-only uptime / render-probe tool
You have an http_probe tool that performs a single HTTPS GET against a public URL, follows
redirects (up to the configured limit), and returns a structured health report.
When to use it
- Verify that a live website is actually serving content after a deploy (deploy success ≠ the site renders — the server could return a directory listing, a maintenance page, or "Not Found").
- Confirm that a service endpoint is reachable from the outside and returning the expected HTTP status.
- Check that a page contains (or does NOT contain) specific text — e.g. confirm the expected
<title>appears, or confirm an error string ("Index of /","Error establishing a database connection") is absent. - Post-deploy defacement detection — probe for absence of known attacker signatures
(
"graybyte","Google Gemini – AI","Welcome to WordPress") to catch a site compromise within minutes of deployment instead of requiring manual investigation.
Confirm endpoint paths before probing
When verifying a service endpoint (API route, auth callback, webhook, etc.), always read the route definitions from the source code first to confirm the exact path. Do NOT guess or construct paths from naming conventions — a wrong path returns a misleading 400/401/403 instead of a clear 404, confusing the operator about whether the endpoint is broken or simply non-existent.
Steps:
- Read the route registration file (e.g.
app.pyroute table, FastAPI/StarletteRoute(...)declarations, or the framework's URL config). - Extract the exact path string (e.g.
/auth/login,/chat/auth/mobile-token). - Probe that exact path — do not substitute
/mobile/auth/loginfor/auth/loginor/api/mobile_auth/startfor/chat/auth/mobile-token.
Allowed operation
| Tool | Description |
|---|---|
http_probe |
HTTPS GET against a public URL; returns status, body snippet, health |
The tool signature is:
http_probe(
url: str,
expect_status: int = 200,
expect_contains: list[str] = [],
expect_absent: list[str] = [],
) -> str
Return value
A JSON string with these fields:
url— the original URL you suppliedfinal_url— the URL after any redirectsstatus_code— final HTTP status coderesponse_time_ms— round-trip time in millisecondscontent_type— theContent-Typeresponse headerbody_size_bytes— total response body size (bytes)body_snippet— first ~2 KB of the body texthealthy—truewhen all assertions pass and no transport error occurredchecks— list of assertion results, each withcheck,passed,detailerror— non-empty string when a transport/hostname/scheme error prevented the probe
Assertions
You supply three optional assertion parameters:
expect_status(default 200) — the expected HTTP statusexpect_contains— list of substrings that MUST appear in the response body (case-insensitive)expect_absent— list of substrings that must NOT appear in the response body (case-insensitive)
Every assertion that fails adds a checks entry with passed: false and a human-readable detail.
healthy is false when any check fails.
Common expect_absent patterns:
"Index of /"— Apache/Nginx directory listing"Not Found"— generic 404 page"Error establishing a database connection"— WordPress DB down"403 Forbidden"— access denied"Service Unavailable"— 503 gateway
Defacement-specific patterns (post-deploy verification):
"graybyte"— known attacker group signature"Google Gemini – AI"— AI-generated landing-page spam"Generated by ChatGPT"— AI-generated landing-page spam"Welcome to WordPress"— fresh WordPress install (attacker replaced site)"WordPress › Installation"— WordPress setup wizard"Joomla! - Installation"— Joomla setup wizard"Drupal installation"— Drupal setup wizard
Fleet components
Fleet components are reached at their internal addresses, taken from the central-deploy roster —
http://mail:8080/openapi.json, not https://mail.deploy.robotsix.net/openapi.json. Use the
base_url the component roster gives you.
These hosts are implicitly allowlisted; you do not need to list them in the main allowlist. No
credential is involved: the request stays on the internal container network and never reaches the
fleet's public edge or its SSO login.
Only components with chat access enabled appear in the roster. A public *.deploy.robotsix.net URL
will be redirected to the SSO login and is not a way in.
Safety
- Read-only — GET only; no other HTTP methods are exposed.
- No credentials at all — fleet components are reached over the internal network, which needs none; nothing is injected and there is nothing for you to see.
- Hostname allowlisted — the probe only reaches hosts in the configurable allowlist
(operator-controlled) plus the fleet components with chat access enabled. At minimum
www.robotsix.netandrobotsix.netare permitted. - Size-capped — only the first ~2 KB of the response body are read and returned.
- Timeout — the request has a short timeout (default 10 s); one request per call.
Example calls
# Basic health check — is the site up?
http_probe("https://www.robotsix.net")
# Deploy verification — did the page land?
http_probe(
"https://www.robotsix.net",
expect_status=200,
expect_contains=["Robotsix"],
expect_absent=["Index of /", "Not Found"],
)
# Post-deploy defacement check — catch a compromise immediately
http_probe(
"https://www.robotsix.net",
expect_status=200,
expect_absent=[
"graybyte",
"Google Gemini – AI",
"Welcome to WordPress",
"WordPress › Installation",
],
)