SaaSFort

Intégrations

Le scan de sécurité dans chaque pipeline

Bloquez les déploiements sur note de sécurité. Lancez un scan complet en 66 vérifications depuis GitHub Actions, GitLab CI ou Jenkins en moins de 60 secondes.

1

Générer une clé API

Accédez à Dashboard → Compte → Générer une clé API. La clé commence par sf_. Stockez-la comme secret CI.

2

Ajouter au pipeline

Appelez POST /api/v1/ci avec votre domaine et seuil. Retourne verdict: pass ou fail.

3

Bloquer sur note

HTTP 200 = succès, HTTP 422 = échec. Interrompez votre étape pipeline sur 422. Définissez threshold (0-100) et le niveau fail_on.

GitHub Actions

Déclenchez sur push ou pull_request

.github/workflows/security-scan.yml
# Ajoutez SAASFORT_API_KEY dans GitHub Secrets → Settings → Secrets → Actions
name: SaaSFort Security Scan
on: [push, pull_request]

jobs:
  security:
    runs-on: ubuntu-latest
    steps:
      - name: SaaSFort Security Gate
        env:
          SAASFORT_API_KEY: ${{ secrets.SAASFORT_API_KEY }}
        run: |
          RESULT=$(curl -sf -X POST https://api.saasfort.com/api/v1/ci \
            -H "Content-Type: application/json" \
            -H "X-API-Key: $SAASFORT_API_KEY" \
            -d '{"domain":"votre-domaine.com","threshold":70}')
          echo "$RESULT" | jq .
          VERDICT=$(echo "$RESULT" | jq -r .verdict)
          echo "Verdict: $VERDICT"
          if [ "$VERDICT" = "fail" ]; then
            echo "Security gate failed"
            exit 1
          fi

Copiez depuis Dashboard → Clé API → Obtenir le snippet de config

GitLab CI

.gitlab-ci.yml

# SAASFORT_API_KEY → Settings → CI/CD → Variables
security-scan:
  stage: test
  script:
    - |
      RESULT=$(curl -sf -X POST \
        https://api.saasfort.com/api/v1/ci \
        -H "Content-Type: application/json" \
        -H "X-API-Key: $SAASFORT_API_KEY" \
        -d '{"domain":"votre-domaine.com"}')
      echo "$RESULT" | jq .
      [ "$(echo $RESULT | jq -r .verdict)" = "pass" ]

Jenkins

Declarative pipeline

// Jenkinsfile
pipeline {
  stages {
    stage('Security Gate') {
      steps {
        withCredentials([string(
          credentialsId: 'saasfort-api-key',
          variable: 'SAASFORT_KEY'
        )]) {
          script {
            def r = sh(script: """
              curl -sf -X POST \
                https://api.saasfort.com/api/v1/ci \
                -H 'X-API-Key: ${SAASFORT_KEY}' \
                -d '{"domain":"votre-domaine.com"}'
            """, returnStdout: true)
            def j = readJSON text: r
            if (j.verdict == 'fail') error(j.reason)
          }
        }
      }
    }
  }
}

Référence API

Tous les endpoints utilisent l'en-tête X-API-Key: sf_… ou Authorization: Bearer <jwt>.

POST
/api/v1/ci

Lance un scan + gate qualité. Retourne verdict: pass/fail. HTTP 200 = succès, 422 = échec.

Body: {"domain","threshold","fail_on"}
GET
/api/v1/ci/config?platform=github

Obtenir les snippets CI prêts à coller pour github, gitlab ou jenkins.

POST
/api/scan/webhook

Scan asynchrone -- mis en queue, résultats POST à votre URL de callback dès la fin.

Body: {"domain","callback_url","threshold"}
POST
/api/me/api-key

Générer ou renouveler votre clé API. Nécessite une auth JWT.

GET
/api/openapi.yaml

Spécification OpenAPI 3.1 complète. À importer dans Postman, Insomnia ou Bruno.

Télécharger →

Webhook asynchrone

Pour les scans longue durée ou les architectures event-driven. Fire-and-forget -- les résultats sont postés à votre endpoint dès qu'ils sont prêts.

curl -X POST https://api.saasfort.com/api/scan/webhook \
  -H "X-API-Key: sf_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "domain": "votre-domaine.com",
    "callback_url": "https://votre-app.com/security-hook",
    "threshold": 70
  }'

# Réponse :
{ "ok": true, "scan_id": "abc123", "status": "queued" }

# Votre callback reçoit :
{
  "verdict": "pass",
  "score": 85,
  "grade": "B",
  "domain": "votre-domaine.com",
  "result": { ... }
}

Badge NIS2-Ready

Les entreprises avec une note B ou supérieure peuvent intégrer un badge vérifiable -- sur leur site, LinkedIn et leurs questionnaires sécurité.

# Obtenir l'URL SVG de votre badge
curl https://api.saasfort.com/api/badge/svg?domain=votre-domaine.com

# Intégration HTML (à placer sur votre site)
<img src="https://api.saasfort.com/api/badge/svg?domain=votre-domaine.com"
     alt="NIS2-Ready par SaaSFort"
     width="200" />

# Vérifier n'importe quel badge
curl https://api.saasfort.com/api/badge/verify?domain=votre-domaine.com

Le badge est révoqué automatiquement si la note passe sous B. Disponible à partir de l'offre Growth.

Prêt à bloquer les déploiements insuffisants ?

Générez votre clé API dans le dashboard -- essai Growth 14 jours, sans carte bancaire.