Checking OpenAPI & GraphQL Security Scheme and Auth Directive Regressions
Authentication drift cuts both ways: accidentally dropping a route's security requirement or GraphQL @auth(requires: TENANT_ADMIN) directive creates an instant data-exposure breach, while silently adding a new required OAuth2 scope causes live payout integrations to fail with 403 Forbidden.
Unauthenticated Exposure1 Critical Route
Silent Scope Tightening1 Payout Break
Webhook Header RenameX-Signature-256
Prevented Incident Cost$45,000.00
Worked Fintech Release Diff (2026.10 vs 2026.11)
| Endpoint / GraphQL Operation | Release 2026.10 | Release 2026.11 Candidate | Modeled Risk USD |
|---|---|---|---|
GET /v1/accounts/{id}/statements (and GraphQL statements query) |
bearerAuth + @auth(role: OWNER) |
security: [] (public override!) |
$30,000.00 (PII breach incident response) |
POST /v1/payouts |
OAuth scope payouts:write |
Added required payouts:approve_dual |
$10,000.00 (SLA halt on partner payroll) |
| Webhook Signature Verification Header | X-Signature-256 |
Renamed to X-Hub-Sig |
$5,000.00 (dropped settlement webhooks) |
| Total Prevented Security & Downtime Exposure | Verified Production Contract | 3 Auth / Signature Regressions | $45,000.00 |
Reproducible POST /api/v1/diff Request
{
"domain": "openapi_dom",
"baseline": "{\"openapi\":\"3.1.0\",\"paths\":{\"/v1/accounts/{id}/statements\":{\"get\":{\"security\":[{\"bearerAuth\":[]}]}},\"/v1/payouts\":{\"post\":{\"security\":[{\"oauth2\":[\"payouts:write\"]}]}},\"/webhooks/events\":{\"post\":{\"parameters\":[{\"name\":\"X-Signature-256\",\"in\":\"header\",\"required\":true}]}}}}",
"actual": "{\"openapi\":\"3.1.0\",\"paths\":{\"/v1/accounts/{id}/statements\":{\"get\":{\"security\":[]}},\"/v1/payouts\":{\"post\":{\"security\":[{\"oauth2\":[\"payouts:write\",\"payouts:approve_dual\"]}]}},\"/webhooks/events\":{\"post\":{\"parameters\":[{\"name\":\"X-Hub-Sig\",\"in\":\"header\",\"required\":true}]}}}}"
}
Verified DiffProofReport Output
{
"ok": true,
"domain": "openapi_dom",
"summary": "Critical auth regression: GET /v1/accounts/{id}/statements lost bearerAuth (security: []), POST /v1/payouts tightened OAuth scopes, and webhook signature header renamed.",
"total_delta_usd": 45000.0,
"recoverable_overcharge_usd": 45000.0,
"severity": "critical",
"line_item_findings": [
{ "id": "auth-01", "category": "auth_bypass_regression", "item": "GET /v1/accounts/{id}/statements", "baseline_value": "bearerAuth required", "actual_value": "security: [] (unauthenticated)", "delta_usd": 30000.0, "severity": "critical", "claim_action": "Fail CI release immediately; restore bearerAuth and GraphQL @auth(role: OWNER)" },
{ "id": "auth-02", "category": "oauth_scope_tightening", "item": "POST /v1/payouts", "baseline_value": "payouts:write", "actual_value": "payouts:write + payouts:approve_dual", "delta_usd": 10000.0, "severity": "high", "claim_action": "Gate dual-approval behind opt-in header instead of breaking existing OAuth tokens" },
{ "id": "auth-03", "category": "webhook_header_break", "item": "POST /webhooks/events signature header", "baseline_value": "X-Signature-256", "actual_value": "X-Hub-Sig", "delta_usd": 5000.0, "severity": "high", "claim_action": "Emit both X-Signature-256 and X-Hub-Sig during a 90-day dual-sign window" }
],
"reproducible_counterexamples": [
{ "item": "Auth Regression Risk Sum", "formula": "30000.00 + 10000.00 + 5000.00", "expected": 0.0, "observed": 45000.0, "delta_usd": 45000.0 }
],
"sha256_proof": "5041d54e1468a76e2dea8538b07a2869b500ea8c6a3f5a476a9ca90295a6ee4c",
"cache_hit": false,
"verification": { "verified": true, "precision_usd": 0.01 },
"billed_micros": 50000
}
Run Auth Regression Diff Free Next: Competitor Pricing DOM Diff · Agent Skill