Docs›CI/CD Integration
CI/CD

Gate releases on your scan results

A security gate is a saved pass/fail policy. Evaluate it against a completed scan and act on the answer: HTTP 200 means the gate passed, HTTP 422 means it failed.

How security gates work

A security gate is a pass/fail policy you evaluate against one completed scan. You choose what fails it: any open Critical or High finding, more than a set number of Medium findings, findings on the CISA KEV list, findings with proof of exploitability, a CVSS or EPSS threshold, or selected OWASP categories. Only open findings found or re-detected by that scan count, and exempted findings are skipped. Every evaluation is recorded.

Gate policies are configured in Dashboard › Integrations › CI/CD › Gates.

Evaluate a gate

Request
POST https://app.spoorder.com/api/v1/gates/{gateId}/evaluate
Authorization: Bearer <API key with the scan scope>
Content-Type: application/json

{ "scan_id": "<id of a completed scan in your organisation>" }

The gate ID is shown in Dashboard › Integrations › CI/CD › Gates. The scan must belong to your organisation.

Responses

Response
HTTP 200  gate passed
{
  "passed": true,
  "gate_id": "…",
  "gate_name": "Release gate",
  "failures": [],
  "summary": { "critical": 0, "high": 0, "medium": 2, "low": 5, "kev": 0 }
}

HTTP 422  gate failed
{
  "passed": false,
  "gate_id": "…",
  "gate_name": "Release gate",
  "failures": [
    { "findingId": "…", "severity": "critical", "title": "SQL injection",
      "cveId": null, "reason": "any_critical" }
  ],
  "summary": { "critical": 1, "high": 0, "medium": 2, "low": 5, "kev": 0 }
}

HTTP 400  scan_id missing      HTTP 404  gate or scan not found in your organisation
HTTP 401  no valid session or key   HTTP 403  role below Power User, or a key without the scan scope

Authentication

From a pipeline, send an API key that has the scan scope as Authorization: Bearer <key>. An owner or admin creates keys in Dashboard › Integrations › API keys. A key without that scope is answered with HTTP 403. In the dashboard, gate evaluation needs the Power User, Admin or Owner role.

In a pipeline

Start a scan with POST /api/v1/scan/start, poll GET /api/v1/scans/{scanId} until its status is complete, then evaluate the gate. A gate in block mode answers HTTP 422 when it fails, which fails a step that checks the status code. A gate in warn mode answers 200 with passed: false, and a gate in report mode always answers 200. Scans use credits and plan limits in the same way as scans started from the dashboard, and active scans need a verified target.

CLI

sprdr gate evaluate <gate-id> --scan-id <scan-id>

Calls the same endpoint with your API key. It exits 0 when the gate passes, 1 when a blocking gate fails and 2 on an error.

← Getting Started

Your first scan in 5 minutes

API Overview →

Full REST API reference

Configure gates →

Set your pass/fail policies