saas role permission matrix builder
Converts SaaS roles and routes into a secure, auditable RBAC model with gap analysis and negative test plans.
$5
Works with the AI tools you already use
saas role permission matrix builder
Example session with this skill installed
Audit RBAC for our Task Management module. Roles: OrgAdmin, ProjectLead, Contributor. Resources: Project, Task, Comment. Routes in ./app/Http/Controllers/TaskController.php.
- Read your context and instructions
- Compiled the saas role permission
- Generated the document
I have analyzed the Task Management module. I mapped 3 roles against 3 resources and identified 4 security findings including one critical cross-tenant leakage risk.
SaaS Role-Permission Matrix: Task Management
| Resource | Action | OrgAdmin | ProjectLead | Contributor |
|---|---|---|---|---|
| Project | Create | Allow | Deny | Deny |
| Project | Delete | Allow | Deny | Deny |
| Task | Create | Allow | Allow | Allow (bound) |
| Task | Update | Allow | Allow (bound) | Allow (owner) |
| Comment | Delete | Allow | Allow (bound) | Deny |
Authorization Findings
| ID | Finding | Severity | Location |
|---|---|---|---|
| F-003 | Privilege Escalation | High | TaskController@update - Contributor can change project_id |
| F-005 | Cross-tenant Leakage | Critical | TaskController@index - Missing whereTenantId scope |
| F-007 | Destructive Action | Med | TaskController@destroy - No soft-delete or audit log |
| F-008 | Client-Side Guard | Low | Project deletion only hidden in UI; route is active |
Enforcement Spec & Negative Test Plan
### Enforcement: Task Update (Allow - Owner)
Pattern: Ensure `task->user_id === auth()->id()` AND `task->project->tenant_id === auth()->tenant_id`.
Location: `TaskPolicy.php`
### Negative Test: Contributor Delete Comment
- Attacker: Contributor (ID: 5, Tenant: A)
- Target: DELETE /api/comments/99 (Tenant: A, Owner: 10)
- Expected: 403 Forbidden
- Side-effect: Comment 99 must persist in DB.
Least-Privilege Scorecard
- Deny Coverage: 100% (6/6 deny cells have negative tests)
- Logic Integrity: Pass (No blanket admin bypass detected)
- Risk Level: High (F-005 must be remediated immediately)
Next steps
- Implement tenant scoping on the
TaskController@indexmethod to resolve F-005. - Add a server-side ownership check to the
Commentdeletion logic. - Update the
Contributorrole to use a policy-based guard for task updates.
saas-role-permission-matrix-builder.pdf
PDF · document
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
What you get
About this skill
The problem
Vague authorization models lead to privilege escalation, cross-tenant data leaks, and failed security audits. Developers often rely on frontend visibility or blanket admin roles that hide dangerous server-side gaps.
What it does
- Builds a canonical Role-Permission matrix mapping every role, resource, and action.
- Performs a gap analysis to surface admin bypasses, unsafe exports, and missing server-side checks.
- Generates a negative test plan for every denied permission to prevent regression.
- Produces a least-privilege scorecard to validate SOC 2 or ISO 27001 compliance readiness.
Frameworks & tools
Agnostic. Works with any SaaS backend, OpenAPI specs, and framework-specific policy files (e.g., Laravel Policies, Pundit, or custom middleware).
Why this beats prompting it yourself
Standard LLMs often hallucinate "allow" by default or miss subtle cross-tenant leakage paths. This skill enforces a "deny-by-default" logic, specifically looks for known F-series authorization flaws, and ensures 100% test coverage for every denied route.
Use cases
- Preparing for a security audit by documenting the formal permission model.
- Mapping out RBAC for a new multi-tenant SaaS feature before coding.
- Auditing existing controllers to find routes that lack ownership checks.
- Designing negative integration tests for a security-critical API.
Known limitations
Does not execute code or apply patches. It does not model API gateway configurations or infrastructure-level CORS policies.
How to install
Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.
- 1
Download the ZIP
Free skills download straight away. Paid skills unlock right after purchase.
- 2
Unzip into your skills folder
Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.
- 3
Ask your agent to use it
Restart the agent if it was already running. It picks the skill up automatically - no config needed.
Skills folder by agent
Click the path to copy it. Create the folder if it does not exist yet.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
30-day refund
Not a fit? Get your money back
Trust & safety
Security scanned
Verified clean today
- Passed all security checks, Safe to install