Skip to content
Back to skills

Authorization Matrix

ASecurity

Build and verify an authorization matrix mapping roles to endpoints — detect unprotected routes, missing ownership checks, and scope misconfigurations

  • 57 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added October 17, 2026
securitygoapisecurity

Works with

  • cursor
  • api

Security analysis

A100/100

Scanned October 17, 2026

npx -y skills add diegosouzapw/awesome-omni-skill --skill authorization-matrix --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Authorization Matrix?

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

Security grade badge for Authorization Matrix
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/diegosouzapw-authorization-matrix/badge)](https://www.skillsdirectory.com/skills/diegosouzapw-authorization-matrix)

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: Authorization Matrix
description: Build and verify an authorization matrix mapping roles to endpoints — detect unprotected routes, missing ownership checks, and scope misconfigurations
category: security
version: 1.0.0
triggers:
  - route-change
  - middleware-change
  - auth-change
globs: "**/cmd/api/main.go,**/middleware/**,**/handler/**"
---

# Authorization Matrix Skill

Build a complete authorization matrix from the codebase and verify every endpoint has appropriate authentication, authorization, and ownership checks.

## Trigger Conditions
- Route configuration changes
- Auth middleware changes
- New handlers are added
- User invokes with "auth matrix" or "authorization-matrix"

## Input Contract
- **Required:** Path to route configuration (main.go or router files)
- **Required:** Path to middleware directory
- **Optional:** Path to handler files for ownership check verification

## Output Contract
- Complete route → auth requirement matrix
- List of unprotected routes (missing auth middleware)
- List of routes missing account ownership verification
- Comparison against the whitelist in rule 121

## Tool Permissions
- **Read:** Route config, middleware, handler files
- **Write:** None (read-only analysis)
- **Search:** Grep for `Use(middleware.Auth`, `GetUserID`, `RequireScope`, `AccountOwnership`

## Execution Steps

1. **Extract all routes**: Parse route registration to build complete endpoint list with HTTP method and path
2. **Identify auth middleware**: Find which route groups use auth middleware
3. **Check whitelist**: Compare unauthenticated routes against the whitelist in rule 121
4. **Verify ownership**: For account-scoped routes (`/accounts/:id/*`), verify ownership middleware is applied
6. **Report**: Produce authorization matrix with pass/fail per check

## Success Criteria
- All routes outside the whitelist are authenticated
- All account-scoped routes verify ownership
- All financial endpoints require appropriate scopes
- No route bypasses auth through misconfiguration

## References
- `.cursor/rules/121-route-auth-enforcement.mdc`
- `.cursor/rules/042-security-authorization.mdc`

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.

View all in security →

Comments

Loading comments…

Newsletter

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