hunt-spa-api

Extract backend API routes from SPA JavaScript bundles and test them for missing authentication.

4.0k|628|Updated May 5, 2026
One-click install
npx skills add https://github.com/elementalsouls/Claude-BugHunter --skill hunt-spa-api
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hunt-spa-api
Source: https://github.com/elementalsouls/Claude-BugHunter/tree/main/skills/hunt-spa-api
Command: npx skills add https://github.com/elementalsouls/Claude-BugHunter --skill hunt-spa-api

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Single-page applications ship their entire backend route map to the browser inside JavaScript bundles, yet the API behind a locked-down login page often lacks authentication middleware on some route groups. Manually discovering and testing these hidden endpoints is slow and easy to skip when a login page looks secure.

Core Features & Use Cases

  • Bundle harvesting: Download React, Vue, Angular, Next.js, and Svelte bundles (including lazy-loaded async chunks) and grep them for API hosts, versioned base paths, route strings, and leaked secrets.
  • Control-based auth testing: Establish a gated control endpoint, then test every discovered route unauthenticated and interpret 401, 200, 400, and verbose-error responses to confirm broken access control.
  • Pivot and minimal proof: Use IDs returned by one endpoint to prove router reachability, check dev/staging API variants and CORS headers, and stop at minimum-necessary proof of the missing check.
  • Use Case: During an authorized engagement against console.target.com, extract routes like account/payment/list from the minified bundle, find that api.target.com processes them without a bearer token, and report an unauthenticated financial data exposure.

Quick Start

Analyze the JavaScript bundles served by the target SPA, extract its backend API routes, and test each route unauthenticated to identify missing access control.

Frequently Asked Questions about hunt-spa-api

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find hidden API endpoints in a JavaScript bundle?

Download every JS bundle referenced by the SPA's HTML shell, then grep for quoted resource route strings like "account/payment/list" rather than full URLs, since minifiers store routes as string segments. Also extract API hosts and versioned base paths, and reconstruct lazy-loaded chunk filenames from the chunk map in main.js.

How do I test an API for missing authentication?

First send an unauthenticated request to an endpoint you expect to be protected and record the correct 401 rejection as a control. Then request each discovered route with no Authorization header and compare: a 200 with data or a 400 business-logic validation error indicates the route processed your request without an auth check.

Does a protected SSO login page mean the API is secure?

No. Frontend OAuth or SSO login says nothing about whether the backend API validates tokens on every route. Route groups frequently miss the auth middleware, so always test the API directly and unauthenticated regardless of how locked-down the login UI appears.

Why does grepping for /api/v1 routes return nothing in minified bundles?

Minifiers store routes as concatenated string segments like "user/profile" rather than full /api/v1 URLs, so a naive base-path grep fails. Grep for quoted resource-word route strings instead and prepend the API base path yourself when testing.

What are the limits of SPA API testing during an engagement?

Stop at minimum-necessary proof once a missing auth check is confirmed; do not enumerate or exfiltrate the dataset. Avoid write endpoints like create or signup as proof, verify the API host belongs to the in-scope target, and validate leaked keys before claiming they are exploitable secrets.