Zero-CDN Developer API · OpenAPI 3.1 & SARIF 2.1.0
EdgePosture API & CI/CD Gate Docs
Integrate automated domain security grading, SARIF 2.1.0 Code Scanning uploads, signed Watchtower webhooks, live SVG badges, and PNG OpenGraph cards into GitHub Actions, GitLab CI, and SecOps pipelines.
Core REST & Asset Endpoints
Full machine-readable OpenAPI 3.1.0 schema: /openapi.json.
| Method | Endpoint | Description |
|---|---|---|
/api/v1/scan | Run or retrieve a cached 5-pillar external security audit ({"domain": "example.com", "force": false}). | |
/api/v1/compare?a=domA&b=domB | Side-by-side 5-pillar comparison and pillar delta breakdown between two public domains. | |
/api/v1/portfolio | Batch posture triage for up to 10 domains ({"domains": ["a.com", "b.com"]}). | |
/api/v1/portfolio/{batch_id} | Retrieve a persisted Portfolio batch audit snapshot and KPI summary by batch_id. | |
/api/v1/gate | CI/CD quality gate returning HTTP 200 on pass or HTTP 422 on policy failure. Supports JSON (format=json) and GitHub Code Scanning SARIF 2.1.0 (format=sarif) with stable rule IDs (EP-GATE-MIN-SCORE, EP-GATE-DMARC-MISSING, EP-GATE-HTTPS-REQUIRED). | |
/api/v1/watchtower/test-webhook | Send an SSRF-safe signed HTTPS:443 test ping (watchtower.test) returning {ok, status_code, latency_ms, error} (3 valid tests / 10min / IP). | |
/api/v1/history/{domain} | Chronological posture score history (up to 20 snapshots) and latest canonical DNS drift diff. | |
/badge/{domain}.svg | Read-only cached WCAG-AA shields-style SVG posture badge (?style=flat|compact). | |
/og/scan/{domain}.png | Read-only 1200x630 PNG OpenGraph card for single domain reports (also /og/compare/{a}/{b}.png). |
Quickstart cURL Example
curl -sS -X POST "https://edgeposture.com/api/v1/scan" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ep_live_your_token_here" \
-d '{"domain": "edgeposture.com"}'Copy-Paste CI/CD Pipeline Snippets
GitHub Actions (.github/workflows/edgeposture.yml) — SARIF 2.1.0
name: EdgePosture Security Gate
on: [push, pull_request]
jobs:
posture-gate:
runs-on: ubuntu-latest
permissions:
security-events: write
steps:
- name: Run EdgePosture CI/CD Gate (SARIF 2.1.0)
id: gate
run: |
HTTP_CODE=$(curl -sS -o edgeposture.sarif -w "%{http_code}" \
-X POST "https://edgeposture.com/api/v1/gate" \
-H "Authorization: Bearer ${{ secrets.EDGEPOSTURE_API_KEY }}" \
-H "Content-Type: application/json" \
-d '{"domain":"yourdomain.com","min_score":85,"format":"sarif"}')
echo "http_code=$HTTP_CODE" >> "$GITHUB_OUTPUT"
- name: Upload SARIF to GitHub Code Scanning
if: always() && hashFiles('edgeposture.sarif') != ''
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: edgeposture.sarif
- name: Enforce Gate Verdict
run: |
if [ "${{ steps.gate.outputs.http_code }}" != "200" ]; then
echo "EdgePosture gate failed with HTTP ${{ steps.gate.outputs.http_code }}"
exit 1
fiGitLab CI (.gitlab-ci.yml)
edgeposture_gate:
stage: test
image: curlimages/curl:8.11.1
script:
- >-
curl -sS --fail-with-body -X POST
"https://edgeposture.com/api/v1/gate"
-H "Authorization: Bearer ${EDGEPOSTURE_API_KEY}"
-H "Content-Type: application/json"
-d '{"domain":"yourdomain.com","min_score":85,"require_dmarc":true}'Watchtower Webhooks & HMAC-SHA256 Verification
Every outbound Watchtower alert and POST /api/v1/watchtower/test-webhook ping is delivered over DNS-pinned HTTPS:443 with headers X-EdgePosture-Event, X-EdgePosture-Timestamp (Unix epoch seconds), and X-EdgePosture-Signature formatted as sha256=<hex> computed over HMAC-SHA256(secret, "{timestamp}.{raw_body}").
Python HMAC-SHA256 Webhook Signature Verification
import hashlib, hmac
def verify_edgeposture_webhook(secret: str, timestamp: str, raw_body: bytes, sig_header: str) -> bool:
expected = "sha256=" + hmac.new(
secret.encode("utf-8"),
f"{timestamp}.".encode("utf-8") + raw_body,
hashlib.sha256,
).hexdigest()
return hmac.compare_digest(expected, sig_header.strip())Request a Free Developer API Key
Free developer keys include 100 requests/day across /api/v1/scan, /api/v1/compare, and /api/v1/gate. Founding Early Access — No Card Required.