APIsec for SPA backends

What middleBrick covers

  • Black-box API scanning with no agents or SDKs required
  • Detects OWASP API Top 10 (2023) issues and maps findings
  • OpenAPI 3.0/3.1 and Swagger 2.0 spec-aware analysis
  • Authenticated scanning with strict header allowlist
  • Continuous monitoring with diff detection and alerts
  • CI/CD integration via GitHub Action and MCP Server

How APIsec handles SPA backends

SPA backends often expose a broad attack surface through dynamic endpoints and permissive CORS. This scanner evaluates the backend independently of the frontend, focusing on HTTP interfaces rather than client code.

It checks authentication mechanisms, CORS wildcard usage, and HTTP method exposure. Sensitive data patterns, API key formats, and error handling are analyzed to identify inadvertent information leakage that can assist an attacker targeting a SPA.

The scanner validates whether backend routes align with expected resource boundaries, looking for ID enumeration and over-permissive origins that undermine isolation between client sessions.

Coverage aligned to OWASP API Top 10

Findings map directly to OWASP API Top 10 (2023), covering the most common API risks observed in production.

  • Authentication weaknesses such as JWT alg=none, weak key configurations, and missing claims are detected.
  • BOLA and IDOR are identified through sequential ID patterns and active adjacent-ID probing.
  • BFLA and privilege escalation are surfaced via admin endpoint discovery and role/permission leakage.
  • Property over-exposure and mass-assignment risks are highlighted when internal fields are returned unintentionally.
  • Input validation issues include CORS wildcard with credentials and dangerous HTTP methods.
  • Rate limiting misconfigurations are flagged through missing headers and oversized responses.
  • Data exposure checks for PII patterns, API key formats, and error/stack-trace disclosure.
  • SSRF indicators are evaluated via URL-accepting parameters and active IP-bypass attempts.
  • LLM security probes target system prompt extraction, instruction override, and data exfiltration paths.

OpenAPI and spec-aware analysis

The scanner parses OpenAPI 3.0, 3.1, and Swagger 2.0 documents, resolving recursive $ref references to build an accurate interface model.

It cross-references the spec with runtime behavior to surface undefined security schemes, deprecated operations, and missing pagination controls. Sensitive fields defined in the spec are compared against actual responses to detect over-exposure.

This approach helps identify mismatches between documented and implemented behavior, which commonly leads to insecure default configurations in rapidly evolving APIs.

Authenticated scanning and domain verification

Authenticated scans are available from the Starter tier and above, supporting Bearer tokens, API keys, Basic auth, and cookies.

Before credentials are accepted, a domain verification gate must pass using a DNS TXT record or an HTTP well-known file. This ensures only the domain owner can scan with privileged access.

To limit exposure, the scanner forwards only a strict allowlist of headers: Authorization, X-API-Key, Cookie, and X-Custom-*.

Continuous monitoring and integrations

Pro tier enables scheduled rescans at intervals of six hours, daily, weekly, or monthly, with diff detection across runs.

  • New findings and resolved findings are tracked, along with score drift over time.
  • Email alerts are rate-limited to one per hour per API to avoid noise.
  • HMAC-SHA256 signed webhooks are delivered, with auto-disable after five consecutive failures.

Integrations include a web dashboard for reporting, a CLI via the middlebrick npm package, a GitHub Action for CI/CD gating, and an MCP Server for AI coding assistants.

Frequently Asked Questions

Can this scanner replace a human pentester for a SPA backend?
No. The tool detects common technical issues and provides remediation guidance, but it cannot assess business logic or contextual risks that require human judgment.
Does the scanner test for SQL injection or command injection?
No. It does not perform intrusive payload testing such as SQL injection or command injection, as those tests fall outside its non-intrusive scope.
How are scan results mapped to compliance frameworks?
Findings map directly to PCI-DSS 4.0, SOC 2 Type II, and OWASP API Top 10 (2023). For other frameworks, results can help you prepare for audits and surface findings relevant to security controls.
What happens to scan data after cancellation?
Customer scan data is deletable on demand and purged within 30 days of cancellation. Data is never sold and is not used for model training.