GitHub Actions CI Integration

Run automated security scans on every push or pull request with Scantient's CI endpoint. Fail your pipeline automatically if critical vulnerabilities are detected.

Quick Start

  1. Generate an API key in Settings → API Keys.
  2. Add it as a GitHub secret named SCANTIENT_API_KEY.
  3. Set your app URL as an environment variable or inline in the workflow.
  4. Add the workflow below to .github/workflows/scantient.yml.
name: Scantient Security Scan
on: [push, pull_request]

jobs:
  scantient:
    runs-on: ubuntu-latest
    steps:
      - name: Run Scantient Security Scan
        run: |
          RESULT=$(curl -s -X POST https://scantient.com/api/public/ci-scan \
            -H "X-API-Key: ${{ secrets.SCANTIENT_API_KEY }}" \
            -H "Content-Type: application/json" \
            -d '{"url": "${{ env.APP_URL }}", "failOn": "critical"}')
          echo "$RESULT" | jq .
          PASSED=$(echo "$RESULT" | jq -r '.passed')
          if [ "$PASSED" != "true" ]; then
            echo "Scantient scan failed — security issues detected"
            exit 1
          fi

CI Endpoint Reference

POST/api/public/ci-scan

Runs a full Scantient security scan. Returns HTTP 200 if passed, 422 if failed.

Request

curl -s -X POST https://scantient.com/api/public/ci-scan \
  -H "X-API-Key: vs_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://your-app.com", "failOn": "critical"}'

Response

{
  "passed": true,
  "score": 87,
  "grade": "B",
  "findingsCount": 3,
  "criticalCount": 0,
  "highCount": 1,
  "mediumCount": 2,
  "summary": "1 HIGH, 2 MEDIUM findings detected",
  "findings": [...],
  "dashboardUrl": "https://scantient.com/apps/clx123..."
}

Security Badge

Add a Scantient security badge to your README to show your security score at a glance.

[![Scantient Security](https://scantient.com/api/public/badge?url=https://your-app.com&key=vs_your_key)](https://scantient.com)
Badge colors:
  • Green: score ≥ 80
  • Yellow: score 50–79
  • Red: score < 50

Threshold Levels

failOn valueFails CI whenRecommended for
criticalAny CRITICAL finding existsDefault: all projects
highAny HIGH or CRITICAL finding existsProduction-critical services
mediumAny MEDIUM, HIGH, or CRITICAL finding existsHigh-compliance environments