saas rbac tenant security audit

    by Tatwa Brajesh

    1

    Audit multi-tenant SaaS apps for RBAC flaws, tenant isolation gaps, and BOLA vulnerabilities in web codebases.

    $5

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    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/ActionIntended RolesFrontend BehaviorBackend BehaviorResult
    GET /api/v1/projectsMember, AdminHidden for non-membersFiltered by workspace_idPass
    PATCH /api/v1/projects/{id}AdminButton disabled for MembersTrusts project_id from URLFail (BOLA)
    DELETE /api/v1/projects/{id}AdminHidden for MembersValidates Admin rolePass

    [High] Cross-tenant project update through BOLA

    • Evidence: backend/api/v1/projects.py — update_project route.
    • 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 checking workspace_id membership.
    • Impact: Unauthorized modification of project metadata across tenant boundaries.
    • Fix: Update the ORM query to filter by both id and current_user.workspace_id.
    • Regression test: tests/test_projects.py should attempt to update Project B using a Token from Workspace A and expect a 404 Not Found or 403 Forbidden.

    [Medium] UI/API Role Mismatch on Project Creation

    • Evidence: frontend/src/components/ProjectList.tsx vs backend/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 usePermissions hook to restrict the "New Project" button to Role.ADMIN.

    Next steps

    1. Apply the tenant predicate fix to the update_project service method.
    2. Synchronize the frontend ProjectList component visibility with the backend Admin requirement.
    3. Run the suggested regression test case to verify the BOLA fix.

    ProjectList.tsx

    PDF · document

    Generated

    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

    1. Discovery where the agent maps your tenant boundaries, auth methods (JWT/OAuth), and role hierarchy from the codebase.
    2. Backend Inspection where it audits routers, controllers, and ORM queries for missing tenant predicates.
    3. Frontend Comparison where it matches UI navigation visibility against server-side permission checks.
    4. 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. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 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

    Read Files
    Write Files
    Network Access
    Terminal / Shell
    Listed15 days ago

    What's inside

    Frequently Asked Questions

    This skill performs deep static analysis of your codebase to identify logic flaws, such as missing tenant predicates in ORM queries or discrepancies between frontend UI guards and backend API enforcement, which standard scanners often miss.

    It is optimized for modern full-stack environments including FastAPI, Python, React, and TypeScript, with specific support for ORM patterns like SQLAlchemy and Prisma.

    No, this skill operates via static analysis of your repository to find structural vulnerabilities; it does not perform live exploits or send destructive traffic to your production environment.

    The skill maps your specific role hierarchy and tenant boundaries from your code, ensuring the audit reflects your unique business logic rather than a generic security template.

    You receive the full agent skill configuration and the specialized audit methodology, including updates for 12 months to cover new security patterns and framework versions.

    The agent requires read-only access to your web application's codebase (backend controllers, frontend routes, and database schemas) to effectively map the security architecture.

    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.