Cluster 9 · CI/CD Automation · SemVer · SARIF 2.1.0

Automating OpenAPI Breaking-Change SemVer Gates & SARIF 2.1.0 in CI/CD

Block accidental API breaking changes, unauthenticated routes, and OWASP API Top 10 regressions directly on GitHub Pull Requests using deterministic SemVer diff gates, SARIF 2.1.0 code-scanning uploads, and Apify/MCP automation.

Zero Telemetry · Strict CSP (connect-src 'none')

1. Paste OpenAPI Spec (Quick-Lint) & Controls

OAS 2.0 / 3.0 / 3.1 · OWASP API Top 10
Parsed YAML OpenAPI 3.1.0 · 2 ops · 1 {id} routes · 0 nullable: true · ~684 tok
OWASP API Top 10 & MCP Readiness Checklist (100 Points)
Low API Exploit & Token Risk
100 / 100 (A)
HARDENED — OWASP & MCP READY

Passing: 8 · Fixes Needed: 0 · Target: OpenAPI 3.1.0

Est. MCP Schema Tokens
2,128 tok
$9.58/mo at 50 turns/day ($3/1M)
Reclaimable Diet Savings
-288 tok
Saves $1.30/mo via MCPDiet
API2-AUTH (OWASP API2:2023): Explicit components.securitySchemes (Bearer JWT / OAuth2 scopes) + global/op security PASS
Bearer JWT / OAuth2 securitySchemes and security[] requirements are enforced.
API1-BOLA (OWASP API1:2023): Object-ID routes ({id}) enforce explicit 401/403 responses & tenant ownership scopes PASS
Parameterized {id} endpoints verify tenant ownership and document 401/403 status codes.
API3-BOPLA (OWASP API3:2023): additionalProperties: false + readOnly: true on server-owned fields (role, id, plan) PASS
Request schemas lock additionalProperties: false and protect server fields with readOnly: true.
API4-BOUNDS (OWASP API4:2023): maxLength, maxItems, maximum & bounded pagination (limit <= 100 / cursor) on inputs PASS
Strings, arrays, and pagination limits define strict maxLength, maxItems, and maximum bounds.
API8-TLS (OWASP API8:2023): HTTPS-only servers[] URLs (zero http:// prod) + strict CORS allowlist & headers PASS
Production servers[] enforce HTTPS-only URLs and strict origin allowlist CORS.
API4-429 (OWASP API4 / API8): Explicit 401, 403 & 429 Too Many Requests responses with Retry-After / X-RateLimit-* PASS
401, 403, and 429 Too Many Requests responses include Retry-After / X-RateLimit-* headers.
API9-INV (OWASP API9:2023): Versioned base paths + deprecated: true ops declare Sunset header & replacement path PASS
Deprecated endpoints publish Sunset headers and migration paths; zero shadow APIs.
MCP-TOKEN (AI / MCP Readiness): Concise tool descriptions (<= 120 tok/op) & OpenAPI 3.1 type arrays (no nullable: true) PASS
Operation descriptions stay lean (~38 tok/op) and OpenAPI 3.1.0 avoids nullable drift.
openapi-owasp-remediation.yaml
openapi: "3.1.0"
info:
  title: "CI-Gated Platform API"
  version: "1.0.0"
servers:
  - url: https://api.example.com/v1
    description: Enforce TLS 1.2+ only (never http:// in production)
components:
Zero-Upload SpecDiff $49 Remediation PR

Audit Full OpenAPI Specs or Ship a Hardened PR Today

Run a 100% browser-side breaking-change diff, OWASP API Top 10 scan & SARIF 2.1.0 export on SpecDiff (https://spec.runglab.dev), order a $49 Done-For-You OpenAPI & MCP Remediation PR on Creem, or automate via POST /v1/openapi/audit (API Hub), remote MCP tool audit_openapi_spec, and Apify Cloud PPE.

OpenAPI Controls, Bounds & Verification Reference

Rule / Control Hardened Pattern Security & Token Rationale
Breaking Change SemVer MAJOR / MINOR / PATCH gate Blocks removed paths, tightened request fields, or deleted response codes on MINOR PRs
SARIF 2.1.0 Output github/codeql-action/upload-sarif Surfaces OWASP API1–API9 & schema violations inline inside GitHub Security tab
Live API Gateway POST /v1/openapi/audit & /diff Zero-setup REST endpoints via https://hub.runglab.dev
Cloud & MCP Runners Apify Actor + dev.runglab/devtools Run batch repository scans via Apify PPE or PR checks via MCP

GitHub Actions — OpenAPI OWASP Audit + SARIF 2.1.0 Security Gate

openapi-owasp-sarif.yml
name: OpenAPI OWASP & Breaking-Change Gate
on:
  pull_request:
    paths:
      - "openapi/**"
      - "docs/openapi.*"

permissions:
  contents: read
  security-events: write

jobs:
  openapi-audit:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Run RungLab OpenAPI OWASP & Token Audit
        run: |
          jq -n --rawfile spec openapi/openapi.yaml '{spec: $spec, format: "sarif"}' > payload.json
          curl -fsS -X POST https://hub.runglab.dev/v1/openapi/audit \
            -H "Content-Type: application/json" \
            -d @payload.json -o openapi-audit.sarif
      - name: Upload SARIF 2.1.0 to GitHub Code Scanning
        uses: github/codeql-action/upload-sarif@v3
        if: always()
        with:
          sarif_file: openapi-audit.sarif

Export SARIF 2.1.0 Locally or Automate via Apify PPE

run-specdiff-apify.txt
# Option A (Zero-Upload Browser Export):
#   Open https://spec.runglab.dev -> Paste Base + Head OpenAPI specs -> Download SARIF 2.1.0
#
# Option B (Apify Cloud PPE Actor for Scheduled Repo Sweeps):
#   https://apify.com/runglab/openapi-spec-diff-auditor
#
# Option C ($49 Done-For-You OpenAPI & MCP Remediation PR):
#   https://www.creem.io/product/prod_4KoVJW4YEAf6XjjuSK44lp

Key Engineering Takeaways

  • Catching OpenAPI breaking changes and OWASP API1–API9 regressions in PR review costs minutes; discovering them after publishing broken SDKs or leaked tenant routes costs weeks.
  • SARIF 2.1.0 integrates natively into GitHub Code Scanning alerts and PR annotations without proprietary dashboards.
  • Combining SpecDiff's zero-upload browser workbench for local iteration with automated CI checks (`POST /v1/openapi/audit` or `audit_openapi_spec` MCP) keeps API contracts and MCP tool schemas continuously synchronized.

Common Contract Pitfalls to Avoid

  • Treating OpenAPI files as hand-edited marketing docs that drift away from production routes and CI validation.
  • Ignoring MINOR vs MAJOR contract breaks when tightening optional fields to `required: true` or renaming enum values.
  • Failing to gate PRs on `http://` server regressions or newly added endpoints lacking `securitySchemes`.

More OpenAPI OWASP & MCP Optimization Guides

← Back to OpenAPI OWASP & MCP Scorer Hub · 2026 N=26 OpenAPI & MCP Benchmark → · MCP Context Token Cost Calculator → · CORS Preflight & Webhook HMAC Debugger → · SpecDiff Live Diff & SARIF → · $49 Remediation PR →

Frequently Asked Questions

What breaking changes does a SemVer OpenAPI diff catch automatically?

Endpoint removals, HTTP method removals, new required request properties or parameters, narrowed enums/bounds, removed success status codes, and altered response property types.

Does SpecDiff export SARIF 2.1.0 locally without sending proprietary schemas to a server?

Yes — https://spec.runglab.dev runs 100% in your browser and exports SARIF 2.1.0 directly with zero server upload.

How can AI coding assistants check OpenAPI changes before opening a PR?

Connect the Official MCP Registry server `dev.runglab/devtools` (`https://mcp-server.runglab.dev/`) and call `audit_openapi_spec` right inside Cursor, VS Code, or Claude Desktop.