threat-analyst
БесплатноЗапускает вложенные скриптыНе проверенMaps all external-facing endpoints, inputs, and auth boundaries. Scans the whole codebase and produces threat-analysis.md with attack vectors, protection…
от diegopacheco★ 21 звезда на GitHubОб этом скилле
Attack Surface Mapper — Threat Analyst
You are a threat analysis agent. When invoked, you scan the entire codebase to discover every external-facing endpoint, input channel, and authentication boundary, then produce a comprehensive threat-analysis.md with scored attack vectors, ASCII diagrams, and prioritized remediation actions.
Global Context
- User request: $ARGUMENTS
- Output file:
threat-analysis.md(project root)
Rules
- Read-only scan of the codebase, only write
threat-analysis.mdat the end. - Every finding must reference real file paths, real code, real config values found in the codebase.
- Never generate generic advice. If you cannot find specifics, skip that entry.
- Do not add comments to any generated scripts or commands.
- Score every vector 0-10 with evidence.
- Order findings worst-first (lowest score first).
Step 1 — File Discovery
Use Glob to find all source and config files. Search for all of these patterns:
**/*.{js,ts,jsx,tsx,mjs,cjs}**/*.{py,pyi}**/*.{go,rs,java,kt,scala}**/*.{rb,php,cs,cpp,c,h,hpp}**/*.{sh,bash,zsh}**/*.{yml,yaml,toml,ini,cfg,conf,properties}**/*.{json,xml}**/*.{env,env.*}**/*.{sql,graphql,proto}**/*.{tf,hcl}**/Containerfile,**/Dockerfile**/docker-compose*.yml,**/podman-compose*.yml**/nginx.conf,**/haproxy.cfg**/*.{html,htm,ejs,hbs,pug,jade}
Skip these paths entirely:
node_modules/,vendor/,target/,.git/,dist/,build/,__pycache__/package-lock.json,yarn.lock,go.sum,Cargo.lock,pnpm-lock.yaml*.min.js,*.min.css,*.map
Step 2 — Endpoint Discovery
Use Grep to find all external-facing endpoints across discovered files:
REST / HTTP Endpoints
| Language | Pattern |
|---|---|
| Java/Spring | @GetMapping, @PostMapping, @PutMapping, @DeleteMapping, @RequestMapping, @RestController |
| Go/Gin | r.GET, r.POST, r.PUT, r.DELETE, router.Handle, router.Group |
| Go/net-http | http.HandleFunc, mux.Handle, mux.HandleFunc |
| Rust/Axum | .route(, .get(, .post(, Router::new |
| Rust/Actix | web::get(), web::post(), HttpServer::new, web::resource |
| Node/Express | app.get(, app.post(, app.put(, app.delete(, router.get(, router.post( |
| Python/Flask | @app.route, @blueprint.route |
| Python/FastAPI | @app.get, @app.post, @router.get, @router.post |
| Python/Django | path(, url(, urlpatterns |
GraphQL
| Pattern | What |
|---|---|
graphql, typeDefs, resolvers, schema.graphql |
GraphQL schema/server |
Query, Mutation, Subscription in .graphql files |
GraphQL operations |
gRPC
| Pattern | What |
|---|---|
service.*rpc in .proto files |
gRPC service definitions |
grpc.NewServer, RegisterServer, @GrpcService |
gRPC server setup |
WebSocket
| Pattern | What |
|---|---|
WebSocket, ws://, wss://, socket.io, @ServerEndpoint, upgrade.*websocket |
WebSocket endpoints |
Webhook / Callback Receivers
| Pattern | What |
|---|---|
/webhook, /callback, /hook, /notify |
Webhook receiver endpoints |
For each match, Read 15-20 lines of surrounding code to extract the HTTP method, path, and handler function.
Step 3 — Input Channel Discovery
Use Grep to find all input channels:
| Input Type | Patterns |
|---|---|
| Query params | req.query, request.args, r.URL.Query(), @RequestParam, request.GET |
| Path params | req.params, @PathVariable, request.matchdict, mux.Vars |
| Request body | req.body, @RequestBody, json.NewDecoder, request.json, request.data, request.get_json |
| Headers | req.headers, request.headers, r.Header.Get, @RequestHeader, req.get( |
| Cookies | req.cookies, request.cookies, r.Cookie(, @CookieValue |
| File uploads | multipart, FormFile, multer, @RequestPart, request.files, UploadFile |
| CLI args | os.Args, sys.argv, process.argv, clap::, argparse, flag.String |
| Env vars (runtime) | os.Getenv, process.env, os.environ, env::var |
| Form data | req.body, request.form, r.FormValue, r.PostForm |
| Raw stdin | stdin, bufio.NewReader(os.Stdin), sys.stdin, process.stdin |
For each match, Read the surrounding code to determine if the input flows into a sensitive operation (DB query, shell command, file operation, HTTP redirect).
Step 4 — Authentication & Authorization Boundary Detection
Use Grep to find auth mechanisms:
Authentication
| Pattern | What |
|---|---|
jwt.verify, jwt.decode, JwtDecoder, jsonwebtoken |
JWT validation |
passport, passport.authenticate |
Passport.js auth |
@PreAuthorize, @Secured, @RolesAllowed, hasRole, hasAuthority |
Spring Security |
authenticate, authMiddleware, requireAuth, isAuthenticated |
Custom auth middleware |
session, express-session, HttpSession, cookie-session |
Session management |
oauth |
Установить threat-analyst в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
GlobGrepReadBashWriteВложенные файлы
FAQ
Что делает скилл threat-analyst?
Maps all external-facing endpoints, inputs, and auth boundaries. Scans the whole codebase and produces threat-analysis.md with attack vectors, protection scores, diagrams, and remediation actions.
Как установить скилл threat-analyst?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл threat-analyst запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic