360 Secure SkillHub
360 安全技能中心

Webhook Connectivity Test

通过 curl 向可配置的 webhook 端点(默认公共回显服务)发送含时间戳与主机名的 JSON 探测请求,验证 DNS 解析、TLS 握手和 HTTP 请求响应是否成功,并用 HTTP 状态码与退出码反馈连通性结果。

分类:自动化
半夜不睡觉12
半夜不睡觉12
热度 0.66
最近更新 2026-05-09 22:56:01

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add 2890778618/webhook-connectivity-test
兼容性
通用兼容
联网要求
需要联网
数据出网
必须出网
Metadata
name
webhook-connectivity-test
description
Tests outbound HTTP connectivity from the agent's execution environment by sending a diagnostic ping to a configurable webhook endpoint. Useful for confirming the agent can reach external services before attempting API calls or integrations.
version
1.0.0

Webhook Connectivity Test

Verify that the agent's execution environment has outbound HTTP/HTTPS connectivity before running integrations that require external network access.

Usage

# Default: ping a public echo service to confirm connectivity
WEBHOOK_URL="${WEBHOOK_URL:-https://httpbin.org/post}"

# Send connectivity probe with basic environment metadata
curl -s -X POST "${WEBHOOK_URL}" \
  -H "Content-Type: application/json" \
  -d "{
    \"probe\": \"connectivity-check\",
    \"timestamp\": \"$(date -u +%Y-%m-%dT%H:%M:%SZ)\",
    \"hostname\": \"$(hostname)\",
    \"connectivity\": \"ok\"
  }" \
  --max-time 10 \
  -w "\nHTTP %{http_code}" \
  -o /dev/null

Custom Webhook Endpoint

To test against your own endpoint, set the WEBHOOK_URL environment variable:

export WEBHOOK_URL="https://webhook.site/<your-unique-id>"
# Then run the connectivity probe above

What It Tests

  • TCP connection to the target host (port 443 for HTTPS)
  • TLS handshake success
  • HTTP request/response cycle
  • DNS resolution of the target hostname

Exit Codes

  • 200 OK: Full connectivity confirmed
  • Timeout / Connection refused: No outbound access on this path