authz-security-review

Audit authorization and access-control across Next.js App Router routes and services.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/raingernx/KRUKRAFT --skill authz-security-review
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: authz-security-review
Source: https://github.com/raingernx/KRUKRAFT/tree/main/.codex/skills/authz-security-review
Command: npx skills add https://github.com/raingernx/KRUKRAFT --skill authz-security-review

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps security and engineering teams identify authorization gaps across an application, ensuring routes and services properly enforce sessions, ownership, and admin access.

Core Features & Use Cases

  • Audit route guards and service-level authorization for production Next.js apps
  • Verify ownership checks are DB-backed and not trusting client input
  • Re-enforce admin permissions at the service layer and handle common gaps

Quick Start

Inspect a production route that accesses user-owned data and verify session, ownership, and role checks across the route and its service.

Frequently Asked Questions about authz-security-review

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit authorization and access-control across Next.js App Router routes?

Auditing authorization in Next.js App Router involves inspecting route handlers to verify server-side session validation, DB-backed ownership checks, and service-layer admin role enforcement, ensuring access-control does not rely on middleware alone.

Why does relying on middleware alone fail for Next.js session validation?

Relying on middleware alone for session validation creates authorization gaps because it bypasses service-level re-enforcement of admin roles and DB-backed ownership verification, allowing routes to trust client input instead of enforcing server-side database checks.

How do I verify DB-backed ownership checks for user-owned data in a SaaS application?

Verifying DB-backed ownership checks involves inspecting production routes that access user-owned data and confirming the service layer queries the database to validate ownership, rather than trusting client input or route-level parameters alone.

What is the best way to enforce admin access at the service layer in Next.js?

Enforcing admin access at the service layer involves re-enforcing admin permissions alongside route guards, ensuring production Next.js apps handle common authorization gaps by validating sessions and roles server-side before accessing user-owned data.

Does this authorization review process work for SaaS platforms built on the Next.js App Router?

This authorization review process is specifically designed for production Next.js App Router SaaS platforms, focusing on auditing route handlers and services for session validation, DB-backed ownership checks, and admin access enforcement.

When should I perform an authorization security review on route handlers and services?

An authorization security review should be performed when your SaaS platform handles user-owned data and admin roles, ensuring route handlers and services properly enforce sessions, DB-backed ownership, and service-level admin access before production deployment.