skills/sentinel/skills/attack-surface/SKILL.md
Map the application attack surface. Use when the user asks to "map attack surface", "list entry points", "inventory API endpoints", "find all inputs", "enumerate routes", "discover exposed endpoints", or wants to understand where external data enters the system. Also useful as a pre-scan step before running /sentinel. Invoke with /sentinel:attack-surface.
npx skillsauth add 0x1337c0d3/claude-security attack-surfaceInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Discover and inventory every entry point where external data enters the application. Produces a ranked catalog of all routes, APIs, input handlers, and external interfaces organized by exposure level and trust boundary.
Most useful as a pre-scan step before running /sentinel — identifies where
to focus scanning effort and surfaces unauthenticated endpoints that are high risk.
/sentinel:attack-surface # Full surface map (default: full scope)
/sentinel:attack-surface --depth quick # Route extraction only (fast)
/sentinel:attack-surface --depth deep # Trace entry points to internal sinks
/sentinel:attack-surface --format json # Machine-readable inventory
Identify the application framework to determine route registration patterns:
| Framework | Route Pattern |
|-----------|--------------|
| Express/Koa/Fastify | app.get(), router.post(), fastify.route() |
| Django | urlpatterns, path(), re_path(), @api_view |
| Flask | @app.route(), @blueprint.route() |
| Spring | @GetMapping, @PostMapping, @RequestMapping |
| Rails | routes.rb, resources :, get '/' |
| Next.js/Nuxt | pages/ and app/ directory conventions, route.ts |
| ASP.NET | [HttpGet], [Route], MapGet(), MapPost() |
| Go net/http | http.HandleFunc(), mux.Handle(), gorilla/chi patterns |
| FastAPI | @app.get(), @router.post() |
| gRPC | .proto service definitions |
| GraphQL | Schema definitions, resolver registrations |
Use Grep to find these patterns directly in the source tree.
For each framework detected, systematically extract all entry points:
argparse, commander, cobra)For every discovered entry point, determine:
| Attribute | Values | |-----------|--------| | Authentication | None, API key, session, JWT, OAuth, mTLS, unknown | | Authorization | None, role-based, attribute-based, unknown | | Input types | Query params, path params, headers, body (JSON/XML/form), files, cookies | | Validation | Present (with details) or absent | | Rate Limiting | Present or absent | | Network exposure | Internet-facing, internal network, localhost only |
| Level | Criteria | |-------|----------| | CRITICAL | Internet-facing, no authentication, accepts user input, interacts with sensitive data or system resources | | HIGH | Internet-facing with authentication but handling sensitive data, or unauthenticated with limited input validation | | MEDIUM | Authenticated endpoints with proper validation, or internal endpoints with no authentication | | LOW | Internal endpoints with authentication, limited input surface, or read-only operations on non-sensitive data |
At --depth deep, trace each HIGH/CRITICAL entry point inward to identify
what sinks they reach (databases, file system, external services, system commands).
Look for:
/debug, /admin, /metrics, /health exposing internals)/api/v1/ when /api/v2/ is current)## Attack Surface Inventory
### Summary
- Total entry points: N
- Internet-facing: N (N unauthenticated)
- Internal: N
- Exposure: N CRITICAL, N HIGH, N MEDIUM, N LOW
### Entry Points by Exposure
| # | Method | Path | Auth | Input Types | Validation | Rate Limit | Exposure |
|---|--------|------|------|-------------|------------|------------|----------|
| 1 | POST | /api/v1/users | None | JSON body | None | No | CRITICAL |
| 2 | GET | /api/v1/users/:id | JWT | Path param | Partial | Yes | MEDIUM |
### Shadow Endpoints
[Undocumented or debug endpoints discovered]
### Trust Boundary Map (--depth deep)
[Entry points grouped by trust boundary — internet vs internal vs admin]
### Findings
[Missing security controls on HIGH/CRITICAL entry points]
When entry points have clearly missing security controls, emit findings:
[SURF-XXX] Title
Severity: CRITICAL/HIGH/MEDIUM/LOW | CWE: CWE-306 (Missing Auth) or CWE-16 (Config)
Location: file:line (route definition)
Entry point: [METHOD] [path]
Issue: [Missing authentication / no rate limit / no input validation]
Risk: [Who can reach this and what they can do]
Fix: [Add auth middleware / rate limiter / input size limit]
Finding ID prefix: SURF
/health, /ready) without auth are normal in
container orchestration. Only flag if they expose sensitive internal state.Attack surface mapping is the ideal pre-scan step before /sentinel:
run-sast.sh a focused target list/sentinel:api for deep analysis of HIGH/CRITICAL endpointsFormat your final output following the standard Sentinel report structure defined in
${CLAUDE_SKILL_DIR}/../../templates/report.md. Use your skill's domain-specific
finding IDs (e.g. STRIDE-SPOOF-001, RT-SK-001, API-001) in the Finding ID column.
Include the Security Scorecard and Findings sections as a minimum. Omit the
Cross-Validation Summary section if you ran only AI analysis (no tool comparison).
development
STRIDE threat modeling. Use when the user asks to "run STRIDE", "threat model with STRIDE", "check for spoofing/tampering/repudiation/info disclosure/DoS/ privilege escalation", or invokes /sentinel:stride. Analyzes the codebase across all 6 STRIDE threat categories (Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, Elevation of Privilege).
data-ai
Adversarial analysis from 6 attacker personas. Use when the user asks to "red team this", "think like an attacker", "simulate an attack", "threat model as an adversary", or wants to understand how their app would be attacked by a script kiddie, insider, organized crime, nation-state, hacktivist, or supply chain attacker. Invoke with /sentinel:red-team.
testing
Detect race condition vulnerabilities. Use when the user asks to "check for race conditions", "find TOCTOU bugs", "analyze concurrency issues", "detect double-spend vulnerabilities", "check for check-then-act patterns", or mentions "race condition", "TOCTOU", "double-spend", "concurrency", "atomicity", or "thread safety" in a security context. Invoke with /sentinel:race-conditions.
testing
Detect business logic security vulnerabilities. Use when the user asks to "check business logic security", "find logic flaws", "audit workflow security", "check for coupon abuse", "detect negative amount exploits", "analyze state machine security", or mentions "business logic", "workflow bypass", "negative amount", "coupon abuse", "self-referral", "state manipulation", or "price manipulation" in a security context. Invoke with /sentinel:business-logic.