saas rbac tenant security audit
Audit multi-tenant SaaS apps for RBAC flaws, tenant isolation gaps, and BOLA vulnerabilities in web codebases.
$5
saas rbac tenant security audit
Example session with this skill installed
Audit the /api/v1/projects endpoint and its corresponding React dashboard components for tenant isolation and RBAC gaps. Produce the findings in docs/RBAC_TENANT_SECURITY_AUDIT.md.
- Read your context and instructions
- Compiled the saas rbac tenant
- Generated the document
I have completed the audit of the project management module. I identified one High-severity tenant isolation flaw in the update handler and a Medium-severity mismatch between the UI and API roles.
RBAC & Tenant Security Audit: Project Module
| Route/Action | Intended Roles | Frontend Behavior | Backend Behavior | Result |
|---|---|---|---|---|
GET /api/v1/projects | Member, Admin | Hidden for non-members | Filtered by workspace_id | Pass |
PATCH /api/v1/projects/{id} | Admin | Button disabled for Members | Trusts project_id from URL | Fail (BOLA) |
DELETE /api/v1/projects/{id} | Admin | Hidden for Members | Validates Admin role | Pass |
[High] Cross-tenant project update through BOLA
- Evidence:
backend/api/v1/projects.py—update_projectroute. - Attack scenario: An authenticated user changes the
{id}in a PATCH request to a project ID belonging to a different workspace. The backend updates the record because it fetches by ID without checkingworkspace_idmembership. - Impact: Unauthorized modification of project metadata across tenant boundaries.
- Fix: Update the ORM query to filter by both
idandcurrent_user.workspace_id. - Regression test:
tests/test_projects.pyshould attempt to update Project B using a Token from Workspace A and expect a404 Not Foundor403 Forbidden.
[Medium] UI/API Role Mismatch on Project Creation
- Evidence:
frontend/src/components/ProjectList.tsxvsbackend/api/v1/projects.py. - Finding: The UI allows "Members" to see the "New Project" button, but the backend correctly rejects the POST request with a 403.
- Impact: Poor UX/API contract mismatch; may indicate intended functionality that was partially restricted.
- Fix: Update frontend
usePermissionshook to restrict the "New Project" button toRole.ADMIN.
Next steps
- Apply the tenant predicate fix to the
update_projectservice method. - Synchronize the frontend
ProjectListcomponent visibility with the backendAdminrequirement. - Run the suggested regression test case to verify the BOLA fix.
ProjectList.tsx
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.
About this skill
SaaS applications often fail not at the login screen, but at the data boundary. This skill audits multi-tenant web applications for RBAC gaps and tenant isolation failures that allow users to access or modify data belonging to other organizations. It systematically checks if your backend enforcement matches your frontend UI logic, ensuring that a hidden button isn't your only line of defense.
What it does
- Tenant Isolation Audit verifying that users cannot access resources belonging to other organizations or workspaces.
- RBAC Mapping building a permission matrix that compares frontend route guards against actual backend API enforcement.
- Broken Object Level Authorization (BOLA) Detection finding endpoints that trust client-supplied IDs without verifying ownership.
- Privilege Escalation Analysis identifying paths where low-privileged users can reach admin actions or self-assign roles.
- Lifecycle Verification checking if deactivated users or changed memberships correctly terminate access across sessions and background jobs.
How it works
- Discovery where the agent maps your tenant boundaries, auth methods (JWT/OAuth), and role hierarchy from the codebase.
- Backend Inspection where it audits routers, controllers, and ORM queries for missing tenant predicates.
- Frontend Comparison where it matches UI navigation visibility against server-side permission checks.
- Reporting where it generates a structured security audit file with evidence, impact, and remediation steps.
Frameworks & tools
Optimized for FastAPI, Python, React, and TypeScript stacks. It analyzes ORM patterns (SQLAlchemy, Prisma), dependency injection, and middleware implementations.
Why this beats prompting it yourself
Generic security prompts often miss "silent" failures like a background job that lacks a tenant scope or a React route guard that isn't backed by an API check. This skill follows a specific multi-step methodology to find logic flaws that standard vulnerability scanners overlook.
Use cases
- Auditing a new feature for tenant isolation before merging to main.
- Validating RBAC enforcement during a migration from single-tenant to multi-tenant.
- Identifying BOLA vulnerabilities in high-impact endpoints like exports or billing.
- Performing a pre-audit check before a formal third-party penetration test.
Known limitations
Does not perform live penetration testing or destructive exploits. Findings are based on static analysis of the provided repository and documented assumptions.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 15 days ago
Permissions
What's inside
Frequently Asked Questions
New in Security
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Security.