sast-analysis
Perform codebase analysis and architecture mapping as the first phase of a security assessment. Explores the tech stack,…
Detect missing authentication and broken function-level authorization vulnerabilities in a codebase using a three-phase approach: recon (map endpoints and the role/permission system), batched verify (check auth/authz in parallel subagents, 3 endpoints each), and merge
Claude Code
$ npx -y skills add utkusen/sast-skills --skill sast-missingauth --agent claude-code
Codex
$ npx skills add utkusen/sast-skills --skill sast-missingauth -a codex -y
Cursor
$ npx skills add utkusen/sast-skills --skill sast-missingauth -a cursor -y
Gemini CLI
$ npx skills add utkusen/sast-skills --skill sast-missingauth -a gemini-cli -y
GitHub Copilot
$ npx skills add utkusen/sast-skills --skill sast-missingauth -a github-copilot -y
OpenCode
$ npx skills add utkusen/sast-skills --skill sast-missingauth -a opencode -y
Windsurf
$ npx skills add utkusen/sast-skills --skill sast-missingauth -a windsurf -y
name: sast-missingauth description: >- Detect missing authentication and broken function-level authorization vulnerabilities in a codebase using a three-phase approach: recon (map endpoints and the role/permission system), batched verify (check auth/authz in parallel subagents, 3 endpoints each), and merge (consolidate batch results). Covers unauthenticated access and vertical privilege escalation (e.g., regular user accessing admin-only functions). Requires sast/architecture.md (run sast-analysis first). Outputs findings to sast/missingauth-results.md. Use when asked to find missing auth, broken access control, or privilege escalation bugs.
You are performing a focused security assessment to find missing authentication and broken function-level authorization vulnerabilities in a codebase. This skill uses a three-phase approach with subagents: **recon** (map endpoints and the permission system), **batched verify** (check authentication and authorization in parallel batches of 3 endpoints each), and **merge** (consolidate batch results into the final report).
**Prerequisites**: `sast/architecture.md` must exist. Run the analysis skill first if it doesn't.
---
An endpoint performs a sensitive action but requires **no login at all** — any anonymous HTTP request can trigger it.
An endpoint requires authentication (user must be logged in) but **does not check whether the authenticated user has the required role or permission** to invoke that function. The classic example: a regular user calling an admin-only API.
Do not conflate with:
---
The endpoint modifies data, returns private information, or performs an administrative action — with no authentication required.
GET /api/admin/users → returns full user list, no token needed DELETE /api/admin/users/5 → deletes a user, no token needed POST /api/settings/smtp → updates server config, no token needed
The endpoint requires a valid session/token but performs no role or permission check. Any authenticated user — regardless of role — can invoke admin or privileged functions.
Regular user sends: DELETE /api/admin/users/5 Authorization: Bearer <regular_user_token> → Server deletes the user without checking if the caller is an admin
Authorization logic is present but can be bypassed:
---
When you see these patterns, the endpoint is likely **not vulnerable**:
**1. Authentication + role-check middleware on a route group**
// Express: all /admin routes protected
router.use('/admin', auth, requireRole('admin'));
router.delete('/admin/users/:id', deleteUser); // protected by above
// Flask-Login + custom decorator
@app.route('/admin/users')
@login_required
@admin_required
def list_users(): ...**2. Declarative role annotations (Java / Spring)**
@PreAuthorize("hasRole('ADMIN')")
@DeleteMapping("/api/admin/users/{id}")
public ResponseEntity<?> deleteUser(@PathVariable Long id) { ... }**3. In-handler role check before sensitive action**
# Django
@login_required
def delete_user(request, user_id):
if not request.user.is_staff:
return HttpResponseForbidden()
User.objects.filter(id=user_id).delete()
return HttpResponse(status=204)**4. Middleware gate applied to entire prefix**
// Chi router — admin group protected
r.Group(func(r chi.Router) {
r.Use(AdminOnly)
r.Delete("/admin/users/{id}", deleteUser)
})**5. Policy/Gate objects**
// Laravel Gate
Gate::define('admin-action', fn($user) => $user->role === 'admin');
// In controller
$this->authorize('admin-action');---
# VULNERABLE: No authentication at all
def list_all_users(request):
users = User.objects.values('id', 'email', 'is_staff')
return JsonResponse(list(users), safe=False)
# VULNERABLE: Authenticated but no role check
@login_required
def delete_user(request, user_id):
User.objects.filter(id=user_id).delete()
return HttpResponse(status=204)
# SECURE
@login_required
def delete_user(request, user_id):
if not request.user.is_staff:
return HttpResponseForbidden()
User.objects.filter(id=user_id).delete()
return HttpResponse(status=204)# VULNERABLE: No auth decorator
@app.route('/admin/users')
def list_users():
return jsonify([u.to_dict() for u in User.query.all()])
# VULNERABLE: Login required but no role check
@app.route('/admin/users/<int:user_id>', methods=['DELETE'])
@login_required
def delete_user(user_id):
user = User.query.get_or_404(user_id)
db.session.delete(user)
db.session.commit()
return '', 204
# SECURE
@app.route('/admin/users/<int:user_id>', methods=['DELETE'])
@login_required
def delete_user(user_id):
if current_user.role != 'admin':
abort(403)
user = User.query.get_or_404(user_id)
db.session.delete(user)
db.sessionA collection of agent skills that turn your LLM coding assistant into a fully functional SAST scanner to find vulnerabilities in your codebase. Works natively with Claude Code, Codex, Opencode, Cursor and any other assistant that supports agent skills.
Perform codebase analysis and architecture mapping as the first phase of a security assessment. Explores the tech stack,…
Detect business logic vulnerabilities in a codebase using a three-phase approach: threat modeling (domain analysis and attack…
Detect insecure file upload vulnerabilities in a codebase using a three-phase approach: discovery (find all upload sites),…
Detect GraphQL injection vulnerabilities in a codebase using a three-phase approach: recon (confirm GraphQL usage and find unsafe…
Detect hardcoded sensitive data (API keys, access tokens, private keys, passwords, etc.) in publicly accessible code — frontend…
Use for authorized security assessment of REST, GraphQL, WebSocket, or SOAP APIs, including discovery, authentication,…
Extract and decrypt Windows DPAPI-protected secrets (Credential Manager, browser logins/cookies, Wi-Fi credentials, KeePass keys)…
Clean and finalize authorized natural-language text intended for readers by auditing suspicious invisible Unicode and rewriting…