{
  "openapi": "3.1.0",
  "info": {
    "title": "CRAReady by RungLab — EU Cyber Resilience Act (Regulation (EU) 2024/2847) Auditor",
    "version": "1.0.0",
    "description": "Deterministic 100-point EU Cyber Resilience Act (Regulation (EU) 2024/2847 Art. 13/14) readiness auditor covering RFC 9116 security.txt (20 pts), CVD & ENISA Art. 14 24h early-warning readiness (20 pts), CSAF 2.0 & OpenVEX/CycloneDX VEX feeds (20 pts), SBOM & supply-chain transparency (15 pts), Transport & Edge Security Posture (15 pts), and DNS CAA/DMARC/SPF authenticity (10 pts), plus a $49 6-File Fix Pack.",
    "contact": {
      "name": "RungLab Support",
      "email": "support@runglab.dev",
      "url": "https://cra.runglab.dev/"
    }
  },
  "servers": [
    {
      "url": "https://cra-api.runglab.dev",
      "description": "CRAReady Edge Audit Worker"
    },
    {
      "url": "https://api.runglab.dev",
      "description": "RungLab Checkout, Lead & Funnel Telemetry API"
    }
  ],
  "paths": {
    "/api/audit": {
      "get": {
        "operationId": "auditCraUrl",
        "summary": "Audit a live public domain or URL for EU Cyber Resilience Act (Regulation (EU) 2024/2847 Art. 13/14) readiness",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "description": "Public website URL or domain to audit (e.g. https://stripe.com)",
            "schema": { "type": "string", "example": "https://stripe.com" }
          },
          {
            "name": "refresh",
            "in": "query",
            "required": false,
            "description": "Set to 1 to bypass the 600s edge cache",
            "schema": { "type": "string", "enum": ["0", "1"] }
          }
        ],
        "responses": {
          "200": {
            "description": "100-point CRAReady audit report with 6 deterministic checks, findings CRA-001..CRA-016, and beforeAfterUplift for the $49 Fix Pack"
          },
          "400": { "description": "Invalid target URL" },
          "422": { "description": "Blocked by SSRF policy" }
        }
      },
      "post": {
        "operationId": "auditCraUrlPost",
        "summary": "Audit a live public domain or URL via JSON POST { url }",
        "responses": {
          "200": { "description": "100-point CRAReady audit report" },
          "400": { "description": "Invalid target URL or JSON body" },
          "422": { "description": "Blocked by SSRF policy" }
        }
      }
    },
    "/api/audit-html": {
      "post": {
        "operationId": "auditOfflineCraArtifacts",
        "summary": "Zero-network offline audit of pasted HTML, optional securityTxt, csafJson, vexJson, headers, sbomJson & dns flags",
        "responses": {
          "200": { "description": "Zero-network 100-point CRAReady audit report (0 outbound requests)" },
          "400": { "description": "Invalid input JSON or missing artifacts" }
        }
      }
    },
    "/health": {
      "get": {
        "operationId": "getCraReadyHealth",
        "summary": "Verify CRAReady edge worker health",
        "responses": {
          "200": { "description": "Healthy worker status JSON" }
        }
      }
    }
  }
}
