API REST

OpenAPI 3.1, webhooks signés, SDK Python · Go · TypeScript

Intégrez SecuScan dans vos pipelines CI/CD, votre SIEM ou votre ticketing. Spec OpenAPI publique, rate limit clair, idempotency keys.

# Lancer un scan EASM sur un nouveau périmètre
curl -X POST https://api.secuaas.com/v1/secuscan/scans \
  -H "Authorization: Bearer $SCANYZE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "scope": ["example.com", "api.example.com"],
    "scan_type": "easm",
    "priority": "high"
  }'
# → { "scan_id": "scn_01HX...", "status": "queued", "eta_seconds": 180 }
bash

Auth Bearer

Tokens API rotation manuelle, scopes granulaires (scans:read, scans:write, reports:read…).

Idempotency-Key

Tous les endpoints POST acceptent un header Idempotency-Key (UUID) pour éviter les doublons sur retry.

Webhooks signés

HMAC-SHA256 sur chaque payload, header X-Scanyze-Signature, retry avec backoff exponentiel.

OpenAPI 3.1

Spec publique téléchargeable, génération de clients automatique, exemples curl pour chaque endpoint.

Vérification webhook

Chaque webhook envoyé par SecuScan est signé. Vérifiez la signature côté serveur pour rejeter les payloads non authentiques.

webhook-verify.js
// Vérification HMAC-SHA256 d'un webhook SecuScan
import crypto from 'node:crypto';

function verify(signature, body, secret) {
  const expected = 'sha256=' + crypto
    .createHmac('sha256', secret)
    .update(body)
    .digest('hex');
  return crypto.timingSafeEqual(
    Buffer.from(signature),
    Buffer.from(expected),
  );
}

Endpoints principaux

  • POST /v1/scansLancer un scan
  • GET /v1/scans/{id}Récupérer le statut
  • GET /v1/scans/{id}/findingsLister les findings priorisés
  • POST /v1/agentsProvisionner un agent endpoint
  • GET /v1/reports/{id}.pdfTélécharger un rapport auditable
  • POST /v1/webhooksCréer un webhook signé