SecuScanProduction
API SecuScan
Intégrez SecuScan partout : SDK, REST, webhooks
OpenAPI 3.1, authentification Bearer/JWT, webhooks signés HMAC, SDK Python et Go officiels.
# Lancer un scan EASM sur un nouveau périmètre
curl -X POST https://api.secuaas.com/v1/secuscan/scans \
-H "Authorization: Bearer $SECUSCAN_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
Authentification
Bearer tokens longue durée pour intégration backend, JWT court terme pour sessions UI. Rotation automatique.
Idempotency-Key
Tous les endpoints POST acceptent un header Idempotency-Key (UUID) pour éviter les doublons sur retry.
Webhooks signés HMAC
Header `X-Secuscan-Signature` (SHA-256), payload JSON immuable. Replay protection via `X-Secuscan-Timestamp`.
OpenAPI 3.1
Schéma complet disponible : génération client automatique (openapi-generator, swagger-codegen), Postman collection.
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 scanGET /v1/scans/{id}Récupérer le statutGET /v1/scans/{id}/findingsListe paginée des vulnérabilités, filtres par sévérité, CWE, target, statut.POST /v1/agentsProvisionner un agent endpointGET /v1/reports/{id}.pdfTéléchargement PDF/HTML/JSON, signature HMAC pour intégrité.POST /v1/webhooksEnregistrer un webhook signé (scan.completed, finding.created, target.changed).