Skip to content
Back to skills

Webapp Api Discovery

BSecurity

API endpoint discovery including OpenAPI/Swagger detection, GraphQL, versioned routes, and API surface mapping from multiple…

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 7, 2026
securityjavascriptgojavabashapidocumentation

Works with

  • api

Security analysis

B88/100
  • criticalExfiltrates credentials via HTTP — exact pattern from Snyk ToxicSkills study

Pro shows the line behind each finding and how to fix it

Scanned November 7, 2026

npx -y skills add bitbytelabio/arsenal --skill webapp-api-discovery --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Webapp Api Discovery?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Webapp Api Discovery
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/bitbytelabio-webapp-api-discovery/badge)](https://www.skillsdirectory.com/skills/bitbytelabio-webapp-api-discovery)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: webapp-api-discovery
description: API endpoint discovery including OpenAPI/Swagger detection, GraphQL, versioned routes, and API surface mapping from multiple…
domain: webapp
category: api
hide: true
license: Apache-2.0
metadata:
  manifest_entry: src/corpus/webapp-api-discovery/SKILL.md
---
# API Discovery

## When to Use
When the target shows API signals: JSON responses, `/api/` paths, JavaScript with API calls, or an OpenAPI/Swagger spec.

## Important
OpenAPI/Swagger files are ONE high-confidence discovery source — NOT the complete API surface. Specs can be stale, incomplete, filtered, version-specific, or a public subset only. Always merge spec data with runtime evidence (JavaScript, browser traffic, error messages).

## Methodology

### OpenAPI/Swagger Detection
```bash
for path in swagger.json swagger/v1/swagger.json openapi.json api-docs api/docs \
  swagger-ui.html api/swagger api/swagger.json v1/api-docs v2/api-docs v3/api-docs \
  .well-known/openapi docs api/documentation redoc; do
  code=$(curl -sk -o /dev/null -w "%{http_code}" "https://TARGET/$path")
  [ "$code" != "404" ] && [ "$code" != "000" ] && echo "[$code] /$path"
done
```

### Spec Parsing (when found)
```bash
# Extract all paths and methods
cat tmp/openapi.json | jq -r '.paths | keys[]' > tmp/api_paths.txt

# Extract parameters per path
cat tmp/openapi.json | jq -r '.paths | to_entries[] | "\(.key): \(.value | keys | join(", "))"'

# Extract request body schemas
cat tmp/openapi.json | jq -r '.paths | to_entries[] | .value | to_entries[] | .value.requestBody.content["application/json"].schema.properties | keys' 2>/dev/null

# Resolve $ref chains
cat tmp/openapi.json | jq -r '.. | .["$ref"]? // empty' | sort -u
```

### GraphQL Discovery
```bash
# Common GraphQL endpoints
for path in graphql graphql/v1 api/graphql query; do
  code=$(curl -sk -o /dev/null -w "%{http_code}" -X POST "https://TARGET/$path" \
    -H "Content-Type: application/json" -d '{"query":"{__typename}"}')
  [ "$code" = "200" ] && echo "[GRAPHQL] /$path"
done

# Introspection query (if endpoint found)
curl -sk -X POST https://TARGET/graphql -H "Content-Type: application/json" \
  -d '{"query":"{__schema{types{name fields{name}}}}"}' | jq -r '.data.__schema.types[] | select(.name | test("^[a-z]")) | .name as $t | .fields[] | "\($t).\(.name)"'
```

### API Versioning Enumeration
```bash
for v in v1 v2 v3 v4 api/v1 api/v2 api/v3; do
  curl -sk "https://TARGET/$v/" -H "Accept: application/json" -o /dev/null -w "[\($v)] %{http_code} %{size_download}\n"
done
```

### Alternate API Hosts
```bash
# Check JavaScript and configs for API hostnames that differ from the main target
cat tmp/js/*.js | grep -oP 'https?://[a-zA-Z0-9.-]+\.[a-z]+/api' | sort -u
```

### Error-Message API Discovery
```bash
# Send malformed requests — error messages often reveal route structure
curl -sk "https://TARGET/api/nonexistent" -H "Accept: application/json" | head -20
curl -sk -X POST "https://TARGET/api/users" -H "Content-Type: application/json" -d '{}' | head -20
```

## Stopping Criteria
- OpenAPI/Swagger checked at common paths
- GraphQL checked (if any API signals exist)
- API versioning probed
- JS-derived API references merged with spec data
- Error-message-derived routes recorded

## Common Misses
- API endpoints on alternate ports or subdomains
- Internal/admin APIs not in the public spec
- WebSocket and gRPC-Web endpoints
- JSON-RPC endpoints
- SOAP endpoints (check for ?wsdl on /api paths)

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.